diff options
author | Roland Reichwein <mail@reichwein.it> | 2020-10-24 16:32:18 +0200 |
---|---|---|
committer | Roland Reichwein <mail@reichwein.it> | 2020-10-24 16:32:18 +0200 |
commit | 1011655d2ef76a0c0aa29dbbff091dab139198e3 (patch) | |
tree | 63763828f259846f56285691805c187583ecb6bb /test-lexer.cpp | |
parent | 1349c00b782eca3ea841bfa388301cb6fc908cc7 (diff) |
Add FlowGraph
Diffstat (limited to 'test-lexer.cpp')
-rw-r--r-- | test-lexer.cpp | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/test-lexer.cpp b/test-lexer.cpp deleted file mode 100644 index 23983f1..0000000 --- a/test-lexer.cpp +++ /dev/null @@ -1,39 +0,0 @@ -#include "bnf.h" -#include "cpp.h" -#include "cppbnf.h" -#include "lexer.h" -#include "grammer.h" -#include "minicc.h" -#include "debug.h" - -#include <boost/algorithm/string.hpp> - -#include "gmock/gmock.h" -#include "gtest/gtest.h" - -#include <algorithm> -#include <cctype> -#include <deque> -#include <map> -#include <memory> -#include <string> -#include <utility> -#include <vector> - -class LexerTest: public ::testing::Test { -protected: - LexerTest(){ - debug = false; - } - ~LexerTest() override {} -}; - -TEST_F(LexerTest, Lex) { - auto bnf{SubBNF(CPPBNF::GetCppBNFLex(), "preprocessing-token")}; - - Lex::Lexer lexer(bnf, "preprocessing-token"); - - std::vector<Token> tokens{lexer.Lex("int main() { return 1; }")}; - - ASSERT_EQ(tokens.size(), 9); -} |