summaryrefslogtreecommitdiff
path: root/project2/basics/tests/lessthan.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'project2/basics/tests/lessthan.cpp')
-rw-r--r--project2/basics/tests/lessthan.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/project2/basics/tests/lessthan.cpp b/project2/basics/tests/lessthan.cpp
new file mode 100644
index 0000000..78b111f
--- /dev/null
+++ b/project2/basics/tests/lessthan.cpp
@@ -0,0 +1,23 @@
+#include <pch.hpp>
+#include <test.h>
+#include <scriptLoader.h>
+
+class LessThan : public Test {
+ public:
+ LessThan(ScriptNodePtr s) :
+ SourceObject(s),
+ Test(s),
+ a(s, "a"),
+ b(s, "b")
+ {
+ }
+
+ bool passes(ExecContext * ec) const {
+ return (a(ec) < b(ec));
+ }
+
+ private:
+ Variable a, b;
+};
+DECLARE_LOADER("lessthan", LessThan);
+