Removes unknown values from fill functions.

Indexes will no longer match Ids.
Updated all tests to use char* argv[] instead of char** argv.
This commit is contained in:
2023-04-22 00:38:48 -07:00
parent e8e9904de3
commit 1f45248ccd
20 changed files with 171 additions and 171 deletions

View File

@@ -145,44 +145,47 @@ TestResults test_FillAbilitiesForAbilityGroup() {
make_test<vector<string>, int>(
"should clear the vector for group 0, kAbilityGropuUnknownId", {}, make_tuple(0)),
make_test<vector<string>, int>("should fill talents for group 1 kAbilityGroupTalentsId",
{"",
"Acting",
"Alertness",
"Athletics",
"Brawl",
"Dodge",
"Empathy",
"Intimidation",
"Leadership",
"Streetwise",
"Subterfuge"}, //, "Alertness", "Athletics", "Brawl", "Dodge", "Empathy",
//"Intimidation", "Leadership", "Streetwise", "Subterfuge"
{
"Acting",
"Alertness",
"Athletics",
"Brawl",
"Dodge",
"Empathy",
"Intimidation",
"Leadership",
"Streetwise",
"Subterfuge",
}, //, "Alertness", "Athletics", "Brawl", "Dodge", "Empathy",
//"Intimidation", "Leadership", "Streetwise", "Subterfuge"
make_tuple(1)),
make_test<vector<string>, int>("should fill skills for group 2 kAbilityGroupSkillsId",
{"",
"Animal Ken",
"Drive",
"Etiquette",
"Firearms",
"Melee",
"Music",
"Repair",
"Security",
"Stealth",
"Survival"},
{
"Animal Ken",
"Drive",
"Etiquette",
"Firearms",
"Melee",
"Music",
"Repair",
"Security",
"Stealth",
"Survival",
},
make_tuple(2)),
make_test<vector<string>, int>("should fill knowledges for group 3 kAbilityGroupKnowledgesId",
{"",
"Bureaucracy",
"Computer",
"Finance",
"Investigation",
"Law",
"Linguistics",
"Medicine",
"Occult",
"Politics",
"Science"},
{
"Bureaucracy",
"Computer",
"Finance",
"Investigation",
"Law",
"Linguistics",
"Medicine",
"Occult",
"Politics",
"Science",
},
make_tuple(3)),
make_test<vector<string>, int>("should clear the vector for group 4 an invalid id", {}, make_tuple(4)),
})));
@@ -200,43 +203,46 @@ TestResults test_FillAbilityLabels() {
make_test<vector<string>, int>(
"should clear the vector for group 0, kAbilityGropuUnknownId", {}, make_tuple(0)),
make_test<vector<string>, int>("should fill talents for group 1 kAbilityGroupTalentsId",
{"",
"Acting",
"Alertness",
"Athletics",
"Brawl",
"Dodge",
"Empathy",
"Intimidation",
"Leadership",
"Streetwise",
"Subterfuge"},
{
"Acting",
"Alertness",
"Athletics",
"Brawl",
"Dodge",
"Empathy",
"Intimidation",
"Leadership",
"Streetwise",
"Subterfuge",
},
make_tuple(1)),
make_test<vector<string>, int>("should fill skills for group 2 kAbilityGroupSkillsId",
{"",
"Animal Ken",
"Drive",
"Etiquette",
"Firearms",
"Melee",
"Music",
"Repair",
"Security",
"Stealth",
"Survival"},
{
"Animal Ken",
"Drive",
"Etiquette",
"Firearms",
"Melee",
"Music",
"Repair",
"Security",
"Stealth",
"Survival",
},
make_tuple(2)),
make_test<vector<string>, int>("should fill knowledges for group 3 kAbilityGroupKnowledgesId",
{"",
"Bureaucracy",
"Computer",
"Finance",
"Investigation",
"Law",
"Linguistics",
"Medicine",
"Occult",
"Politics",
"Science"},
{
"Bureaucracy",
"Computer",
"Finance",
"Investigation",
"Law",
"Linguistics",
"Medicine",
"Occult",
"Politics",
"Science",
},
make_tuple(3)),
make_test<vector<string>, int>("should clear the vector for group 4 an invalid id", {}, make_tuple(4)),
})));
@@ -248,17 +254,18 @@ TestResults test_FillKnowledgeLabels() {
[]() -> string {
ostringstream error_message;
vector<string> actual = {"This should be removed."};
vector<string> expected = {"",
"Bureaucracy",
"Computer",
"Finance",
"Investigation",
"Law",
"Linguistics",
"Medicine",
"Occult",
"Politics",
"Science"};
vector<string> expected = {
"Bureaucracy",
"Computer",
"Finance",
"Investigation",
"Law",
"Linguistics",
"Medicine",
"Occult",
"Politics",
"Science",
};
FillKnowledgeLabels(actual);
compare(error_message, expected, actual);
string error = error_message.str();
@@ -278,17 +285,18 @@ TestResults test_FillSkillLabels() {
[]() -> string {
ostringstream error_message;
vector<string> actual = {"This should be removed."};
vector<string> expected = {"",
"Animal Ken",
"Drive",
"Etiquette",
"Firearms",
"Melee",
"Music",
"Repair",
"Security",
"Stealth",
"Survival"};
vector<string> expected = {
"Animal Ken",
"Drive",
"Etiquette",
"Firearms",
"Melee",
"Music",
"Repair",
"Security",
"Stealth",
"Survival",
};
FillSkillLabels(actual);
compare(error_message, expected, actual);
string error = error_message.str();
@@ -308,17 +316,18 @@ TestResults test_FillTalentLabels() {
[]() -> string {
ostringstream error_message;
vector<string> actual = {"This should be removed."};
vector<string> expected = {"",
"Acting",
"Alertness",
"Athletics",
"Brawl",
"Dodge",
"Empathy",
"Intimidation",
"Leadership",
"Streetwise",
"Subterfuge"};
vector<string> expected = {
"Acting",
"Alertness",
"Athletics",
"Brawl",
"Dodge",
"Empathy",
"Intimidation",
"Leadership",
"Streetwise",
"Subterfuge",
};
FillTalentLabels(actual);
compare(error_message, expected, actual);
string error = error_message.str();