Skip to content

Commit

Permalink
Modify the test
Browse files Browse the repository at this point in the history
  • Loading branch information
fineg74 committed Sep 11, 2024
1 parent b90c36d commit 6c24f23
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions sycl/test-e2e/ESIMD/assert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ int main() {
esimd_test::printTestLabel(Q);

try {
Q.parallel_for(range<1>{100}, [=](id<1> Id) SYCL_ESIMD_KERNEL {
assert(Id != 31 && "assert message31");
// CHECK: Assert called: Id != 31 && "assert message31"
// CHECK: assert.cpp, Line 29, Function auto main()::(anonymous class)::operator()(id<1>) const, gid(31, 0, 0), lid(3, 0, 0)
}).wait();
Q.parallel_for(nd_range<1>{8, 16},
[=](sycl::nd_item<1> Id) SYCL_ESIMD_KERNEL {
assert(Id.get_global_id(0) != 3 && "assert message3");
// CHECK: Assert called: Id != 31 && "assert message31"
// CHECK: assert.cpp, Line 29, Function auto main()::(anonymous class)::operator()(id<1>) const, gid(31, 0, 0), lid(3, 0, 0)
})
.wait();
} catch (sycl::exception const &e) {
std::cerr << "SYCL exception caught: " << e.what() << '\n';
return 1;
Expand Down

0 comments on commit 6c24f23

Please sign in to comment.