-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[AST] Simplify string comparisons (NFC) #141189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[AST] Simplify string comparisons (NFC) #141189
Conversation
@llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) ChangesFull diff: https://github.com/llvm/llvm-project/pull/141189.diff 1 Files Affected:
diff --git a/clang/unittests/AST/DeclTest.cpp b/clang/unittests/AST/DeclTest.cpp
index 16aa2b50b7a06..ed635da683aab 100644
--- a/clang/unittests/AST/DeclTest.cpp
+++ b/clang/unittests/AST/DeclTest.cpp
@@ -104,8 +104,9 @@ TEST(Decl, AsmLabelAttr) {
MC->mangleName(DeclG, OS_G);
}
- ASSERT_TRUE(0 == MangleF.compare("\x01" "foo"));
- ASSERT_TRUE(0 == MangleG.compare("goo"));
+ ASSERT_EQ(MangleF, "\x01"
+ "foo");
+ ASSERT_EQ(MangleG, "goo");
}
TEST(Decl, MangleDependentSizedArray) {
@@ -138,8 +139,8 @@ TEST(Decl, MangleDependentSizedArray) {
MC->mangleCanonicalTypeName(DeclA->getType(), OS_A);
MC->mangleCanonicalTypeName(DeclB->getType(), OS_B);
- ASSERT_TRUE(0 == MangleA.compare("_ZTSA_i"));
- ASSERT_TRUE(0 == MangleB.compare("_ZTSAT0__T_"));
+ ASSERT_EQ(MangleA, "_ZTSA_i");
+ ASSERT_EQ(MangleB, "_ZTSAT0__T_");
}
TEST(Decl, ConceptDecl) {
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/174/builds/18225 Here is the relevant piece of the build log for the reference
|
No description provided.