test: Removed AstStyle::Verbose

This commit is contained in:
Daniel Marjamäki 2020-05-19 18:27:44 +02:00
parent 44a3501f1b
commit f5f7cb7ff7
1 changed files with 3 additions and 14 deletions

View File

@ -7377,10 +7377,8 @@ private:
ASSERT_EQUALS("a ? ( b < c ) : d > e", tokenizeAndStringify("a ? b < c : d > e"));
}
enum class AstStyle
{
enum class AstStyle {
Simple,
Verbose,
Z3
};
@ -7418,8 +7416,6 @@ private:
// Return stringified AST
if (style == AstStyle::Z3)
return tokenList.list.front()->astTop()->astStringZ3();
if (style == AstStyle::Verbose)
return tokenList.list.front()->astTop()->astStringVerbose();
std::string ret;
std::set<const Token *> astTop;
@ -7666,15 +7662,8 @@ private:
ASSERT_EQUALS("ab.i[j1+[", testAst("a.b[i][j+1]"));
// problems with: x=expr
ASSERT_EQUALS("=\n"
"|-x\n"
"`-(\n"
" `-.\n"
" |-[\n"
" | |-a\n"
" | `-i\n"
" `-f\n",
testAst("x = ((a[i]).f)();", AstStyle::Verbose));
ASSERT_EQUALS("(= x (( (. ([ a i) f)))",
testAst("x = ((a[i]).f)();", AstStyle::Z3));
ASSERT_EQUALS("abc.de.++[=", testAst("a = b.c[++(d.e)];"));
ASSERT_EQUALS("abc(1+=", testAst("a = b(c**)+1;"));
ASSERT_EQUALS("abc.=", testAst("a = (b).c;"));