Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions utils/utils/include/utils/utils_gtest_helper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
#include <gtest/gtest.h>
#include <level_zero/ze_api.h>

class LztGtestSkipExectuionException : public std::runtime_error {
class LztGtestSkipExecutionException : public std::runtime_error {
public:
explicit LztGtestSkipExectuionException(const std::string &message)
explicit LztGtestSkipExecutionException(const std::string &message)
: std::runtime_error(message) {}
};
namespace {
Expand All @@ -24,7 +24,7 @@ template <size_t N> constexpr size_t string_length(const char (&)[N]) {
const auto lzt_assert_ze_result_success_macro = val; \
if (lzt_assert_ze_result_success_macro == \
ZE_RESULT_ERROR_UNSUPPORTED_VERSION) { \
throw LztGtestSkipExectuionException("Unsupported API version"); \
throw LztGtestSkipExecutionException("Unsupported API version"); \
} \
ASSERT_EQ(ZE_RESULT_SUCCESS, lzt_assert_ze_result_success_macro) \
<< " --> " << #val; \
Expand All @@ -35,7 +35,7 @@ template <size_t N> constexpr size_t string_length(const char (&)[N]) {
const auto lzt_expect_ze_result_success_macro = val; \
if (lzt_expect_ze_result_success_macro == \
ZE_RESULT_ERROR_UNSUPPORTED_VERSION) { \
throw LztGtestSkipExectuionException("Unsupported API version"); \
throw LztGtestSkipExecutionException("Unsupported API version"); \
} \
EXPECT_EQ(ZE_RESULT_SUCCESS, lzt_expect_ze_result_success_macro) \
<< " --> " << #val; \
Expand Down Expand Up @@ -73,7 +73,7 @@ template <size_t N> constexpr size_t string_length(const char (&)[N]) {
GTEST_TEST(test_suite_name, test_name) { \
try { \
LZT_BODY_##test_suite_name##_##test_name(); \
} catch (const LztGtestSkipExectuionException &e) { \
} catch (const LztGtestSkipExecutionException &e) { \
GTEST_SKIP() << e.what(); \
} \
} \
Expand All @@ -87,14 +87,14 @@ template <size_t N> constexpr size_t string_length(const char (&)[N]) {
static void SetUpTestSuite() { \
try { \
test_suite_name::SetUpTestSuite(); \
} catch (const LztGtestSkipExectuionException &e) { \
} catch (const LztGtestSkipExecutionException &e) { \
GTEST_SKIP() << e.what(); \
} \
} \
static void TearDownTestSuite() { \
try { \
test_suite_name::TearDownTestSuite(); \
} catch (const LztGtestSkipExectuionException &e) { \
} catch (const LztGtestSkipExecutionException &e) { \
GTEST_SKIP() << e.what(); \
} \
} \
Expand All @@ -105,15 +105,15 @@ template <size_t N> constexpr size_t string_length(const char (&)[N]) {
_helper)::SetUp() { \
try { \
test_suite_name::SetUp(); \
} catch (const LztGtestSkipExectuionException &e) { \
} catch (const LztGtestSkipExecutionException &e) { \
GTEST_SKIP() << e.what(); \
} \
} \
void LZT_CONCATENATE(GTEST_TEST_CLASS_NAME_(test_suite_name, test_name), \
_helper)::TearDown() { \
try { \
test_suite_name::TearDown(); \
} catch (const LztGtestSkipExectuionException &e) { \
} catch (const LztGtestSkipExecutionException &e) { \
GTEST_SKIP() << e.what(); \
} \
}
Expand Down Expand Up @@ -151,7 +151,7 @@ template <size_t N> constexpr size_t string_length(const char (&)[N]) {
void GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::TestBody() { \
try { \
LztTestBodyHelper(); \
} catch (const LztGtestSkipExectuionException &e) { \
} catch (const LztGtestSkipExecutionException &e) { \
GTEST_SKIP() << e.what(); \
} \
} \
Expand Down Expand Up @@ -198,7 +198,7 @@ template <size_t N> constexpr size_t string_length(const char (&)[N]) {
void GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::TestBody() { \
try { \
LztTestBodyHelper(); \
} catch (const LztGtestSkipExectuionException &e) { \
} catch (const LztGtestSkipExecutionException &e) { \
GTEST_SKIP() << e.what(); \
} \
} \
Expand Down
Loading