-
Notifications
You must be signed in to change notification settings - Fork 101
/
cpp.hint
11 lines (11 loc) · 2.96 KB
/
cpp.hint
1
2
3
4
5
6
7
8
9
10
11
// Hint files help the Visual Studio IDE interpret Visual C++ identifiers
// such as names of functions and macros.
// For more information see https://go.microsoft.com/fwlink/?linkid=865984
#define BEGIN_TEST_CLASS(className) TEST_CLASS(className) static TAEF_CPP_EXPORT const ::WEX::Private::TestPropertyMetadata* TAEF_GetClassMetadata() { TAEF_PIN_FUNCTION_SYMBOL TAEF_TESTDATA_SECTION($g_TCM) static TAEF_CONST_TESTDATA ::WEX::Private::TestPropertyMetadata s_Metadata[] = { { TAEF_TEST_CLASS_METADATA_IDENTIFIER, TAEF_WIDEN_IF_ABI_10("Name"), TAEF_QUALIFIED_METHOD_NAME},
#define TEST_CLASS_PROPERTY(propertyName, propertyValue) { ::WEX::Private::MetadataIdentifierLookup<decltype(*propertyName), decltype(*propertyValue)>::c_classIdentifier, propertyName, propertyValue },
#define TEST_METHOD(methodName) TAEF_TEST_METHOD(methodName) TAEF_TERMINATOR
#define END_TEST_CLASS() { TAEF_TEST_CLASS_METADATA_IDENTIFIER, nullptr, nullptr} }; return s_Metadata; } TAEF_COMPILER_PIN(TAEF_GetClassMetadata)
#define TEST_CLASS_SETUP(methodName) static TAEF_CPP_EXPORT const ::WEX::Private::FixtureMethodInfo* YOU_CAN_ONLY_DESIGNATE_ONE_CLASS_METHOD_TO_BE_A_TEST_CLASS_SETUP_METHOD() { TAEF_REGISTER_FIXTURE_METHOD(methodName, ::WEX::Private::TaefAbiStructIdentifier::TestClassSetup) } TAEF_COMPILER_PIN(YOU_CAN_ONLY_DESIGNATE_ONE_CLASS_METHOD_TO_BE_A_TEST_CLASS_SETUP_METHOD) TAEF_DECLARE_OR_DEFINE_FIXTURE(methodName)
#define TEST_CLASS(className) typedef className TAEF_TestClassType; static const uintptr_t TAEF_TestMethodIndexOffset = __COUNTER__; friend struct ::WEX::Private::TestClassFactory<className>; typedef bool (className::*TAEF_MemberMaintFunc)(); TAEF_MSVC_SUPPRESS_WARNING(25007) bool TAEF_DummyMaintFunc() { return true; } static TAEF_CPP_EXPORT const ::WEX::Private::TestClassInfo* TAEF_GetTestClassInfo() { struct TaefClassNameTester { static char TestType(TAEF_MemberMaintFunc) { return 'c'; } static TaefClassNameTester TestType(...) { return TaefClassNameTester(); } char member[2]; }; static_assert(sizeof(TaefClassNameTester::TestType(&TAEF_TestClassType::TAEF_DummyMaintFunc)) == 1, TAEF_STRINGIZE(className) " is not the name of the current class"); TAEF_PUSH_IGNORE_WARNINGS TAEF_PIN_FUNCTION_SYMBOL TAEF_TESTDATA_SECTION($b_TCI) static TAEF_CONST_TESTDATA ::WEX::Private::TestClassInfo s_ClassInfo = {::WEX::Private::TaefAbiStructIdentifier::TestClass, TAEF_QUALIFIED_METHOD_NAME, &::WEX::Private::TestClassFactory<className>::CreateInstance, &::WEX::Private::TestClassFactory<className>::DestroyInstance }; TAEF_POP_IGNORE_WARNINGS return &s_ClassInfo; } TAEF_COMPILER_PIN(TAEF_GetTestClassInfo)
#define VERIFY_SUCCEEDED_RETURN(__hresult, __VA_ARGS__) (HRESULT)WEX::TestExecution::Private::MacroVerify::SucceededReturn((__hresult), (L""#__hresult), PRIVATE_VERIFY_ERROR_INFO, __VA_ARGS__)
#define VERIFY_ARE_EQUAL(__expected, __actual, __VA_ARGS__) (bool)WEX::TestExecution::Private::MacroVerify::AreEqual((__expected), (__actual), (L""#__expected), (L""#__actual), PRIVATE_VERIFY_ERROR_INFO, __VA_ARGS__)