Skip to content

Commit e7a5e8b

Browse files
author
Alberto Cabrera
committed
Restored asserts to get a trace with a failing assert
Signed-off-by: Alberto Cabrera <[email protected]>
1 parent 33e674e commit e7a5e8b

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

sycl/test-e2e/syclcompat/math/math_compare.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,5 +396,6 @@ int main() {
396396
INSTANTIATE_ALL_CONTAINER_TYPES(fp_type_list, sycl::marray,
397397
test_unordered_compare_mask);
398398

399+
std::cerr << "If this is printed, the test was successful" << std::endl;
399400
return 1;
400401
}

sycl/test-e2e/syclcompat/math/math_fixt.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,8 @@ class BinaryOpTestLauncher : OpTestLauncher {
209209
syclcompat::wait();
210210
syclcompat::memcpy<ResultT>(&res_h_, res_, data_size_);
211211

212-
// CHECK(ResultT, res_h_, expected);
213212
CHECK_PRINT(ResultT, res_h_, expected);
213+
CHECK(ResultT, res_h_, expected);
214214
};
215215

216216
template <auto Kernel>
@@ -223,8 +223,8 @@ class BinaryOpTestLauncher : OpTestLauncher {
223223
syclcompat::wait();
224224
syclcompat::memcpy<ResultT>(&res_h_, res_, data_size_);
225225

226-
// CHECK(ResultT, res_h_, expected);
227226
CHECK_PRINT(ResultT, res_h_, expected);
227+
CHECK(ResultT, res_h_, expected);
228228
};
229229
template <auto Kernel>
230230
void launch_test(ValueT op1, ValueU op2, ResultT expected, bool expected_hi,
@@ -241,8 +241,8 @@ class BinaryOpTestLauncher : OpTestLauncher {
241241
syclcompat::memcpy<bool>(&res_hi_h_, res_hi_, 1);
242242
syclcompat::memcpy<bool>(&res_lo_h_, res_lo_, 1);
243243

244-
// CHECK(ResultT, res_h_, expected);
245244
CHECK_PRINT(ResultT, res_h_, expected);
245+
CHECK(ResultT, res_h_, expected);
246246
assert(res_hi_h_ == expected_hi);
247247
assert(res_lo_h_ == expected_lo);
248248
};

sycl/test-e2e/syclcompat/math/math_ops.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,5 +421,6 @@ int main() {
421421
INSTANTIATE_ALL_CONTAINER_TYPES(marray_type_list, sycl::marray,
422422
test_container_clamp);
423423

424+
std::cerr << "If this is printed, the test was successful" << std::endl;
424425
return 1; // INFO: Making it fail temporarily to trigger the CI log
425426
}

0 commit comments

Comments
 (0)