refactor(testing): rename test functions for Templates to prevent redefinition

This commit is contained in:
_Redstone_c_ 2022-03-17 10:19:41 +08:00
parent 1bff879a0b
commit 94416676d2
2 changed files with 4 additions and 4 deletions

View File

@ -17,7 +17,7 @@ void TestTemplates()
TestReferenceWrapper(); TestReferenceWrapper();
TestOptional(); TestOptional();
TestVariant(); TestVariant();
TestOther(); TestMiscTemplates();
} }
NAMESPACE_UNNAMED_BEGIN NAMESPACE_UNNAMED_BEGIN
@ -340,12 +340,12 @@ int32 TestFunctionB(T** Ptr)
NAMESPACE_UNNAMED_END NAMESPACE_UNNAMED_END
void TestOther() void TestMiscTemplates()
{ {
TTestStructA<int32> ObjectA(new int32(3)); TTestStructA<int32> ObjectA(new int32(3));
always_check(TestFunctionB(&ObjectA) == 1); always_check(TestFunctionB(&ObjectA) == 1);
always_check(TestFunctionB(AddressOf(ObjectA)) == 0); always_check(TestFunctionB(AddressOf(ObjectA)) == 0);
always_check(AddressOf(TestOther) == &TestOther); always_check(AddressOf(TestMiscTemplates) == &TestMiscTemplates);
} }
NAMESPACE_MODULE_END(Utility) NAMESPACE_MODULE_END(Utility)

View File

@ -11,7 +11,7 @@ REDCRAFTUTILITY_API void TestInvoke();
REDCRAFTUTILITY_API void TestReferenceWrapper(); REDCRAFTUTILITY_API void TestReferenceWrapper();
REDCRAFTUTILITY_API void TestOptional(); REDCRAFTUTILITY_API void TestOptional();
REDCRAFTUTILITY_API void TestVariant(); REDCRAFTUTILITY_API void TestVariant();
REDCRAFTUTILITY_API void TestOther(); REDCRAFTUTILITY_API void TestMiscTemplates();
NAMESPACE_MODULE_END(Utility) NAMESPACE_MODULE_END(Utility)
NAMESPACE_MODULE_END(Redcraft) NAMESPACE_MODULE_END(Redcraft)