Skip to content

Commit 4b7cc9f

Browse files
committed
fix UT
1 parent 62b9856 commit 4b7cc9f

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

sycl/unittests/config/ConfigTests.cpp

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ TEST(ConfigTests, CheckConfigProcessing) {
2828
File.close();
2929
}
3030
try {
31-
sycl::detail::SYCLConfig<sycl::detail::SYCL_DEVICE_ALLOWLIST>::get();
32-
throw std::logic_error("sycl::exception didn't throw");
31+
sycl::detail::readConfig(true);
32+
throw std::logic_error("sycl::exception didn't throw 1");
3333
} catch (sycl::exception &e) {
3434
EXPECT_EQ(
3535
std::string(
@@ -46,8 +46,8 @@ TEST(ConfigTests, CheckConfigProcessing) {
4646
File.close();
4747
}
4848
try {
49-
sycl::detail::SYCLConfig<sycl::detail::SYCL_DEVICE_ALLOWLIST>::get();
50-
throw std::logic_error("sycl::exception didn't throw");
49+
sycl::detail::readConfig(true);
50+
throw std::logic_error("sycl::exception didn't throw 2");
5151
} catch (sycl::exception &e) {
5252
EXPECT_EQ(
5353
std::string(
@@ -64,8 +64,8 @@ TEST(ConfigTests, CheckConfigProcessing) {
6464
File.close();
6565
}
6666
try {
67-
sycl::detail::SYCLConfig<sycl::detail::SYCL_DEVICE_ALLOWLIST>::get();
68-
throw std::logic_error("sycl::exception didn't throw");
67+
sycl::detail::readConfig(true);
68+
throw std::logic_error("sycl::exception didn't throw 3");
6969
} catch (sycl::exception &e) {
7070
EXPECT_EQ(
7171
std::string(
@@ -82,8 +82,8 @@ TEST(ConfigTests, CheckConfigProcessing) {
8282
File.close();
8383
}
8484
try {
85-
sycl::detail::SYCLConfig<sycl::detail::SYCL_DEVICE_ALLOWLIST>::get();
86-
throw std::logic_error("sycl::exception didn't throw");
85+
sycl::detail::readConfig(true);
86+
throw std::logic_error("sycl::exception didn't throw 4");
8787
} catch (sycl::exception &e) {
8888
EXPECT_EQ(
8989
std::string(
@@ -103,8 +103,8 @@ TEST(ConfigTests, CheckConfigProcessing) {
103103
File.close();
104104
}
105105
try {
106-
sycl::detail::SYCLConfig<sycl::detail::SYCL_DEVICE_ALLOWLIST>::get();
107-
throw std::logic_error("sycl::exception didn't throw");
106+
sycl::detail::readConfig(true);
107+
throw std::logic_error("sycl::exception didn't throw 5");
108108
} catch (sycl::exception &e) {
109109
EXPECT_TRUE(std::regex_match(
110110
e.what(),
@@ -121,8 +121,8 @@ TEST(ConfigTests, CheckConfigProcessing) {
121121
File.close();
122122
}
123123
try {
124-
sycl::detail::SYCLConfig<sycl::detail::SYCL_DEVICE_ALLOWLIST>::get();
125-
throw std::logic_error("sycl::exception didn't throw");
124+
sycl::detail::readConfig(true);
125+
throw std::logic_error("sycl::exception didn't throw 6");
126126
} catch (sycl::exception &e) {
127127
EXPECT_TRUE(std::regex_match(
128128
e.what(), std::regex("Variable name is more than ([\\d]+) or less "
@@ -142,8 +142,8 @@ TEST(ConfigTests, CheckConfigProcessing) {
142142
File.close();
143143
}
144144
try {
145-
sycl::detail::SYCLConfig<sycl::detail::SYCL_DEVICE_ALLOWLIST>::get();
146-
throw std::logic_error("sycl::exception didn't throw");
145+
sycl::detail::readConfig(true);
146+
throw std::logic_error("sycl::exception didn't throw 7");
147147
} catch (sycl::exception &e) {
148148
EXPECT_TRUE(std::regex_match(
149149
e.what(), std::regex("The value contains more than ([\\d]+) characters "
@@ -159,8 +159,8 @@ TEST(ConfigTests, CheckConfigProcessing) {
159159
File.close();
160160
}
161161
try {
162-
sycl::detail::SYCLConfig<sycl::detail::SYCL_DEVICE_ALLOWLIST>::get();
163-
throw std::logic_error("sycl::exception didn't throw");
162+
sycl::detail::readConfig(true);
163+
throw std::logic_error("sycl::exception didn't throw 8");
164164
} catch (sycl::exception &e) {
165165
EXPECT_TRUE(std::regex_match(
166166
e.what(), std::regex("The value contains more than ([\\d]+) characters "
@@ -176,8 +176,8 @@ TEST(ConfigTests, CheckConfigProcessing) {
176176
File.close();
177177
}
178178
try {
179-
sycl::detail::SYCLConfig<sycl::detail::SYCL_DEVICE_ALLOWLIST>::get();
180-
throw std::logic_error("sycl::exception didn't throw");
179+
sycl::detail::readConfig(true);
180+
throw std::logic_error("sycl::exception didn't throw 9");
181181
} catch (sycl::exception &e) {
182182
EXPECT_TRUE(std::regex_match(
183183
e.what(), std::regex("The value contains more than ([\\d]+) characters "

0 commit comments

Comments
 (0)