summaryrefslogtreecommitdiff
path: root/tests.sh
diff options
context:
space:
mode:
authorMitja Felicijan <mitja.felicijan@gmail.com>2026-01-22 01:59:17 +0100
committerMitja Felicijan <mitja.felicijan@gmail.com>2026-01-22 01:59:17 +0100
commit4c3e1ce7822a9acd3444b954d0bdbccade603c38 (patch)
treefdf349078d54a5ff10676fbd7d20edafe868a082 /tests.sh
parentc7239b2906abb48110e3d41a18e94810af8ab915 (diff)
downloadcrep-4c3e1ce7822a9acd3444b954d0bdbccade603c38.tar.gz
Add C++ grammar
Diffstat (limited to 'tests.sh')
-rw-r--r--tests.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests.sh b/tests.sh
index 09f4190..6f3d7f1 100644
--- a/tests.sh
+++ b/tests.sh
@@ -70,6 +70,13 @@ run_test "JS Class" "MyClass" "$TEST_DIR/test.js" "class MyClass"
run_test "JS Method" "myMethod" "$TEST_DIR/test.js" "myMethod (x)"
run_test "JS Object Method" "shortMethod" "$TEST_DIR/test.js" "shortMethod (a)"
+# C++ Tests
+run_test "C++ Func" "global_hello" "$TEST_DIR/test.cpp" "void global_hello ()"
+run_test "C++ Namespace" "my_namespace" "$TEST_DIR/test.cpp" "namespace my_namespace"
+run_test "C++ Class" "MyClass" "$TEST_DIR/test.cpp" "class MyClass"
+run_test "C++ Struct" "MyStruct" "$TEST_DIR/test.cpp" "struct MyStruct"
+run_test "C++ Method" "myMethod" "$TEST_DIR/test.cpp" "void myMethod ()"
+
echo "----------------"
if [ $failed -eq 0 ]; then
echo "All tests passed!"