#include "bnf.h" #include "cpp.h" #include "cppbnf.h" #include "lexer.h" #include "grammer.h" #include "minicc.h" #include "debug.h" #include #include "gmock/gmock.h" #include "gtest/gtest.h" #include #include #include #include #include #include #include #include class CppBnfTest: public ::testing::Test { protected: CppBnfTest() { //debug = true; } ~CppBnfTest() { } }; TEST_F(CppBnfTest, LexicalBnf) { auto bnf = SubBNF(CPPBNF::GetCppBNFLex(), "preprocessing-token"); EXPECT_TRUE(CPPBNF::valid(bnf)); EXPECT_TRUE(CPPBNF::validLex(bnf)); } TEST_F(CppBnfTest, GrammarBnf) { auto bnf = SubBNF(CPPBNF::GetCppBNFGram(), "translation-unit"); EXPECT_TRUE(CPPBNF::valid(bnf)); }