summaryrefslogtreecommitdiff
path: root/tiger-compiler/src/testsuite/tests-collector.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'tiger-compiler/src/testsuite/tests-collector.hxx')
-rw-r--r--tiger-compiler/src/testsuite/tests-collector.hxx21
1 files changed, 21 insertions, 0 deletions
diff --git a/tiger-compiler/src/testsuite/tests-collector.hxx b/tiger-compiler/src/testsuite/tests-collector.hxx
new file mode 100644
index 0000000..9570dc1
--- /dev/null
+++ b/tiger-compiler/src/testsuite/tests-collector.hxx
@@ -0,0 +1,21 @@
+#pragma once
+
+#include <testsuite/tests-collector.hh>
+
+namespace testsuite
+ {
+
+ inline std::vector<const ast::FunctionDec*>& TestsCollector::tests_get()
+ {
+ return tests_;
+ }
+
+ inline bool
+ TestsCollector::is_a_test_function(const ast::FunctionDec& node)
+ {
+ return node.name_get().get().starts_with("test_")
+ && node.formals_get().empty();
+ }
+
+
+ } // namespace testsuite