From bc4cef92d8efbf97a9215122abc2d7247c287f12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Fri, 2 Sep 2022 20:16:04 +0200 Subject: Improve Window object. --- c/test.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'c/test.cpp') diff --git a/c/test.cpp b/c/test.cpp index 35c6904..c0a9445 100644 --- a/c/test.cpp +++ b/c/test.cpp @@ -4,11 +4,11 @@ #include "data.h" #include "episodelistview.h" #include "ext.h" -#include "main.h" #include "util.h" -#include "win.h" +#include "win32.h" +#include "window.h" -extern Window* g_window; +Window* s_window; struct Test { @@ -36,8 +36,8 @@ TESTS TEST(IO) { - ElvDataA& e1_0 = g_window->fvElv.At(5); - ElvDataA& e2_0 = g_window->fvElv.At(9); + ElvDataA& e1_0 = s_window->fvElv.At(5); + ElvDataA& e2_0 = s_window->fvElv.At(9); /* Write two ElvDataA structs to disk. */ { @@ -91,7 +91,7 @@ TESTS // TEST(MigrateCfg) // { // FileView fvb = FileView::Initialized(L"cfgb.dat", 1); -// CfgA* a = &g_window->cfg; +// CfgA* a = &s_window->cfg; // CfgB* b = fvb+0; // #define CPY(member) b->member = a->member; @@ -113,8 +113,10 @@ TESTS // } }; -int RunTests() +int RunTests(Window& window) { + s_window = &window; + const Test tests[] = { StrcpyWithSmallerDestination(), //IO(), -- cgit v1.2.3