From: David Blaikie Date: Wed, 9 Jun 2021 00:53:24 +0000 (-0700) Subject: ORTRT: Add tests for string_view equality and inequality operators X-Git-Tag: llvmorg-14-init~4493 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8051a48e65cc78ccedc9bbd590dbc34a21a07184;p=platform%2Fupstream%2Fllvm.git ORTRT: Add tests for string_view equality and inequality operators --- diff --git a/compiler-rt/lib/orc/unittests/adt_test.cpp b/compiler-rt/lib/orc/unittests/adt_test.cpp index 098ae1e..3c34b87 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")); +}