#include "Disciplines.h" #include #include #include #include #include "test.h" using namespace SBF; using namespace Test; using namespace std; namespace Test::Disciplines { TestResults test_GetDisciplineLabel(); TestResults test_FillDisciplineLabels(); } // End namespace Test::Disciplines using namespace Test::Disciplines; TestResults main_test_Disciplines(int argc, char* argv[]) { TestResults results; results += test_GetDisciplineLabel(); results += test_FillDisciplineLabels(); return results; } namespace Test::Disciplines { TestResults test_GetDisciplineLabel() { return execute_suite(make_test_suite( "SBF::GetDisciplineLabel", GetDisciplineLabel, vector>({ make_test("should get \"\" for invalid discipline id 0", "", make_tuple(0)), make_test("should get \"Animalism\" for id 1", "Animalism", make_tuple(1)), make_test("should get \"Auspex\" for id 2", "Auspex", make_tuple(2)), make_test("should get \"Bardo\" for id 3", "Bardo", make_tuple(3)), make_test("should get \"Celerity\" for id 4", "Celerity", make_tuple(4)), make_test("should get \"Chimestry\" for id 5", "Chimestry", make_tuple(5)), make_test("should get \"Dementation\" for id 6", "Dementation", make_tuple(6)), make_test("should get \"Dominate\" for id 7", "Dominate", make_tuple(7)), make_test("should get \"Fortitude\" for id 8", "Fortitude", make_tuple(8)), make_test("should get \"Melpominee\" for id 9", "Melpominee", make_tuple(9)), make_test("should get \"Mortis\" for id 10", "Mortis", make_tuple(10)), make_test("should get \"Mytherceria\" for id 11", "Mytherceria", make_tuple(11)), make_test("should get \"Necromancy\" for id 12", "Necromancy", make_tuple(12)), make_test("should get \"Obeah\" for id 13", "Obeah", make_tuple(13)), make_test("should get \"Obfuscate\" for id 14", "Obfuscate", make_tuple(14)), make_test("should get \"Obtenebration\" for id 15", "Obtenebration", make_tuple(15)), make_test("should get \"Potence\" for id 16", "Potence", make_tuple(16)), make_test("should get \"Presence\" for id 17", "Presence", make_tuple(17)), make_test("should get \"Protean\" for id 18", "Protean", make_tuple(18)), make_test("should get \"Quietus\" for id 19", "Quietus", make_tuple(19)), make_test("should get \"Serpentis\" for id 20", "Serpentis", make_tuple(20)), make_test("should get \"Spiritus\" for id 21", "Spiritus", make_tuple(21)), make_test("should get \"Thanantosis\" for id 22", "Thanantosis", make_tuple(22)), make_test("should get \"Thaumaturgy\" for id 23", "Thaumaturgy", make_tuple(23)), make_test("should get \"Vicissitude\" for id 24", "Vicissitude", make_tuple(24)), make_test("should get \"\" for invalid discipline id 25", "", make_tuple(25)), }))); } TestResults test_FillDisciplineLabels() { auto fnToTest = []() -> string { ostringstream error_message; vector expected = { kDisciplineAnimalismLabel, kDisciplineAuspexLabel, kDisciplineBardoLabel, kDisciplineCelerityLabel, kDisciplineChimestryLabel, kDisciplineDementationLabel, kDisciplineDominateLabel, kDisciplineFortitudeLabel, kDisciplineMelpomineeLabel, kDisciplineMortisLabel, kDisciplineMytherceriaLabel, kDisciplineNecromancyLabel, kDisciplineObeahLabel, kDisciplineObfuscateLabel, kDisciplineObtenebrationLabel, kDisciplinePotenceLabel, kDisciplinePresenceLabel, kDisciplineProteanLabel, kDisciplineQuietusLabel, kDisciplineSerpentisLabel, kDisciplineSpiritusLabel, kDisciplineThanantosisLabel, kDisciplineThaumaturgyLabel, kDisciplineVicissitudeLabel, }; vector actual = {"This should be removed."}; FillDisciplineLabels(actual); compare(error_message, expected, actual); string error = error_message.str(); if (error.size() > 0) { return error; } return "no errors"; }; return execute_suite( make_test_suite("SBF::FillDisciplineLabels", fnToTest, vector>({ make_test("should fill disciplines", "no errors", make_tuple()), }))); } } // End namespace Test::Disciplines