aboutsummaryrefslogtreecommitdiff
path: root/test/string.cpp
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-11-02 14:44:25 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2024-11-02 14:44:25 +0100
commit369e3d71aa79783d95166739cfa93a480defe6ea (patch)
treecc4e590da6d98fc891ce3488cc150ffa10173520 /test/string.cpp
parent815ec66a68c01dc4a8f0c5ec6c9193a71e7547e2 (diff)
more cleanup + add give command to test things
Diffstat (limited to 'test/string.cpp')
-rw-r--r--test/string.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/string.cpp b/test/string.cpp
new file mode 100644
index 0000000..dc329e3
--- /dev/null
+++ b/test/string.cpp
@@ -0,0 +1,24 @@
+#include <gtest/gtest.h>
+
+#include "backend/String.h"
+
+TEST(StringTest, OperatorEqual) {
+ String a = "foo";
+ String b = "foo";
+ ASSERT_TRUE(a == b);
+
+ b = "bar";
+ ASSERT_FALSE(a == b);
+}
+
+TEST(StringTest, OperatorNotEqual) {
+ String a = "foo";
+ String b = "foo";
+ ASSERT_FALSE(a != b);
+
+ b = "bar";
+ ASSERT_TRUE(a != b);
+}
+
+
+