From 6fcfe0a5cf8f53658e50e346076768eec229e695 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Sun, 1 Mar 2020 22:34:35 +0100 Subject: Vector invalidation fix --- cpp.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'cpp.cpp') diff --git a/cpp.cpp b/cpp.cpp index f02b047..fc614be 100644 --- a/cpp.cpp +++ b/cpp.cpp @@ -82,6 +82,7 @@ std::pair> CPP::preprocessing_tokenize(const std: {" "}, {"\t"}, {"\n"}, {"\r"} }; Gram::Compiler compiler(bnf, "file"); + debug = true; std::pair> Tree = compiler.compile(m_charTokens); debug = true; @@ -246,12 +247,21 @@ protected: } }; +#if 0 TEST_F(CppTest, preprocessing_tokenize) { CPP cpp; auto ppTree = cpp.preprocessing_tokenize("int main() { return 1; }"); cpp.tokens_from_pptokens(ppTree); } +#endif + +TEST_F(CppTest, preprocessing_tokenize2) { + CPP cpp; + auto ppTree = cpp.preprocessing_tokenize("in ma"); + + cpp.tokens_from_pptokens(ppTree); +} #if 0 TEST(Cpp, translate) { -- cgit v1.2.3