From ff791fdeb3e62947ec66823dcfba6010ffedca78 Mon Sep 17 00:00:00 2001 From: cxl Date: Fri, 21 Sep 2018 08:00:50 +0000 Subject: [PATCH] .upptst git-svn-id: svn://ultimatepp.org/upp/trunk@12293 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- autotest/CppParser/CppParser.cpp | 10 ++++++++-- autotest/CppParser/CppParser.upp | 4 +++- autotest/CppParser/test46.in | 2 ++ autotest/CppParser/test46.out | 6 ++++++ 4 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 autotest/CppParser/test46.in create mode 100644 autotest/CppParser/test46.out diff --git a/autotest/CppParser/CppParser.cpp b/autotest/CppParser/CppParser.cpp index 869cad417..40561e334 100644 --- a/autotest/CppParser/CppParser.cpp +++ b/autotest/CppParser/CppParser.cpp @@ -48,7 +48,7 @@ void Test(const char *path, int filetype) const Array& ma = base[i]; for(int j = 0; j < ma.GetCount(); j++) { const CppItem& m = ma[j]; - out << '\t' << CppItemKindAsString(m.kind) << ", name: " << m.name << ", qitem: " << m.qitem + out << '\t' << CppItemKindAsString(m.kind) << ", name: " << m.name << ", qitem: " << m.qitem << ", qtype: " << m.qtype << ", qptype: " << m.qptype << ", natural: " << m.natural @@ -56,7 +56,7 @@ void Test(const char *path, int filetype) << ", using " << m.using_namespaces; if(m.isptr) out << ", pointer"; - out << "\n"; + out << "\n"; } out << "}\n"; } @@ -89,6 +89,12 @@ void Test(const char *path, int filetype) CONSOLE_APP_MAIN { StdLogSetup(LOG_COUT|LOG_FILE); + + if(CommandLine().GetCount()) { + int ii = atoi(CommandLine()[0]); + String p = GetDataFile("test" + AsString(ii) + ".in"); + Test(p, FILE_H); + } for(int i = 0; i < 10000; i++) { String p = GetDataFile("test" + AsString(i) + ".in"); diff --git a/autotest/CppParser/CppParser.upp b/autotest/CppParser/CppParser.upp index 8843f3c1f..ecce5f2d7 100644 --- a/autotest/CppParser/CppParser.upp +++ b/autotest/CppParser/CppParser.upp @@ -95,7 +95,9 @@ file test44.in, test44.out, test45.in, - test45.out; + test45.out, + test46.in, + test46.out; mainconfig "" = "", diff --git a/autotest/CppParser/test46.in b/autotest/CppParser/test46.in new file mode 100644 index 000000000..f5d189be7 --- /dev/null +++ b/autotest/CppParser/test46.in @@ -0,0 +1,2 @@ +Vector > test1; +Vector> test2; \ No newline at end of file diff --git a/autotest/CppParser/test46.out b/autotest/CppParser/test46.out new file mode 100644 index 000000000..edf76ca56 --- /dev/null +++ b/autotest/CppParser/test46.out @@ -0,0 +1,6 @@ + { + VARIABLE, name: test1, qitem: test1, qtype: Vector>, qptype: , natural: Vector > test1, line 1, using + VARIABLE, name: test2, qitem: test2, qtype: Vector>, qptype: , natural: Vector> test2, line 2, using +} + { +} \ No newline at end of file