projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4d9cc7c
)
ORTRT: Add tests for string_view equality and inequality operators
author
David Blaikie
<dblaikie@gmail.com>
Wed, 9 Jun 2021 00:53:24 +0000
(17:53 -0700)
committer
David Blaikie
<dblaikie@gmail.com>
Wed, 9 Jun 2021 00:53:59 +0000
(17:53 -0700)
compiler-rt/lib/orc/unittests/adt_test.cpp
patch
|
blob
|
history
diff --git
a/compiler-rt/lib/orc/unittests/adt_test.cpp
b/compiler-rt/lib/orc/unittests/adt_test.cpp
index
098ae1e
..
3c34b87
100644
(file)
--- 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"));
+}