Integrate tests for #1394 into our test suite

This commit is contained in:
Martin Hořeňovský committed 2019-01-18 15:14:17 +01:00
1 parent d084162b2f
commit 8989c9b560
6 files changed
+72 -47

No files matched your search

@@ -324,3 +324,33 @@ TEST_CASE( "Tracker" ) {
// two sections within a generator
}
}
static bool previouslyRun = false;
static bool previouslyRunNested = false;
TEST_CASE( "#1394", "[.][approvals][tracker]" ) {
// -- Don't re-run after specified section is done
REQUIRE(previouslyRun == false);
SECTION( "RunSection" ) {
previouslyRun = true;
}
SECTION( "SkipSection" ) {
// cause an error if this section is called because it shouldn't be
REQUIRE(1 == 0);
}
}
TEST_CASE( "#1394 nested", "[.][approvals][tracker]" ) {
REQUIRE(previouslyRunNested == false);
SECTION( "NestedRunSection" ) {
SECTION( "s1" ) {
previouslyRunNested = true;
}
}
SECTION( "NestedSkipSection" ) {
// cause an error if this section is called because it shouldn't be
REQUIRE(1 == 0);
}
}