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