aboutsummaryrefslogtreecommitdiff
path: root/test/string.cpp
diff options
context:
space:
mode:
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);
+}
+
+
+