From a1a21273965c97c92b7cfa60d77c35cc35d40951 Mon Sep 17 00:00:00 2001 From: chrchr Date: Fri, 9 Feb 2024 14:57:05 +0100 Subject: [PATCH] Also test mfc.cpp --- .github/workflows/CI-windows.yml | 3 ++- test/cfg/mfc.cpp | 26 ++++++++++++++++++-------- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/.github/workflows/CI-windows.yml b/.github/workflows/CI-windows.yml index 4693f3a6e58..5f4d85342fd 100644 --- a/.github/workflows/CI-windows.yml +++ b/.github/workflows/CI-windows.yml @@ -197,8 +197,9 @@ jobs: ..\..\cppcheck --dump naming_test.cpp || exit /b !errorlevel! python3 ..\naming.py --var='[a-z].*' --function='[a-z].*' naming_test.cpp.dump || exit /b !errorlevel! - - name: Check windows.cpp syntax + - name: Check Windows test syntax if: matrix.config == 'debug' run: | cd test\cfg cl.exe windows.cpp -DUNICODE=1 -D_UNICODE=1 /Zs || exit /b !errorlevel! + cl.exe mfc.cpp /EHsc /Zs || exit /b !errorlevel! diff --git a/test/cfg/mfc.cpp b/test/cfg/mfc.cpp index 4c9cae78cfb..84a7d868971 100644 --- a/test/cfg/mfc.cpp +++ b/test/cfg/mfc.cpp @@ -4,13 +4,23 @@ #include -class MyClass : public CObject { - DECLARE_DYNAMIC(MyClass) - DECLARE_DYNCREATE(MyClass) - DECLARE_SERIAL(MyClass) +class MyClass1 : public CObject { + DECLARE_DYNAMIC(MyClass1) public: - MyClass() {} + MyClass1() {} }; -IMPLEMENT_DYNAMIC(MyClass, CObject) -IMPLEMENT_DYNCREATE(MyClass, CObject) -IMPLEMENT_SERIAL(MyClass,CObject, 42) \ No newline at end of file +IMPLEMENT_DYNAMIC(MyClass1, CObject) + +class MyClass2 : public CObject { + DECLARE_DYNCREATE(MyClass2) +public: + MyClass2() {} +}; +IMPLEMENT_DYNCREATE(MyClass2, CObject) + +class MyClass3 : public CObject { + DECLARE_SERIAL(MyClass3) +public: + MyClass3() {} +}; +IMPLEMENT_SERIAL(MyClass3, CObject, 42)