mirror of
https://github.com/yhirose/cpp-peglib.git
synced 2024-12-23 04:15:31 +00:00
Use catch2 for unit testing
This commit is contained in:
parent
a517ce6622
commit
0dfe7a22c1
13050
test/catch.hh
Normal file
13050
test/catch.hh
Normal file
File diff suppressed because it is too large
Load Diff
9427
test/catch.hpp
9427
test/catch.hpp
File diff suppressed because it is too large
Load Diff
14
test/test.cc
14
test/test.cc
@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
#define CATCH_CONFIG_MAIN
|
#define CATCH_CONFIG_MAIN
|
||||||
#include "catch.hpp"
|
#include "catch.hh"
|
||||||
|
|
||||||
#include <peglib.h>
|
#include <peglib.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
@ -735,7 +735,7 @@ TEST_CASE("Missing missing definitions test", "[general]")
|
|||||||
" A <- B C "
|
" A <- B C "
|
||||||
);
|
);
|
||||||
|
|
||||||
REQUIRE(parser == false);
|
REQUIRE(!parser);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_CASE("Definition duplicates test", "[general]")
|
TEST_CASE("Definition duplicates test", "[general]")
|
||||||
@ -745,7 +745,7 @@ TEST_CASE("Definition duplicates test", "[general]")
|
|||||||
" A <- ''"
|
" A <- ''"
|
||||||
);
|
);
|
||||||
|
|
||||||
REQUIRE(parser == false);
|
REQUIRE(!parser);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_CASE("Left recursive test", "[left recursive]")
|
TEST_CASE("Left recursive test", "[left recursive]")
|
||||||
@ -755,7 +755,7 @@ TEST_CASE("Left recursive test", "[left recursive]")
|
|||||||
" B <- A 'a'"
|
" B <- A 'a'"
|
||||||
);
|
);
|
||||||
|
|
||||||
REQUIRE(parser == false);
|
REQUIRE(!parser);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_CASE("Left recursive with option test", "[left recursive]")
|
TEST_CASE("Left recursive with option test", "[left recursive]")
|
||||||
@ -765,7 +765,7 @@ TEST_CASE("Left recursive with option test", "[left recursive]")
|
|||||||
" B <- A "
|
" B <- A "
|
||||||
);
|
);
|
||||||
|
|
||||||
REQUIRE(parser == false);
|
REQUIRE(!parser);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_CASE("Left recursive with zom test", "[left recursive]")
|
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* "
|
" A <- 'a'* A* "
|
||||||
);
|
);
|
||||||
|
|
||||||
REQUIRE(parser == false);
|
REQUIRE(!parser);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_CASE("Left recursive with empty string test", "[left recursive]")
|
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"
|
" A <- '' A"
|
||||||
);
|
);
|
||||||
|
|
||||||
REQUIRE(parser == false);
|
REQUIRE(!parser);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_CASE("Semantic predicate test", "[predicate]")
|
TEST_CASE("Semantic predicate test", "[predicate]")
|
||||||
|
Loading…
Reference in New Issue
Block a user