mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-06-16 01:33:39 +00:00
Enforce WINML_TEST_CLASS_BEGIN_* matches w/ a WINML_TEST_CLASS_END (#2841)
This commit is contained in:
parent
39c9f98a5d
commit
408e600bf3
1 changed files with 12 additions and 10 deletions
|
|
@ -10,18 +10,20 @@
|
|||
}
|
||||
|
||||
#define WINML_TEST_CLASS_BEGIN_NO_SETUP(test_class_name) \
|
||||
class test_class_name : public ::testing::Test { \
|
||||
};
|
||||
namespace { \
|
||||
class test_class_name : public ::testing::Test { \
|
||||
};
|
||||
|
||||
#define WINML_TEST_CLASS_BEGIN_WITH_SETUP(test_class_name, setup_method) \
|
||||
class test_class_name : public ::testing::Test { \
|
||||
protected: \
|
||||
void SetUp() override { \
|
||||
getapi().setup_method(); \
|
||||
} \
|
||||
};
|
||||
namespace { \
|
||||
class test_class_name : public ::testing::Test { \
|
||||
protected: \
|
||||
void SetUp() override { \
|
||||
getapi().setup_method(); \
|
||||
} \
|
||||
};
|
||||
|
||||
#define WINML_TEST_CLASS_END()
|
||||
#define WINML_TEST_CLASS_END() }
|
||||
|
||||
// For old versions of gtest without GTEST_SKIP, stream the message and return success instead
|
||||
#ifndef GTEST_SKIP
|
||||
|
|
@ -77,4 +79,4 @@
|
|||
if (auto isEdgeCore = RuntimeParameters::Parameters.find("EdgeCore"); \
|
||||
isEdgeCore != RuntimeParameters::Parameters.end() && isEdgeCore->second != "0") { \
|
||||
WINML_SKIP_TEST("Test can't be run in EdgeCore"); \
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue