aboutsummaryrefslogtreecommitdiff
path: root/c/test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'c/test.cpp')
-rw-r--r--c/test.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/c/test.cpp b/c/test.cpp
index 9230974..67a32c9 100644
--- a/c/test.cpp
+++ b/c/test.cpp
@@ -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));