From 65e5812f5b88989ea3ce4ac232f882004c60cc73 Mon Sep 17 00:00:00 2001 From: mzuenni Date: Thu, 5 Sep 2024 14:20:50 +0200 Subject: more tests --- test/datastructures/stlRope.cpp.awk | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 test/datastructures/stlRope.cpp.awk (limited to 'test/datastructures/stlRope.cpp.awk') diff --git a/test/datastructures/stlRope.cpp.awk b/test/datastructures/stlRope.cpp.awk new file mode 100644 index 0000000..e19b8fd --- /dev/null +++ b/test/datastructures/stlRope.cpp.awk @@ -0,0 +1,27 @@ +/rope v;/ { + print "void test() {" + print "ll num = 5;" + print "ll start = 2;" + print "ll length = 4;" + print "ll offset = 3;" +} +/v.push_back(num);/ { + print "v.push_back(0);" + print "v.push_back(1);" + print "v.push_back(2);" + print "v.push_back(3);" + print "v.push_back(4);" +} +/rope sub/ { + print "v.push_back(6);" + print "v.push_back(7);" +} +/for\(auto it/ { + print "vector got, expected = {0,1,6,2,3,4,5,7};" +} +END { + print " got.push_back(*it)" + print "if (got != expected) cerr << \"error\" << endl;" + print "}" +} +{ print } -- cgit v1.2.3