Skip to content

Commit c716470

Browse files
authored
Merge pull request #1142 from Maetveis/setup_catch_filename_in_legacy_tests
Pass real filename to catch in legacy tests
2 parents 71ebbc1 + 4d44f60 commit c716470

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

util/proxy.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,16 @@ template <typename T>
4040
class test_proxy {
4141
public:
4242
test_proxy() {
43-
test_base::info info;
44-
T{}.get_info_legacy(info);
43+
T{}.get_info_legacy(m_info);
4544

4645
Catch::AutoReg(
47-
Catch::makeTestInvoker<T>(&T::run_legacy), {__FILE__, __LINE__},
46+
Catch::makeTestInvoker<T>(&T::run_legacy), {m_info.m_file.c_str(), /*.line=*/0},
4847
"__SYCL_CTS_LEGACY_TEST__" + std::to_string(next_legacy_test_id++),
49-
{info.m_name, "[legacy]"});
48+
{m_info.m_name, "[legacy]"});
5049
}
5150

5251
private:
52+
test_base::info m_info;
5353
inline static size_t next_legacy_test_id = 0;
5454
};
5555

0 commit comments

Comments
 (0)