Use catch2 for unit testing

This commit is contained in:
yhirose 2018-05-28 21:06:23 -04:00
parent a517ce6622
commit 0dfe7a22c1
3 changed files with 13057 additions and 9434 deletions

13050
test/catch.hh Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@

#define CATCH_CONFIG_MAIN
#include "catch.hpp"
#include "catch.hh"
#include <peglib.h>
#include <iostream>
@ -735,7 +735,7 @@ TEST_CASE("Missing missing definitions test", "[general]")
" A <- B C "
);
REQUIRE(parser == false);
REQUIRE(!parser);
}
TEST_CASE("Definition duplicates test", "[general]")
@ -745,7 +745,7 @@ TEST_CASE("Definition duplicates test", "[general]")
" A <- ''"
);
REQUIRE(parser == false);
REQUIRE(!parser);
}
TEST_CASE("Left recursive test", "[left recursive]")
@ -755,7 +755,7 @@ TEST_CASE("Left recursive test", "[left recursive]")
" B <- A 'a'"
);
REQUIRE(parser == false);
REQUIRE(!parser);
}
TEST_CASE("Left recursive with option test", "[left recursive]")
@ -765,7 +765,7 @@ TEST_CASE("Left recursive with option test", "[left recursive]")
" B <- A "
);
REQUIRE(parser == false);
REQUIRE(!parser);
}
TEST_CASE("Left recursive with zom test", "[left recursive]")
@ -774,7 +774,7 @@ TEST_CASE("Left recursive with zom test", "[left recursive]")
" A <- 'a'* A* "
);
REQUIRE(parser == false);
REQUIRE(!parser);
}
TEST_CASE("Left recursive with empty string test", "[left recursive]")
@ -783,7 +783,7 @@ TEST_CASE("Left recursive with empty string test", "[left recursive]")
" A <- '' A"
);
REQUIRE(parser == false);
REQUIRE(!parser);
}
TEST_CASE("Semantic predicate test", "[predicate]")