當前位置: 首頁>>代碼示例>>C++>>正文


C++ ASSERT_NO_THROW函數代碼示例

本文整理匯總了C++中ASSERT_NO_THROW函數的典型用法代碼示例。如果您正苦於以下問題:C++ ASSERT_NO_THROW函數的具體用法?C++ ASSERT_NO_THROW怎麽用?C++ ASSERT_NO_THROW使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了ASSERT_NO_THROW函數的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: TEST_F

TEST_F(TestIndicesFromValues, search_nonexisting) { ASSERT_NO_THROW(this->search_nonexisting()); }
開發者ID:david-cazier,項目名稱:sofa,代碼行數:1,代碼來源:IndicesFromValues_test.cpp

示例2: TEST

TEST(Graph, can_add_edge_to_graph){
	Graph<int> g(5,10);
	ASSERT_NO_THROW(g.addEdge(1, 2, 3));
}
開發者ID:AleksandrLykov,項目名稱:d-kycha,代碼行數:4,代碼來源:test_graph.cpp

示例3: TYPED_TEST

TYPED_TEST(TestIndexValueMapper, change_indice_value)
{
    ASSERT_NO_THROW(this->change_indice_value());
}
開發者ID:FabienPean,項目名稱:sofa,代碼行數:4,代碼來源:IndexValueMapper_test.cpp

示例4: TEST

TEST(PRIORITY_QUEUE, can_create_queue){
	PRIORITY_QUEUE<int>* a;

	ASSERT_NO_THROW(a = new PRIORITY_QUEUE<int>(2));
}
開發者ID:AleksandrLykov,項目名稱:lab4,代碼行數:5,代碼來源:test_priority_queue.cpp

示例5: TEST

TEST(Table, can_copy_Scan_table_to_Sort_table)
{
	ScanTable<int>*a = new ScanTable<int>(5);
	ASSERT_NO_THROW(Sort_table<int>*b = new Sort_table<int>(*a));
}
開發者ID:alesya-kuptsova,項目名稱:mp2-lab4-graph,代碼行數:5,代碼來源:test_table.cpp

示例6: TEST_F

TEST_F(TokensTest, MakeFromPrimThatNeedsNoValue_NoValue_ExhaustivePass) 
{
	ASSERT_NO_THROW( Token{ PrimativeToken::EndOfFile } );
    ASSERT_NO_THROW( Token{ PrimativeToken::LParen } );
    ASSERT_NO_THROW( Token{ PrimativeToken::RParen } );
    ASSERT_NO_THROW( Token{ PrimativeToken::Plus } );
    ASSERT_NO_THROW( Token{ PrimativeToken::Minus } );
    ASSERT_NO_THROW( Token{ PrimativeToken::Times } );
    ASSERT_NO_THROW( Token{ PrimativeToken::Equal } );
    ASSERT_NO_THROW( Token{ PrimativeToken::Assign } );
    ASSERT_NO_THROW( Token{ PrimativeToken::If } );
    ASSERT_NO_THROW( Token{ PrimativeToken::Then } );
    ASSERT_NO_THROW( Token{ PrimativeToken::Else } );
    ASSERT_NO_THROW( Token{ PrimativeToken::While } );
}
開發者ID:hcwndbyw,項目名稱:TigerCompiler_Cpp,代碼行數:15,代碼來源:TokensTest.cpp

示例7: TEST_F

TEST_F( LoadScene_test,PatchTestConstraint)
{
     ASSERT_TRUE(this->LoadScene("PatchTestConstraint.scn"));
     ASSERT_TRUE(this->initScene("PatchTestConstraint.scn"));
     ASSERT_NO_THROW(this->initScene("PatchTestConstraint.scn"));
}
開發者ID:ejeanvoi,項目名稱:sofa-kernel-cleaned,代碼行數:6,代碼來源:LoadScene_test.cpp

示例8: TEST_F

TEST_F(ConfigTests, test_bad_config_update) {
  std::string bad_json = "{\"options\": {},}";
  ASSERT_NO_THROW(Config::getInstance().update({{"bad_source", bad_json}}));
}
開發者ID:mgoffin,項目名稱:osquery,代碼行數:4,代碼來源:config_tests.cpp

示例9: TEST_F

TEST_F(lagi_option, get_existing_option) {
	agi::Options opt(conf_ok, default_opt, agi::Options::FLUSH_SKIP);
	ASSERT_NO_THROW(opt.Get("Valid"));
	ASSERT_NO_THROW(opt.Get("Valid")->GetString());
	EXPECT_STREQ("This is valid", opt.Get("Valid")->GetString().c_str());
}
開發者ID:seawaveT,項目名稱:Aegisub,代碼行數:6,代碼來源:option.cpp

示例10: TEST

 TEST(ApplicationCWrapper, RunDoesNotFailWithNullPtr)
 {
     ASSERT_NO_THROW(lac_apprun(nullptr));
 }
開發者ID:drmonkeysee,項目名稱:Laconomie-FirstDraft,代碼行數:4,代碼來源:application_cwrapper_tests.cpp

示例11: TEST

TEST(builder_test, empty_uri_doesnt_throw) {
  network::uri_builder builder;
  ASSERT_NO_THROW(builder.uri());
}
開發者ID:maeikei,項目名稱:uri,代碼行數:4,代碼來源:uri_builder_test.cpp

示例12: TEST

TEST(TParser, can_create_parser)
{
	char st[6] = { '2', '+', '5', '*', '2', '\0' };
	ASSERT_NO_THROW(TParser parser(st));
}
開發者ID:nik709,項目名稱:Stack,代碼行數:5,代碼來源:Test_parser.cpp


注:本文中的ASSERT_NO_THROW函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。