diff options
Diffstat (limited to 'project2/basics')
-rw-r--r-- | project2/basics/tests/equals.cpp | 1 | ||||
-rw-r--r-- | project2/basics/tests/greaterthan.cpp | 23 | ||||
-rw-r--r-- | project2/basics/tests/greaterthanorequal.cpp | 23 | ||||
-rw-r--r-- | project2/basics/tests/lessthan.cpp | 23 | ||||
-rw-r--r-- | project2/basics/tests/lessthanorequal.cpp | 23 | ||||
-rw-r--r-- | project2/basics/tests/notequals.cpp | 23 |
6 files changed, 115 insertions, 1 deletions
diff --git a/project2/basics/tests/equals.cpp b/project2/basics/tests/equals.cpp index 6c7a74f..a83a42d 100644 --- a/project2/basics/tests/equals.cpp +++ b/project2/basics/tests/equals.cpp @@ -1,7 +1,6 @@ #include <pch.hpp> #include <test.h> #include <scriptLoader.h> -#include <rowProcessor.h> class Equals : public Test { public: diff --git a/project2/basics/tests/greaterthan.cpp b/project2/basics/tests/greaterthan.cpp new file mode 100644 index 0000000..f029bfb --- /dev/null +++ b/project2/basics/tests/greaterthan.cpp @@ -0,0 +1,23 @@ +#include <pch.hpp> +#include <test.h> +#include <scriptLoader.h> + +class GreaterThan : public Test { + public: + GreaterThan(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("greaterthan", GreaterThan); + diff --git a/project2/basics/tests/greaterthanorequal.cpp b/project2/basics/tests/greaterthanorequal.cpp new file mode 100644 index 0000000..6da05f4 --- /dev/null +++ b/project2/basics/tests/greaterthanorequal.cpp @@ -0,0 +1,23 @@ +#include <pch.hpp> +#include <test.h> +#include <scriptLoader.h> + +class GreaterThanOrEqual : public Test { + public: + GreaterThanOrEqual(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("greaterthanorequal", GreaterThanOrEqual); + 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); + diff --git a/project2/basics/tests/lessthanorequal.cpp b/project2/basics/tests/lessthanorequal.cpp new file mode 100644 index 0000000..2b2b511 --- /dev/null +++ b/project2/basics/tests/lessthanorequal.cpp @@ -0,0 +1,23 @@ +#include <pch.hpp> +#include <test.h> +#include <scriptLoader.h> + +class LessThanOrEqual : public Test { + public: + LessThanOrEqual(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("lessthanorequal", LessThanOrEqual); + diff --git a/project2/basics/tests/notequals.cpp b/project2/basics/tests/notequals.cpp new file mode 100644 index 0000000..499ce61 --- /dev/null +++ b/project2/basics/tests/notequals.cpp @@ -0,0 +1,23 @@ +#include <pch.hpp> +#include <test.h> +#include <scriptLoader.h> + +class NotEquals : public Test { + public: + NotEquals(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("notequals", NotEquals); + |