Adding test utility class
authorDaniel Benusovich <flyingmonkeys1996@gmail.com>
Sat, 23 Feb 2019 18:17:44 +0000 (10:17 -0800)
committerDaniel Benusovich <flyingmonkeys1996@gmail.com>
Sat, 23 Feb 2019 18:17:44 +0000 (10:17 -0800)
TestUtil/test_helper.py [new file with mode: 0644]

diff --git a/TestUtil/test_helper.py b/TestUtil/test_helper.py
new file mode 100644 (file)
index 0000000..0d5329c
--- /dev/null
@@ -0,0 +1,11 @@
+# Verifies the given values via the requested operation
+# Arguments:
+#   p (Prefix): Appended to the front of the assert statement
+#   e (Expected): The expected value
+#   o (Output): The output result
+#   op (Operation): (0 => ==), (1 => !=)
+def check(p, o, e, op):
+    if(op == 0):
+        assert o == e, p + " Output " + str(o) + " Expected " + str(e)
+    else:
+        assert o != e, p + " Output " + str(o) + " Not Expecting " + str(e) 
\ No newline at end of file