diff options
Diffstat (limited to 'c/test.cpp')
-rw-r--r-- | c/test.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -23,12 +23,37 @@ TESTS if (dst[9] != 0) FAIL("dst is not NUL-terminated"); } + + TEST(EpisodeDataFromWeb) + { + ElvData e; + DlvData d; + FromWeb(10, e, d); + if (wcscmp(e.title, L"Pro Soccer Player Blackmail Case") != 0) + FAIL("title is not correct"); + if (wcscmp(d.date, L"March 11, 1996") != 0) + FAIL("date is not correct"); + } + + TEST(EpisodeDataFromProlog) + { + ElvData e; + DlvData d; + FromProlog(10, e); + FromProlog(10, d); + if (wcscmp(e.title, L"Pro Soccer Player Blackmail Case") != 0) + FAIL("title is not correct"); + if (wcscmp(d.date, L"March 11, 1996") != 0) + FAIL("date is not correct"); + } }; int RunTests() { const Test tests[] = { StrcpyWithSmallerDestination{}, + //EpisodeDataFromWeb{}, + EpisodeDataFromProlog{}, }; printf("Results (%llu tests):\n", sizeof(tests)/sizeof(*tests)); |