Skip to content

Commit 56d21c0

Browse files
Update tests for new static_assert message format
1 parent c62dd3f commit 56d21c0

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

sycl/test/basic_tests/buffer/buffer_for_not_device_copyable.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ int main() {
1313
static_assert(!is_device_copyable_v<std::string>);
1414
std::vector<std::string> sv{"hello", "sycl", "world"};
1515
buffer b2(sv.data(), range<1>(3));
16-
//expected-error@CL/sycl/buffer.hpp:* {{"'std::string' is not a device copyable type"}}
16+
//expected-error@CL/sycl/buffer.hpp:* {{'std::string' is not a device copyable type}}
1717

1818
return 0;
1919
}

sycl/test/basic_tests/single_task_error_message.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ int main() {
1010
{
1111
myQueue
1212
.single_task([&](sycl::handler &cgh) {
13-
// expected-error-re@CL/sycl/queue.hpp:* {{static_assert failed due to requirement '{{.*}}' "sycl::queue.single_task() requires a kernel instead of command group.{{.*}} Use queue.submit() instead"}}
13+
// expected-error-re@CL/sycl/queue.hpp:* {{static_assert failed due to requirement '{{.*}}': sycl::queue.single_task() requires a kernel instead of command group.{{.*}} Use queue.submit() instead}}
1414
// expected-error-re@CL/sycl/detail/cg_types.hpp:* {{no matching function for call to object of type '(lambda at {{.*}}single_task_error_message.cpp:{{.*}})'}}
1515
})
1616
.wait();
@@ -26,7 +26,7 @@ int main() {
2626
myQueue
2727
.single_task(e,
2828
[&](sycl::handler &cgh) {
29-
// expected-error-re@CL/sycl/queue.hpp:* {{static_assert failed due to requirement '{{.*}}' "sycl::queue.single_task() requires a kernel instead of command group.{{.*}} Use queue.submit() instead"}}
29+
// expected-error-re@CL/sycl/queue.hpp:* {{static_assert failed due to requirement '{{.*}}': sycl::queue.single_task() requires a kernel instead of command group.{{.*}} Use queue.submit() instead}}
3030
// expected-error-re@CL/sycl/detail/cg_types.hpp:* {{no matching function for call to object of type '(lambda at {{.*}}single_task_error_message.cpp:{{.*}})'}}
3131
})
3232
.wait();
@@ -42,7 +42,7 @@ int main() {
4242
myQueue
4343
.single_task(vector_event,
4444
[&](sycl::handler &cgh) {
45-
// expected-error-re@CL/sycl/queue.hpp:* {{static_assert failed due to requirement '{{.*}}' "sycl::queue.single_task() requires a kernel instead of command group.{{.*}} Use queue.submit() instead"}}
45+
// expected-error-re@CL/sycl/queue.hpp:* {{static_assert failed due to requirement '{{.*}}': sycl::queue.single_task() requires a kernel instead of command group.{{.*}} Use queue.submit() instead}}
4646
// expected-error-re@CL/sycl/detail/cg_types.hpp:* {{no matching function for call to object of type '(lambda at {{.*}}single_task_error_message.cpp:{{.*}})'}}
4747
})
4848
.wait();

sycl/test/check_device_code/no_offset_error.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ int main() {
1212
q.submit([&](sycl::handler &cgh) {
1313
sycl::ext::oneapi::accessor_property_list PL{sycl::ext::oneapi::no_offset, sycl::no_init};
1414
sycl::accessor acc_a(a, cgh, sycl::write_only, PL);
15-
// expected-error@CL/sycl/accessor.hpp:* {{static_assert failed due to requirement '!(accessor_property_list<sycl::ext::oneapi::property::no_offset::instance<true>, sycl::property::no_init>::has_property())' "Accessor has no_offset property, get_offset() can not be used"}}
15+
// expected-error@CL/sycl/accessor.hpp:* {{static_assert failed due to requirement '!(accessor_property_list<sycl::ext::oneapi::property::no_offset::instance<true>, sycl::property::no_init>::has_property())': Accessor has no_offset property, get_offset() can not be used}}
1616
auto b = acc_a.get_offset();
1717
});
1818

sycl/test/extensions/properties/properties_ctor_negative.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@
55
#include "mock_compile_time_properties.hpp"
66

77
int main() {
8-
// expected-error-re@sycl/ext/oneapi/properties/property_utils.hpp:* {{static_assert failed due to requirement {{.+}} "Unrecognized property in property list."}}
8+
// expected-error-re@sycl/ext/oneapi/properties/property_utils.hpp:* {{static_assert failed due to requirement {{.+}}: Unrecognized property in property list.}}
99
// expected-error@+1 {{no viable constructor or deduction guide for deduction of template arguments of 'properties'}}
1010
auto InvalidPropertyList1 = sycl::ext::oneapi::experimental::properties(1);
11-
// expected-error-re@sycl/ext/oneapi/properties/property_utils.hpp:* {{static_assert failed due to requirement {{.+}} "Unrecognized property in property list."}}
11+
// expected-error-re@sycl/ext/oneapi/properties/property_utils.hpp:* {{static_assert failed due to requirement {{.+}}: Unrecognized property in property list.}}
1212
// expected-error@+1 {{no viable constructor or deduction guide for deduction of template arguments of 'properties'}}
1313
auto InvalidPropertyList2 = sycl::ext::oneapi::experimental::properties(
1414
sycl::ext::oneapi::experimental::foo{1}, true);
15-
// expected-error-re@sycl/ext/oneapi/properties/properties.hpp:* {{static_assert failed due to requirement {{.+}} "Duplicate properties in property list."}}
15+
// expected-error-re@sycl/ext/oneapi/properties/properties.hpp:* {{static_assert failed due to requirement {{.+}}: Duplicate properties in property list.}}
1616
auto InvalidPropertyList3 = sycl::ext::oneapi::experimental::properties(
1717
sycl::ext::oneapi::experimental::foo{0},
1818
sycl::ext::oneapi::experimental::foo{1});
19-
// expected-error-re@sycl/ext/oneapi/properties/properties.hpp:* {{static_assert failed due to requirement {{.+}} "Duplicate properties in property list."}}
19+
// expected-error-re@sycl/ext/oneapi/properties/properties.hpp:* {{static_assert failed due to requirement {{.+}}: Duplicate properties in property list.}}
2020
auto InvalidPropertyList4 = sycl::ext::oneapi::experimental::properties(
2121
sycl::ext::oneapi::experimental::bar,
2222
sycl::ext::oneapi::experimental::bar);

sycl/test/extensions/properties/properties_get_property_negative.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66

77
int main() {
88
auto EmptyPropertyList = sycl::ext::oneapi::experimental::properties();
9-
// expected-error-re@sycl/ext/oneapi/properties/properties.hpp:* {{static_assert failed due to requirement {{.+}} "Property list does not contain the requested property."}}
9+
// expected-error-re@sycl/ext/oneapi/properties/properties.hpp:* {{static_assert failed due to requirement {{.+}}: Property list does not contain the requested property.}}
1010
// expected-error-re@+1 {{variable has incomplete type {{.+}}}}
1111
constexpr auto boo_val1 = decltype(EmptyPropertyList)::get_property<
1212
sycl::ext::oneapi::experimental::boo_key>();
13-
// expected-error-re@sycl/ext/oneapi/properties/properties.hpp:* {{static_assert failed due to requirement {{.+}} "Property list does not contain the requested property."}}
13+
// expected-error-re@sycl/ext/oneapi/properties/properties.hpp:* {{static_assert failed due to requirement {{.+}}: Property list does not contain the requested property.}}
1414
// expected-error-re@+1 {{no viable conversion from {{.+}} to 'sycl::ext::oneapi::experimental::foo'}}
1515
sycl::ext::oneapi::experimental::foo foo_val1 =
1616
EmptyPropertyList
@@ -20,11 +20,11 @@ int main() {
2020
auto PopulatedPropertyList = sycl::ext::oneapi::experimental::properties(
2121
sycl::ext::oneapi::experimental::foz{.0f, true},
2222
sycl::ext::oneapi::experimental::bar);
23-
// expected-error-re@sycl/ext/oneapi/properties/properties.hpp:* {{static_assert failed due to requirement {{.+}} "Property list does not contain the requested property."}}
23+
// expected-error-re@sycl/ext/oneapi/properties/properties.hpp:* {{static_assert failed due to requirement {{.+}}: Property list does not contain the requested property.}}
2424
// expected-error-re@+1 {{variable has incomplete type {{.+}}}}
2525
constexpr auto boo_val2 = decltype(PopulatedPropertyList)::get_property<
2626
sycl::ext::oneapi::experimental::boo_key>();
27-
// expected-error-re@sycl/ext/oneapi/properties/properties.hpp:* {{static_assert failed due to requirement {{.+}} "Property list does not contain the requested property."}}
27+
// expected-error-re@sycl/ext/oneapi/properties/properties.hpp:* {{static_assert failed due to requirement {{.+}}: Property list does not contain the requested property.}}
2828
// expected-error-re@+1 {{no viable conversion from {{.+}} to 'sycl::ext::oneapi::experimental::foo'}}
2929
sycl::ext::oneapi::experimental::foo foo_val2 =
3030
PopulatedPropertyList

0 commit comments

Comments
 (0)