Add StringToClass and ClassToString unit tests. Release Build 12192.
All checks were successful
Emscripten Build / Build_and_Deploy_Web_Build (push) Successful in 6m49s
All checks were successful
Emscripten Build / Build_and_Deploy_Web_Build (push) Successful in 6m49s
This commit is contained in:
parent
08ec6b7ed4
commit
bee8d6d306
@ -174,5 +174,21 @@ namespace EngineTests
|
||||
Assert::AreEqual(200.f,util::map_range<float>(100.f,50,100,100,200),L"100 in input range 50-100 output range 100-200 maps to 200");
|
||||
Assert::AreEqual(100.f,util::map_range<float>(50.f,50,100,100,200),L"50 in input range 50-100 output range 100-200 maps to 100");
|
||||
}
|
||||
|
||||
TEST_METHOD(ClassUtilTest){
|
||||
Assert::AreEqual(int(Class::WARRIOR),int(classutils::StringToClass("Warrior")),L"Expected Warrior to return the warrior class.");
|
||||
Assert::AreEqual(int(Class::WIZARD),int(classutils::StringToClass("Wizard")),L"Expected Wizard to return the wizard class.");
|
||||
Assert::AreEqual(int(Class::RANGER),int(classutils::StringToClass("Ranger")),L"Expected Ranger to return the ranger class.");
|
||||
Assert::AreEqual(int(Class::THIEF),int(classutils::StringToClass("Thief")),L"Expected Thief to return the thief class.");
|
||||
Assert::AreEqual(int(Class::WITCH),int(classutils::StringToClass("Witch")),L"Expected Witch to return the witch class.");
|
||||
Assert::AreEqual(int(Class::TRAPPER),int(classutils::StringToClass("Trapper")),L"Expected Trapper to return the trapper class.");
|
||||
|
||||
Assert::AreEqual("Warrior",classutils::ClassToString(Class::WARRIOR).c_str(),L"Expected class to string to convert properly");
|
||||
Assert::AreEqual("Wizard",classutils::ClassToString(Class::WIZARD).c_str(),L"Expected class to string to convert properly");
|
||||
Assert::AreEqual("Ranger",classutils::ClassToString(Class::RANGER).c_str(),L"Expected class to string to convert properly");
|
||||
Assert::AreEqual("Thief",classutils::ClassToString(Class::THIEF).c_str(),L"Expected class to string to convert properly");
|
||||
Assert::AreEqual("Witch",classutils::ClassToString(Class::WITCH).c_str(),L"Expected class to string to convert properly");
|
||||
Assert::AreEqual("Trapper",classutils::ClassToString(Class::TRAPPER).c_str(),L"Expected class to string to convert properly");
|
||||
}
|
||||
};
|
||||
}
|
@ -39,7 +39,7 @@ All rights reserved.
|
||||
#define VERSION_MAJOR 1
|
||||
#define VERSION_MINOR 3
|
||||
#define VERSION_PATCH 0
|
||||
#define VERSION_BUILD 12191
|
||||
#define VERSION_BUILD 12192
|
||||
|
||||
#define stringify(a) stringify_(a)
|
||||
#define stringify_(a) #a
|
||||
|
Loading…
x
Reference in New Issue
Block a user