Skip to content

Commit 0afa8ac

Browse files
2.2. Updated unit test
1 parent 15cb12b commit 0afa8ac

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

unitttest/unittest.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -589,11 +589,6 @@ void territory_code_tests() {
589589
int context;
590590
const char *inputstring;
591591
} tcTestData[] = {
592-
{319, 0, "AL"}, //
593-
{483,497, "AL"}, // 497=rus
594-
{483,431, "AL"}, // 431=ru-tam
595-
{365,411, "AL"}, // 411=usa
596-
{365,392, "AL"}, // 392=us-ca
597592
{ -1, 0, ""},
598593
{ -1, 0, "R"},
599594
{ -1, 0, "RX"},
@@ -611,6 +606,11 @@ void territory_code_tests() {
611606
{431, 0, "RUS-TAM"},
612607
{ -1, 0, "RUS-TAMX"},
613608
{431, 0, "RUS-TAM X"},
609+
{319, 0, "AL"}, //
610+
{483,497, "AL"}, // 497=rus
611+
{483,431, "AL"}, // 431=ru-tam
612+
{365,411, "AL"}, // 411=usa
613+
{365,392, "AL"}, // 392=us-ca
614614
{0,0,NULL}
615615
};
616616

@@ -619,8 +619,9 @@ void territory_code_tests() {
619619
nrTests++;
620620
if (tc != tcTestData[i].expectedresult) {
621621
nrErrors++;
622-
printf("*** ERROR *** getTerritoryCode(%s)=%d, expected %d\n",
623-
tcTestData[i].inputstring, tc, tcTestData[i].expectedresult);
622+
printf("*** ERROR *** getTerritoryCode(\"%s\", %d)=%d, expected %d\n",
623+
tcTestData[i].inputstring, tcTestData[i].context,
624+
tc, tcTestData[i].expectedresult);
624625
}
625626
}
626627
}

0 commit comments

Comments
 (0)