[compiler-rt] r176479 - [Sanitizer] fix signed-unsigned mismatch in test and use correct order of EXPECT_EQ() args
Alexey Samsonov
samsonov at google.com
Tue Mar 5 04:23:07 PST 2013
Author: samsonov
Date: Tue Mar 5 06:23:07 2013
New Revision: 176479
URL: http://llvm.org/viewvc/llvm-project?rev=176479&view=rev
Log:
[Sanitizer] fix signed-unsigned mismatch in test and use correct order of EXPECT_EQ() args
Modified:
compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_common_test.cc
Modified: compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_common_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_common_test.cc?rev=176479&r1=176478&r2=176479&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_common_test.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_common_test.cc Tue Mar 5 06:23:07 2013
@@ -99,16 +99,16 @@ TEST(SanitizerCommon, SanitizerSetThread
TEST(SanitizerCommon, InternalVector) {
InternalVector<uptr> vector(1);
for (uptr i = 0; i < 100; i++) {
- EXPECT_EQ(vector.size(), i);
+ EXPECT_EQ(i, vector.size());
vector.push_back(i);
}
for (uptr i = 0; i < 100; i++) {
- EXPECT_EQ(vector[i], i);
+ EXPECT_EQ(i, vector[i]);
}
for (int i = 99; i >= 0; i--) {
- EXPECT_EQ(vector.back(), i);
+ EXPECT_EQ((uptr)i, vector.back());
vector.pop_back();
- EXPECT_EQ(vector.size(), i);
+ EXPECT_EQ((uptr)i, vector.size());
}
}
More information about the llvm-commits
mailing list