diff options
author | John Ankarström <john@ankarstrom.se> | 2022-09-03 15:28:56 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2022-09-03 15:28:56 +0200 |
commit | 6ae7e24675cff4ff6b808c3024f45083f35ced97 (patch) | |
tree | 2a47273f325d8367db2a8669691273f02ca83eb9 /c/test.cpp | |
parent | 2cd22c671c67deaf2c1fcb659e3262bf57552557 (diff) | |
download | EpisodeBrowser-6ae7e24675cff4ff6b808c3024f45083f35ced97.tar.gz |
Improve error handling.
Diffstat (limited to 'c/test.cpp')
-rw-r--r-- | c/test.cpp | 27 |
1 files changed, 26 insertions, 1 deletions
@@ -112,6 +112,31 @@ TESTS // #undef CPY // #undef SCPY // } + + TEST(NewCfg) + { + FileView<CfgA> fv2 = FileView<CfgA>::Initialized(L"cfg2.dat", 1); + CfgA* a = &s_window->cfg; + CfgA* b = fv2+0; + +#define CPY(member) b->member = a->member; +#define SCPY(member) Wcscpy(b->member, a->member); + + CPY(bViewWatched); + CPY(bViewTVOriginal); + CPY(iSortCol); + CPY(cEp); + CPY(iFocus); + CPY(heightDlv); + SCPY(limitToScreenwriter); + SCPY(root); + SCPY(glob); + SCPY(url); + Swprintf(b->prefixUrl, L"http://localhost:8000/?u="); + +#undef CPY +#undef SCPY + } }; int RunTests(Window& window) @@ -121,7 +146,7 @@ int RunTests(Window& window) const Test tests[] = { StrcpyWithSmallerDestination(), //IO(), - // MigrateCfg(), + //NewCfg(), }; printf("Results (%llu tests):\n", sizeof(tests)/sizeof(*tests)); |