41 lines
1.1 KiB
Plaintext

delimiters "$", "$"
import "Common.stg"
TestMethod(structure) ::= <<
$if(structure.NonEmbeddedReferenceExists)$
TEST_METHOD(Test_$structure.Type.Name$)
{
Assert::AreEqual($structure.Type.Size$u, sizeof($structure.Type.FullName$));
Assert::AreEqual($structure.Type.Alignment$u, alignof($structure.Type.FullName$));
}
$endif$
>>
// =======================
// Source file entry point
// =======================
source(context) ::= <<
// ====================================================================
// This file has been generated by ZoneCodeGenerator.
// Do not modify.
// Any changes will be discarded when regenerating.
// ====================================================================
#include "CppUnitTest.h"
#include "Game/$context.Game$/$context.Game$.h"
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
using namespace $context.Game$;
namespace ZoneCommonTests
{
TEST_CLASS(AssetStructTest_$context.Asset.Type.Name$)
{
public:
$TestMethod(context.Asset)$
$context.UsedStructures:{structure | $if(!structure.Information.Type.IsAnonymous && !structure.Information.IsAsset)$$TestMethod(structure)$
$endif$}$
};
}
>>