File tree Expand file tree Collapse file tree 3 files changed +20
-6
lines changed
utils/bazel/llvm-project-overlay/libc/test/src/string Expand file tree Collapse file tree 3 files changed +20
-6
lines changed Original file line number Diff line number Diff line change 9
9
#include " memory_utils/memory_check_utils.h"
10
10
#include " src/string/bcmp.h"
11
11
#include " test/UnitTest/Test.h"
12
+ #include " test/UnitTest/TestLogger.h"
12
13
13
14
namespace __llvm_libc {
14
15
@@ -51,7 +52,10 @@ TEST(LlvmLibcBcmpTest, SizeSweep) {
51
52
for (size_t size = 0 ; size < kMaxSize ; ++size) {
52
53
auto span1 = Buffer1.span ().subspan (0 , size);
53
54
auto span2 = Buffer2.span ().subspan (0 , size);
54
- ASSERT_TRUE ((CheckBcmp<Impl>(span1, span2, size)));
55
+ const bool OK = CheckBcmp<Impl>(span1, span2, size);
56
+ if (!OK)
57
+ testing::tlog << " Failed at size=" << size << ' \n ' ;
58
+ ASSERT_TRUE (OK);
55
59
}
56
60
}
57
61
Original file line number Diff line number Diff line change 9
9
#include " memory_utils/memory_check_utils.h"
10
10
#include " src/string/memcmp.h"
11
11
#include " test/UnitTest/Test.h"
12
+ #include " test/UnitTest/TestLogger.h"
12
13
13
14
namespace __llvm_libc {
14
15
@@ -51,7 +52,10 @@ TEST(LlvmLibcMemcmpTest, SizeSweep) {
51
52
for (size_t size = 0 ; size < kMaxSize ; ++size) {
52
53
auto span1 = Buffer1.span ().subspan (0 , size);
53
54
auto span2 = Buffer2.span ().subspan (0 , size);
54
- ASSERT_TRUE ((CheckMemcmp<Impl>(span1, span2, size)));
55
+ const bool OK = CheckMemcmp<Impl>(span1, span2, size);
56
+ if (!OK)
57
+ testing::tlog << " Failed at size=" << size << ' \n ' ;
58
+ ASSERT_TRUE (OK);
55
59
}
56
60
}
57
61
Original file line number Diff line number Diff line change @@ -150,9 +150,9 @@ libc_test(
150
150
"//libc:memmove" ,
151
151
],
152
152
deps = [
153
+ ":memory_check_utils" ,
153
154
"//libc:__support_cpp_span" ,
154
155
"//libc/test/UnitTest:memory_matcher" ,
155
- ":memory_check_utils" ,
156
156
],
157
157
)
158
158
@@ -163,9 +163,9 @@ libc_test(
163
163
"//libc:bcopy" ,
164
164
],
165
165
deps = [
166
+ ":memory_check_utils" ,
166
167
"//libc:__support_cpp_span" ,
167
168
"//libc/test/UnitTest:memory_matcher" ,
168
- ":memory_check_utils" ,
169
169
],
170
170
)
171
171
@@ -175,7 +175,10 @@ libc_test(
175
175
libc_function_deps = [
176
176
"//libc:memcmp" ,
177
177
],
178
- deps = [":memory_check_utils" ],
178
+ deps = [
179
+ ":memory_check_utils" ,
180
+ "//libc/test/UnitTest:test_logger" ,
181
+ ],
179
182
)
180
183
181
184
libc_test (
@@ -184,7 +187,10 @@ libc_test(
184
187
libc_function_deps = [
185
188
"//libc:bcmp" ,
186
189
],
187
- deps = [":memory_check_utils" ],
190
+ deps = [
191
+ ":memory_check_utils" ,
192
+ "//libc/test/UnitTest:test_logger" ,
193
+ ],
188
194
)
189
195
190
196
libc_test (
You can’t perform that action at this time.
0 commit comments