[compiler-rt] 8051a48 - ORTRT: Add tests for string_view equality and inequality operators
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 8 17:54:13 PDT 2021
Author: David Blaikie
Date: 2021-06-08T17:53:59-07:00
New Revision: 8051a48e65cc78ccedc9bbd590dbc34a21a07184
URL: https://github.com/llvm/llvm-project/commit/8051a48e65cc78ccedc9bbd590dbc34a21a07184
DIFF: https://github.com/llvm/llvm-project/commit/8051a48e65cc78ccedc9bbd590dbc34a21a07184.diff
LOG: ORTRT: Add tests for string_view equality and inequality operators
Added:
Modified:
compiler-rt/lib/orc/unittests/adt_test.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/orc/unittests/adt_test.cpp b/compiler-rt/lib/orc/unittests/adt_test.cpp
index 098ae1e21fb6..3c34b87f6861 100644
--- a/compiler-rt/lib/orc/unittests/adt_test.cpp
+++ b/compiler-rt/lib/orc/unittests/adt_test.cpp
@@ -78,3 +78,10 @@ TEST(ADTTest, StringViewConstructFromCharPtr) {
for (unsigned I = 0; I != S.size(); ++I)
EXPECT_EQ(S[I], Str[I]) << "Unexpected span element value";
}
+
+TEST(ADTTest, StringViewEquality) {
+ EXPECT_EQ("", string_view());
+ EXPECT_FALSE(string_view("aab") == string_view("aac"));
+ EXPECT_FALSE(string_view("aab") != string_view("aab"));
+ EXPECT_NE(string_view("aab"), string_view("aac"));
+}
More information about the llvm-commits
mailing list