diff options
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)); |