diff --git a/docs/list-of-examples.md b/docs/list-of-examples.md index 642d4d23..a919408a 100644 --- a/docs/list-of-examples.md +++ b/docs/list-of-examples.md @@ -3,7 +3,6 @@ ## Already available -- Catch main: [Catch-provided main](../examples/000-CatchMain.cpp) - Test Case: [Single-file](../examples/010-TestCase.cpp) - Test Case: [Multiple-file 1](../examples/020-TestCase-1.cpp), [2](../examples/020-TestCase-2.cpp) - Assertion: [REQUIRE, CHECK](../examples/030-Asn-Require-Check.cpp) diff --git a/examples/000-CatchMain.cpp b/examples/000-CatchMain.cpp deleted file mode 100644 index 5d06bd98..00000000 --- a/examples/000-CatchMain.cpp +++ /dev/null @@ -1,13 +0,0 @@ -// 000-CatchMain.cpp - -// It is generally recommended to have a single file provide the main -// of a testing binary, and other test files to link against it. - -// Let Catch provide main(): -#include - -// That's it - -// Compile implementation of Catch for use with files that do contain tests: -// - g++ -std=c++11 -Wall -I$(CATCH_SINGLE_INCLUDE) -c 000-CatchMain.cpp -// - cl -EHsc -I%CATCH_SINGLE_INCLUDE% -c 000-CatchMain.cpp diff --git a/examples/030-Asn-Require-Check.cpp b/examples/030-Asn-Require-Check.cpp index f638afae..4efb2194 100644 --- a/examples/030-Asn-Require-Check.cpp +++ b/examples/030-Asn-Require-Check.cpp @@ -8,7 +8,7 @@ // - REQUIRE_FALSE() stops at first failure. // - CHECK_FALSE() continues after failure. -// main() provided in 000-CatchMain.cpp +// main() provided by linkage to Catch2WithMain #include @@ -53,8 +53,8 @@ TEST_CASE( "Assert that something is false (continue after failure)", "[check-fa } // Compile & run: -// - g++ -std=c++11 -Wall -I$(CATCH_SINGLE_INCLUDE) -o 030-Asn-Require-Check 030-Asn-Require-Check.cpp 000-CatchMain.o && 030-Asn-Require-Check --success -// - cl -EHsc -I%CATCH_SINGLE_INCLUDE% 030-Asn-Require-Check.cpp 000-CatchMain.obj && 030-Asn-Require-Check --success +// - g++ -std=c++11 -Wall -I$(CATCH_SINGLE_INCLUDE) -o 030-Asn-Require-Check 030-Asn-Require-Check.cpp && 030-Asn-Require-Check --success +// - cl -EHsc -I%CATCH_SINGLE_INCLUDE% 030-Asn-Require-Check.cpp && 030-Asn-Require-Check --success // Expected compact output (all assertions): // diff --git a/examples/100-Fix-Section.cpp b/examples/100-Fix-Section.cpp index 6ec5ee80..7c6d614c 100644 --- a/examples/100-Fix-Section.cpp +++ b/examples/100-Fix-Section.cpp @@ -4,7 +4,7 @@ // - Sections (this file) // - Traditional class-based fixtures -// main() provided in 000-CatchMain.cpp +// main() provided by linkage to Catch2WithMain #include #include @@ -45,8 +45,8 @@ TEST_CASE( "vectors can be sized and resized", "[vector]" ) { } // Compile & run: -// - g++ -std=c++11 -Wall -I$(CATCH_SINGLE_INCLUDE) -o 100-Fix-Section 100-Fix-Section.cpp 000-CatchMain.o && 100-Fix-Section --success -// - cl -EHsc -I%CATCH_SINGLE_INCLUDE% 100-Fix-Section.cpp 000-CatchMain.obj && 100-Fix-Section --success +// - g++ -std=c++11 -Wall -I$(CATCH_SINGLE_INCLUDE) -o 100-Fix-Section 100-Fix-Section.cpp && 100-Fix-Section --success +// - cl -EHsc -I%CATCH_SINGLE_INCLUDE% 100-Fix-Section.cpp && 100-Fix-Section --success // Expected compact output (all assertions): // diff --git a/examples/110-Fix-ClassFixture.cpp b/examples/110-Fix-ClassFixture.cpp index 38617a3b..20601ac6 100644 --- a/examples/110-Fix-ClassFixture.cpp +++ b/examples/110-Fix-ClassFixture.cpp @@ -4,7 +4,7 @@ // - Sections // - Traditional class-based fixtures (this file) -// main() provided in 000-CatchMain.cpp +// main() provided by linkage to Catch2WithMain #include @@ -52,8 +52,8 @@ TEST_CASE_METHOD( UniqueTestsFixture, "Create Employee/Normal", "[create]" ) { } // Compile & run: -// - g++ -std=c++11 -Wall -I$(CATCH_SINGLE_INCLUDE) -o 110-Fix-ClassFixture 110-Fix-ClassFixture.cpp 000-CatchMain.o && 110-Fix-ClassFixture --success -// - cl -EHsc -I%CATCH_SINGLE_INCLUDE% 110-Fix-ClassFixture.cpp 000-CatchMain.obj && 110-Fix-ClassFixture --success +// - g++ -std=c++11 -Wall -I$(CATCH_SINGLE_INCLUDE) -o 110-Fix-ClassFixture 110-Fix-ClassFixture.cpp && 110-Fix-ClassFixture --success +// - cl -EHsc -I%CATCH_SINGLE_INCLUDE% 110-Fix-ClassFixture.cpp && 110-Fix-ClassFixture --success // Expected compact output (all assertions): // diff --git a/examples/120-Bdd-ScenarioGivenWhenThen.cpp b/examples/120-Bdd-ScenarioGivenWhenThen.cpp index 97336a70..c2d443a4 100644 --- a/examples/120-Bdd-ScenarioGivenWhenThen.cpp +++ b/examples/120-Bdd-ScenarioGivenWhenThen.cpp @@ -1,6 +1,6 @@ // 120-Bdd-ScenarioGivenWhenThen.cpp -// main() provided in 000-CatchMain.cpp +// main() provided by linkage with Catch2WithMain #include @@ -48,8 +48,8 @@ SCENARIO( "vectors can be sized and resized", "[vector]" ) { } // Compile & run: -// - g++ -std=c++11 -Wall -I$(CATCH_SINGLE_INCLUDE) -o 120-Bdd-ScenarioGivenWhenThen 120-Bdd-ScenarioGivenWhenThen.cpp 000-CatchMain.o && 120-Bdd-ScenarioGivenWhenThen --success -// - cl -EHsc -I%CATCH_SINGLE_INCLUDE% 120-Bdd-ScenarioGivenWhenThen.cpp 000-CatchMain.obj && 120-Bdd-ScenarioGivenWhenThen --success +// - g++ -std=c++11 -Wall -I$(CATCH_SINGLE_INCLUDE) -o 120-Bdd-ScenarioGivenWhenThen 120-Bdd-ScenarioGivenWhenThen.cpp && 120-Bdd-ScenarioGivenWhenThen --success +// - cl -EHsc -I%CATCH_SINGLE_INCLUDE% 120-Bdd-ScenarioGivenWhenThen.cpp && 120-Bdd-ScenarioGivenWhenThen --success // Expected compact output (all assertions): // diff --git a/examples/210-Evt-EventListeners.cpp b/examples/210-Evt-EventListeners.cpp index 5468112e..956d3c3e 100644 --- a/examples/210-Evt-EventListeners.cpp +++ b/examples/210-Evt-EventListeners.cpp @@ -420,8 +420,8 @@ TEST_CASE_METHOD( Fixture, "3: Testcase with class-based fixture", "[tag-C][tag- } // Compile & run: -// - g++ -std=c++11 -Wall -I$(CATCH_SINGLE_INCLUDE) -o 210-Evt-EventListeners 210-Evt-EventListeners.cpp 000-CatchMain.o && 210-Evt-EventListeners --success -// - cl -EHsc -I%CATCH_SINGLE_INCLUDE% 210-Evt-EventListeners.cpp 000-CatchMain.obj && 210-Evt-EventListeners --success +// - g++ -std=c++11 -Wall -I$(CATCH_SINGLE_INCLUDE) -o 210-Evt-EventListeners 210-Evt-EventListeners.cpp && 210-Evt-EventListeners --success +// - cl -EHsc -I%CATCH_SINGLE_INCLUDE% 210-Evt-EventListeners.cpp && 210-Evt-EventListeners --success // Expected compact output (all assertions): //