Skip to content

Commit d56f0fc

Browse files
committed
Change std::cerr to std::cout
1 parent 958be5b commit d56f0fc

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

sycl/source/detail/allowlist.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -256,19 +256,19 @@ AllowListParsedT parseAllowList(const std::string &AllowListRaw) {
256256

257257
if (IsDeprecatedKeyNameDeviceNameWasUsed &&
258258
IsDeprecatedKeyNamePlatformNameWasUsed) {
259-
std::cerr << "\nWARNING: " << DeprecatedKeyNameDeviceName << " and "
259+
std::cout << "\nWARNING: " << DeprecatedKeyNameDeviceName << " and "
260260
<< DeprecatedKeyNamePlatformName
261261
<< " in SYCL_DEVICE_ALLOWLIST are deprecated. ";
262262
} else if (IsDeprecatedKeyNameDeviceNameWasUsed) {
263-
std::cerr << "\nWARNING: " << DeprecatedKeyNameDeviceName
263+
std::cout << "\nWARNING: " << DeprecatedKeyNameDeviceName
264264
<< " in SYCL_DEVICE_ALLOWLIST is deprecated. ";
265265
} else if (IsDeprecatedKeyNamePlatformNameWasUsed) {
266-
std::cerr << "\nWARNING: " << DeprecatedKeyNamePlatformName
266+
std::cout << "\nWARNING: " << DeprecatedKeyNamePlatformName
267267
<< " in SYCL_DEVICE_ALLOWLIST is deprecated. ";
268268
}
269269
if (IsDeprecatedKeyNameDeviceNameWasUsed ||
270270
IsDeprecatedKeyNamePlatformNameWasUsed) {
271-
std::cerr << "Please use " << BackendNameKeyName << ", "
271+
std::cout << "Please use " << BackendNameKeyName << ", "
272272
<< DeviceTypeKeyName << " and " << DeviceVendorIdKeyName
273273
<< " instead. For details, please refer to "
274274
"https://github.com/intel/llvm/blob/sycl/sycl/doc/"

sycl/unittests/allowlist/ParseAllowList.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -269,9 +269,9 @@ TEST(ParseAllowListTests, CheckExceptionIsThrownForValueWOColonDelim) {
269269
}
270270

271271
TEST(ParseAllowListTests, CheckDeviceNameDeprecationWarning) {
272-
testing::internal::CaptureStderr();
272+
testing::internal::CaptureStdout();
273273
sycl::detail::parseAllowList("DeviceName:{{regex}}");
274-
std::string ActualOutput = testing::internal::GetCapturedStderr();
274+
std::string ActualOutput = testing::internal::GetCapturedStdout();
275275
EXPECT_EQ("\nWARNING: DeviceName in SYCL_DEVICE_ALLOWLIST is deprecated. "
276276
"Please use BackendName, DeviceType and DeviceVendorId instead. "
277277
"For details, please refer to "
@@ -281,9 +281,9 @@ TEST(ParseAllowListTests, CheckDeviceNameDeprecationWarning) {
281281
}
282282

283283
TEST(ParseAllowListTests, CheckPlatformNameDeprecationWarning) {
284-
testing::internal::CaptureStderr();
284+
testing::internal::CaptureStdout();
285285
sycl::detail::parseAllowList("PlatformName:{{regex}}");
286-
std::string ActualOutput = testing::internal::GetCapturedStderr();
286+
std::string ActualOutput = testing::internal::GetCapturedStdout();
287287
EXPECT_EQ("\nWARNING: PlatformName in SYCL_DEVICE_ALLOWLIST is deprecated. "
288288
"Please use BackendName, DeviceType and DeviceVendorId instead. "
289289
"For details, please refer to "
@@ -293,9 +293,9 @@ TEST(ParseAllowListTests, CheckPlatformNameDeprecationWarning) {
293293
}
294294

295295
TEST(ParseAllowListTests, CheckDeviceNameAndPlatformNameDeprecationWarning) {
296-
testing::internal::CaptureStderr();
296+
testing::internal::CaptureStdout();
297297
sycl::detail::parseAllowList("DeviceName:{{regex}},PlatformName:{{regex}}");
298-
std::string ActualOutput = testing::internal::GetCapturedStderr();
298+
std::string ActualOutput = testing::internal::GetCapturedStdout();
299299
EXPECT_EQ("\nWARNING: DeviceName and PlatformName in SYCL_DEVICE_ALLOWLIST "
300300
"are deprecated. Please use BackendName, DeviceType and "
301301
"DeviceVendorId instead. For details, please refer to "
@@ -305,10 +305,10 @@ TEST(ParseAllowListTests, CheckDeviceNameAndPlatformNameDeprecationWarning) {
305305
}
306306

307307
TEST(ParseAllowListTests, CheckNoDeprecationWarningForNotDeprecatedKeys) {
308-
testing::internal::CaptureStderr();
308+
testing::internal::CaptureStdout();
309309
sycl::detail::parseAllowList(
310310
"BackendName:level_zero,DeviceType:gpu,DeviceVendorId:0x0000,"
311311
"DriverVersion:{{regex1}},PlatformVersion:{{regex2}}");
312-
std::string ActualOutput = testing::internal::GetCapturedStderr();
312+
std::string ActualOutput = testing::internal::GetCapturedStdout();
313313
EXPECT_EQ("", ActualOutput);
314314
}

0 commit comments

Comments
 (0)