Get rid of CppUnit boilerplate in wxList unit test No real changes.
Add MSVS 2026 solutions for tests and wxrc This should have been part of 3d88038 (Add support for MSVS 2026, 2026-01-29). Closes #26167.
Add skip_running_tests to the matrix in MSW CI workflow This is a bit more legible than testing for arm64 platform directly.
Add MSVS 2026 GitHub Actions CI job Use the new windows-2025-vs2026 runner for this. Add more matrix parameters to distinguish between the different compiler versions.
Allow comparing wxList::compatibility_iterator with nullptr This doesn't cost anything but allows the old code which relied on compatibility_iterator being implicitly convertible to a pointer (and hence comparable with nullptr) continue to compile and work. Add a unit test checking that this works as expected.
Don't generate any events after handling wxEVT_CHAR_HOOK Restore the expected behaviour of wxEVT_CHAR_HOOK which was broken when IME was in use by 7b8195f5c4 (Don't hang handling wxEVT_CHAR_HOOK while IME is used in wxMSW, 2025-12-11). Because we don't stop the event handling at Windows level in this case any more, we need to do it at wx level, so add an ad hoc check to ProcessMessage() to ensure that we block the unwanted events there. See #22473, #26027. Closes #26168. Closes #26170.
Merge branch 'list-compat-iter-cmp-null' Improve wxList::compatibility_iterator compatibility with 3.2. See #26164.
Merge branch 'ci-msvs2026' Add MSVS 2026 GitHub Actions CI job. See #26165.
| ... | ... | @@ -56,23 +56,42 @@ permissions: |
| 56 | 56 | |
| 57 | 57 | jobs:
|
| 58 | 58 | msw-msvs:
|
| 59 | - runs-on: windows-2022
|
|
| 60 | - name: wxMSW vs2022 ${{ matrix.configuration }} ${{ matrix.platform }}
|
|
| 59 | + runs-on: ${{ matrix.runner }}
|
|
| 60 | + name: wxMSW ${{ matrix.compiler }} ${{ matrix.configuration }} ${{ matrix.platform }}
|
|
| 61 | 61 | strategy:
|
| 62 | 62 | fail-fast: false
|
| 63 | 63 | matrix:
|
| 64 | 64 | include:
|
| 65 | 65 | - configuration: 'DLL Debug'
|
| 66 | 66 | platform: 'x64'
|
| 67 | + runner: windows-2022
|
|
| 68 | + compiler: vs2022
|
|
| 69 | + compiler_suffix: vc17.sln
|
|
| 67 | 70 | use_utf8: true
|
| 68 | 71 | - configuration: 'Release'
|
| 69 | 72 | platform: 'arm64'
|
| 73 | + runner: windows-2022
|
|
| 74 | + compiler: vs2022
|
|
| 75 | + compiler_suffix: vc17.sln
|
|
| 76 | + skip_running_tests: true
|
|
| 70 | 77 | - configuration: 'Debug'
|
| 71 | 78 | platform: 'Win32'
|
| 79 | + runner: windows-2022
|
|
| 80 | + compiler: vs2022
|
|
| 81 | + compiler_suffix: vc17.sln
|
|
| 72 | 82 | use_cxx20: true
|
| 73 | 83 | - configuration: 'DLL Release'
|
| 74 | 84 | use_std_string: true
|
| 75 | 85 | platform: 'x64'
|
| 86 | + runner: windows-2022
|
|
| 87 | + compiler: vs2022
|
|
| 88 | + compiler_suffix: vc17.sln
|
|
| 89 | + - configuration: 'DLL Release'
|
|
| 90 | + platform: 'x64'
|
|
| 91 | + runner: windows-2025-vs2026
|
|
| 92 | + compiler: vs2026
|
|
| 93 | + compiler_suffix: vc18.slnx
|
|
| 94 | + use_cxx20: true
|
|
| 76 | 95 | |
| 77 | 96 | steps:
|
| 78 | 97 | - name: Checkout
|
| ... | ... | @@ -111,7 +130,7 @@ jobs: |
| 111 | 130 | |
| 112 | 131 | - name: Build
|
| 113 | 132 | run: |
|
| 114 | - msbuild /noLogo /m /warnaserror '/p:Configuration=${{ matrix.configuration }}' /p:Platform=${{ matrix.platform }} build\msw\wx_vc17.sln
|
|
| 133 | + msbuild /noLogo /m /warnaserror '/p:Configuration=${{ matrix.configuration }}' /p:Platform=${{ matrix.platform }} build\msw\wx_${{ matrix.compiler_suffix }}
|
|
| 115 | 134 | if ( '${{ matrix.configuration }}'.IndexOf('DLL') -ne -1 ) {
|
| 116 | 135 | $dlldir = Join-Path (Get-Location) 'lib\vc_${{ matrix.platform }}_dll'
|
| 117 | 136 | Write-Output "Adding $dlldir to the PATH"
|
| ... | ... | @@ -121,14 +140,14 @@ jobs: |
| 121 | 140 | - name: Build samples
|
| 122 | 141 | if: matrix.platform != 'arm64'
|
| 123 | 142 | run: |
|
| 124 | - msbuild /noLogo /m /warnaserror '/p:Configuration=${{ matrix.configuration }}' /p:Platform=${{ matrix.platform }} samples\samples_vc17.sln
|
|
| 143 | + msbuild /noLogo /m /warnaserror '/p:Configuration=${{ matrix.configuration }}' /p:Platform=${{ matrix.platform }} samples\samples_${{ matrix.compiler_suffix }}
|
|
| 125 | 144 | |
| 126 | 145 | - name: Build tests
|
| 127 | 146 | run: |
|
| 128 | - msbuild /noLogo /m /warnaserror '/p:Configuration=${{ matrix.configuration }}' /p:Platform=${{ matrix.platform }} tests\test_vc17.sln
|
|
| 147 | + msbuild /noLogo /m /warnaserror '/p:Configuration=${{ matrix.configuration }}' /p:Platform=${{ matrix.platform }} tests\test_${{ matrix.compiler_suffix }}
|
|
| 129 | 148 | |
| 130 | 149 | - name: Run tests
|
| 131 | - if: ${{ !contains(matrix.platform, 'arm64') }}
|
|
| 150 | + if: matrix.skip_running_tests != true
|
|
| 132 | 151 | working-directory: tests
|
| 133 | 152 | run: |
|
| 134 | 153 | go install github.com/mccutchen/go-httpbin/v2/cmd/go-httpbin@v2
|
| ... | ... | @@ -150,10 +169,10 @@ jobs: |
| 150 | 169 | |
| 151 | 170 | - name: Build GUI tests
|
| 152 | 171 | run: |
|
| 153 | - msbuild /noLogo /m /warnaserror '/p:Configuration=${{ matrix.configuration }}' /p:Platform=${{ matrix.platform }} tests\test_gui_vc17.sln
|
|
| 172 | + msbuild /noLogo /m /warnaserror '/p:Configuration=${{ matrix.configuration }}' /p:Platform=${{ matrix.platform }} tests\test_gui_${{ matrix.compiler_suffix }}
|
|
| 154 | 173 | |
| 155 | 174 | - name: Run GUI tests
|
| 156 | - if: ${{ !contains(matrix.platform, 'arm64') }}
|
|
| 175 | + if: matrix.skip_running_tests != true
|
|
| 157 | 176 | working-directory: tests
|
| 158 | 177 | run: |
|
| 159 | 178 | .\vc*msw*\test_gui.exe |
| ... | ... | @@ -36,6 +36,7 @@ |
| 36 | 36 | #if wxUSE_STD_CONTAINERS
|
| 37 | 37 | #include "wx/beforestd.h"
|
| 38 | 38 | #include <algorithm>
|
| 39 | + #include <cstddef>
|
|
| 39 | 40 | #include <iterator>
|
| 40 | 41 | #include <list>
|
| 41 | 42 | #include "wx/afterstd.h"
|
| ... | ... | @@ -121,6 +122,11 @@ public: |
| 121 | 122 | bool operator !() const
|
| 122 | 123 | { return !( operator bool() ); }
|
| 123 | 124 | |
| 125 | + bool operator==(std::nullptr_t) const
|
|
| 126 | + { return !*this; }
|
|
| 127 | + bool operator!=(std::nullptr_t) const
|
|
| 128 | + { return !(*this == nullptr); }
|
|
| 129 | + |
|
| 124 | 130 | elT GetData() const
|
| 125 | 131 | { return *m_iter; }
|
| 126 | 132 | void SetData( elT e )
|
| ... | ... | @@ -37,6 +37,9 @@ |
| 37 | 37 | using wxMsgList = std::list<MSG>;
|
| 38 | 38 | #endif // wxUSE_THREADS
|
| 39 | 39 | |
| 40 | +// This is defined in src/msw/window.cpp.
|
|
| 41 | +extern WPARAM wxVKBlockedByKeyboardHook;
|
|
| 42 | + |
|
| 40 | 43 | // ============================================================================
|
| 41 | 44 | // GUI wxEventLoop implementation
|
| 42 | 45 | // ============================================================================
|
| ... | ... | @@ -117,6 +120,26 @@ bool wxGUIEventLoop::PreProcessMessage(WXMSG *msg) |
| 117 | 120 | |
| 118 | 121 | void wxGUIEventLoop::ProcessMessage(WXMSG *msg)
|
| 119 | 122 | {
|
| 123 | + // Workaround for the workaround for the problem of IME hanging if it
|
|
| 124 | + // doesn't get all keyboard messages in wxKeyboardHook(): as we can't
|
|
| 125 | + // afford to ignore the keyboard event at Windows level, we ignore it here
|
|
| 126 | + // instead.
|
|
| 127 | + if ( msg->message == WM_KEYDOWN && wxVKBlockedByKeyboardHook )
|
|
| 128 | + {
|
|
| 129 | + if ( msg->wParam == wxVKBlockedByKeyboardHook )
|
|
| 130 | + {
|
|
| 131 | + wxVKBlockedByKeyboardHook = 0;
|
|
| 132 | + return;
|
|
| 133 | + }
|
|
| 134 | + else
|
|
| 135 | + {
|
|
| 136 | + // This shouldn't normally happen.
|
|
| 137 | + wxLogDebug("Unexpected WM_KEYDOWN for %x after hook blocked %x",
|
|
| 138 | + static_cast<unsigned>(msg->wParam),
|
|
| 139 | + static_cast<unsigned>(wxVKBlockedByKeyboardHook));
|
|
| 140 | + }
|
|
| 141 | + }
|
|
| 142 | + |
|
| 120 | 143 | // give us the chance to preprocess the message first
|
| 121 | 144 | if ( !PreProcessMessage(msg) )
|
| 122 | 145 | {
|
| ... | ... | @@ -146,6 +146,11 @@ extern wxPopupWindow* wxCurrentPopupWindow; |
| 146 | 146 | wxWindowMSW *wxWindowBeingErased = nullptr;
|
| 147 | 147 | #endif // wxUSE_UXTHEME
|
| 148 | 148 | |
| 149 | +// Set to the key code of the pressed key if we need to ignore it but couldn't
|
|
| 150 | +// return 1 from the keyboard hook because we had to leave the IME edit this
|
|
| 151 | +// event, see wxKeyboardHook() code.
|
|
| 152 | +WPARAM wxVKBlockedByKeyboardHook = 0;
|
|
| 153 | + |
|
| 149 | 154 | namespace
|
| 150 | 155 | {
|
| 151 | 156 | |
| ... | ... | @@ -7342,6 +7347,13 @@ wxKeyboardHook(int nCode, WXWPARAM wParam, WXLPARAM lParam) |
| 7342 | 7347 | // Stop processing of this event.
|
| 7343 | 7348 | return 1;
|
| 7344 | 7349 | }
|
| 7350 | + |
|
| 7351 | + // Because we don't stop processing of the event at
|
|
| 7352 | + // Windows level, we are going to get WM_KEYDOWN for
|
|
| 7353 | + // this key, but we need to ignore it as it's not
|
|
| 7354 | + // supposed to be generated if wxEVT_CHAR_HOOK handled
|
|
| 7355 | + // the event.
|
|
| 7356 | + wxVKBlockedByKeyboardHook = wParam;
|
|
| 7345 | 7357 | }
|
| 7346 | 7358 | }
|
| 7347 | 7359 | }
|
| ... | ... | @@ -21,34 +21,12 @@ |
| 21 | 21 | |
| 22 | 22 | #include <memory>
|
| 23 | 23 | |
| 24 | -// --------------------------------------------------------------------------
|
|
| 25 | -// test class
|
|
| 26 | -// --------------------------------------------------------------------------
|
|
| 24 | +// ----------------------------------------------------------------------------
|
|
| 25 | +// helpers
|
|
| 26 | +// ----------------------------------------------------------------------------
|
|
| 27 | 27 | |
| 28 | -class ListsTestCase : public CppUnit::TestCase
|
|
| 28 | +namespace
|
|
| 29 | 29 | {
|
| 30 | -public:
|
|
| 31 | - ListsTestCase() { }
|
|
| 32 | - |
|
| 33 | -private:
|
|
| 34 | - CPPUNIT_TEST_SUITE( ListsTestCase );
|
|
| 35 | - CPPUNIT_TEST( wxListTest );
|
|
| 36 | - CPPUNIT_TEST( wxStdListTest );
|
|
| 37 | - CPPUNIT_TEST( wxListCtorTest );
|
|
| 38 | - CPPUNIT_TEST_SUITE_END();
|
|
| 39 | - |
|
| 40 | - void wxListTest();
|
|
| 41 | - void wxStdListTest();
|
|
| 42 | - void wxListCtorTest();
|
|
| 43 | - |
|
| 44 | - wxDECLARE_NO_COPY_CLASS(ListsTestCase);
|
|
| 45 | -};
|
|
| 46 | - |
|
| 47 | -// register in the unnamed registry so that these tests are run by default
|
|
| 48 | -CPPUNIT_TEST_SUITE_REGISTRATION( ListsTestCase );
|
|
| 49 | - |
|
| 50 | -// also include in its own registry so that these tests can be run alone
|
|
| 51 | -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( ListsTestCase, "ListsTestCase" );
|
|
| 52 | 30 | |
| 53 | 31 | class Baz // Foo is already taken in the hash test
|
| 54 | 32 | {
|
| ... | ... | @@ -69,6 +47,8 @@ private: |
| 69 | 47 | |
| 70 | 48 | size_t Baz::ms_bars = 0;
|
| 71 | 49 | |
| 50 | +} // anonymous namespace
|
|
| 51 | + |
|
| 72 | 52 | #include "wx/list.h"
|
| 73 | 53 | |
| 74 | 54 | WX_DECLARE_LIST(Baz, wxListBazs);
|
| ... | ... | @@ -78,7 +58,7 @@ WX_DEFINE_LIST(wxListBazs) |
| 78 | 58 | WX_DECLARE_LIST(int, wxListInt);
|
| 79 | 59 | WX_DEFINE_LIST(wxListInt)
|
| 80 | 60 | |
| 81 | -void ListsTestCase::wxListTest()
|
|
| 61 | +TEST_CASE("wxList", "[list]")
|
|
| 82 | 62 | {
|
| 83 | 63 | wxListInt list1;
|
| 84 | 64 | int dummy[5];
|
| ... | ... | @@ -87,17 +67,17 @@ void ListsTestCase::wxListTest() |
| 87 | 67 | for ( i = 0; i < WXSIZEOF(dummy); ++i )
|
| 88 | 68 | list1.Append(dummy + i);
|
| 89 | 69 | |
| 90 | - CPPUNIT_ASSERT_EQUAL( WXSIZEOF(dummy), list1.GetCount() );
|
|
| 91 | - CPPUNIT_ASSERT_EQUAL( dummy + 3, list1.Item(3)->GetData() );
|
|
| 92 | - CPPUNIT_ASSERT( list1.Find(dummy + 4) );
|
|
| 70 | + CHECK( list1.GetCount() == WXSIZEOF(dummy) );
|
|
| 71 | + CHECK( list1.Item(3)->GetData() == dummy + 3 );
|
|
| 72 | + CHECK( list1.Find(dummy + 4) );
|
|
| 93 | 73 | |
| 94 | 74 | wxListInt::compatibility_iterator node;
|
| 95 | 75 | for ( i = 0, node = list1.GetFirst(); node; ++i, node = node->GetNext() )
|
| 96 | 76 | {
|
| 97 | - CPPUNIT_ASSERT_EQUAL( dummy + i, node->GetData() );
|
|
| 77 | + CHECK( node->GetData() == dummy + i );
|
|
| 98 | 78 | }
|
| 99 | 79 | |
| 100 | - CPPUNIT_ASSERT_EQUAL( i, list1.GetCount() );
|
|
| 80 | + CHECK( list1.GetCount() == i );
|
|
| 101 | 81 | |
| 102 | 82 | list1.Insert(dummy + 0);
|
| 103 | 83 | list1.Insert(1, dummy + 1);
|
| ... | ... | @@ -106,11 +86,11 @@ void ListsTestCase::wxListTest() |
| 106 | 86 | for ( i = 0, node = list1.GetFirst(); i < 3; ++i, node = node->GetNext() )
|
| 107 | 87 | {
|
| 108 | 88 | int* t = node->GetData();
|
| 109 | - CPPUNIT_ASSERT_EQUAL( dummy + i, t );
|
|
| 89 | + CHECK( t == dummy + i );
|
|
| 110 | 90 | }
|
| 111 | 91 | }
|
| 112 | 92 | |
| 113 | -void ListsTestCase::wxStdListTest()
|
|
| 93 | +TEST_CASE("wxList::std", "[list][std]")
|
|
| 114 | 94 | {
|
| 115 | 95 | wxListInt list1;
|
| 116 | 96 | wxListInt::iterator it, en;
|
| ... | ... | @@ -123,22 +103,22 @@ void ListsTestCase::wxStdListTest() |
| 123 | 103 | for ( it = list1.begin(), en = list1.end(), i = 0;
|
| 124 | 104 | it != en; ++it, ++i )
|
| 125 | 105 | {
|
| 126 | - CPPUNIT_ASSERT( *it == i + &i );
|
|
| 106 | + CHECK( *it == i + &i );
|
|
| 127 | 107 | }
|
| 128 | 108 | |
| 129 | 109 | for ( rit = list1.rbegin(), ren = list1.rend(), i = 4;
|
| 130 | 110 | rit != ren; ++rit, --i )
|
| 131 | 111 | {
|
| 132 | - CPPUNIT_ASSERT( *rit == i + &i );
|
|
| 112 | + CHECK( *rit == i + &i );
|
|
| 133 | 113 | }
|
| 134 | 114 | |
| 135 | - CPPUNIT_ASSERT( *list1.rbegin() == *--list1.end() );
|
|
| 136 | - CPPUNIT_ASSERT( *list1.begin() == *--list1.rend() );
|
|
| 137 | - CPPUNIT_ASSERT( *list1.begin() == *--++list1.begin() );
|
|
| 138 | - CPPUNIT_ASSERT( *list1.rbegin() == *--++list1.rbegin() );
|
|
| 115 | + CHECK( *list1.rbegin() == *--list1.end() );
|
|
| 116 | + CHECK( *list1.begin() == *--list1.rend() );
|
|
| 117 | + CHECK( *list1.begin() == *--++list1.begin() );
|
|
| 118 | + CHECK( *list1.rbegin() == *--++list1.rbegin() );
|
|
| 139 | 119 | |
| 140 | - CPPUNIT_ASSERT( list1.front() == &i );
|
|
| 141 | - CPPUNIT_ASSERT( list1.back() == &i + 4 );
|
|
| 120 | + CHECK( list1.front() == &i );
|
|
| 121 | + CHECK( list1.back() == &i + 4 );
|
|
| 142 | 122 | |
| 143 | 123 | list1.erase(list1.begin());
|
| 144 | 124 | list1.erase(--list1.end());
|
| ... | ... | @@ -146,41 +126,41 @@ void ListsTestCase::wxStdListTest() |
| 146 | 126 | for ( it = list1.begin(), en = list1.end(), i = 1;
|
| 147 | 127 | it != en; ++it, ++i )
|
| 148 | 128 | {
|
| 149 | - CPPUNIT_ASSERT( *it == i + &i );
|
|
| 129 | + CHECK( *it == i + &i );
|
|
| 150 | 130 | }
|
| 151 | 131 | |
| 152 | 132 | list1.clear();
|
| 153 | - CPPUNIT_ASSERT( list1.empty() );
|
|
| 133 | + CHECK( list1.empty() );
|
|
| 154 | 134 | |
| 155 | 135 | it = list1.insert(list1.end(), (int *)1);
|
| 156 | - CPPUNIT_ASSERT_EQUAL( (int *)1, *it );
|
|
| 157 | - CPPUNIT_ASSERT( it == list1.begin() );
|
|
| 158 | - CPPUNIT_ASSERT_EQUAL( (int *)1, list1.front() );
|
|
| 136 | + CHECK( *it == (int *)1 );
|
|
| 137 | + CHECK( it == list1.begin() );
|
|
| 138 | + CHECK( list1.front() == (int *)1 );
|
|
| 159 | 139 | |
| 160 | 140 | it = list1.insert(list1.end(), (int *)2);
|
| 161 | - CPPUNIT_ASSERT_EQUAL( (int *)2, *it );
|
|
| 162 | - CPPUNIT_ASSERT( ++it == list1.end() );
|
|
| 163 | - CPPUNIT_ASSERT_EQUAL( (int *)2, list1.back() );
|
|
| 141 | + CHECK( *it == (int *)2 );
|
|
| 142 | + CHECK( ++it == list1.end() );
|
|
| 143 | + CHECK( list1.back() == (int *)2 );
|
|
| 164 | 144 | |
| 165 | 145 | it = list1.begin();
|
| 166 | 146 | wxListInt::iterator it2 = list1.insert(++it, (int *)3);
|
| 167 | - CPPUNIT_ASSERT_EQUAL( (int *)3, *it2 );
|
|
| 147 | + CHECK( *it2 == (int *)3 );
|
|
| 168 | 148 | |
| 169 | 149 | it = list1.begin();
|
| 170 | 150 | it = list1.erase(++it, list1.end());
|
| 171 | - CPPUNIT_ASSERT_EQUAL( 1, list1.size() );
|
|
| 172 | - CPPUNIT_ASSERT( it == list1.end() );
|
|
| 151 | + CHECK( list1.size() == 1 );
|
|
| 152 | + CHECK( it == list1.end() );
|
|
| 173 | 153 | |
| 174 | 154 | wxListInt list2;
|
| 175 | 155 | list2.push_back((int *)3);
|
| 176 | 156 | list2.push_back((int *)4);
|
| 177 | 157 | list1.insert(list1.begin(), list2.begin(), list2.end());
|
| 178 | - CPPUNIT_ASSERT_EQUAL( 3, list1.size() );
|
|
| 179 | - CPPUNIT_ASSERT_EQUAL( (int *)3, list1.front() );
|
|
| 158 | + CHECK( list1.size() == 3 );
|
|
| 159 | + CHECK( list1.front() == (int *)3 );
|
|
| 180 | 160 | |
| 181 | 161 | list1.insert(list1.end(), list2.begin(), list2.end());
|
| 182 | - CPPUNIT_ASSERT_EQUAL( 5, list1.size() );
|
|
| 183 | - CPPUNIT_ASSERT_EQUAL( (int *)4, list1.back() );
|
|
| 162 | + CHECK( list1.size() == 5 );
|
|
| 163 | + CHECK( list1.back() == (int *)4 );
|
|
| 184 | 164 | |
| 185 | 165 | // Sort the list in the reverse order.
|
| 186 | 166 | list1.Sort([](const void *a, const void *b) -> int {
|
| ... | ... | @@ -191,27 +171,50 @@ void ListsTestCase::wxStdListTest() |
| 191 | 171 | CHECK( list1.back() == (int *)1 );
|
| 192 | 172 | }
|
| 193 | 173 | |
| 194 | -void ListsTestCase::wxListCtorTest()
|
|
| 174 | +TEST_CASE("wxList::ctor", "[list]")
|
|
| 195 | 175 | {
|
| 196 | 176 | {
|
| 197 | 177 | wxListBazs list1;
|
| 198 | 178 | list1.Append(new Baz(wxT("first")));
|
| 199 | 179 | list1.Append(new Baz(wxT("second")));
|
| 200 | 180 | |
| 201 | - CPPUNIT_ASSERT( list1.GetCount() == 2 );
|
|
| 202 | - CPPUNIT_ASSERT( Baz::GetNumber() == 2 );
|
|
| 181 | + CHECK( list1.GetCount() == 2 );
|
|
| 182 | + CHECK( Baz::GetNumber() == 2 );
|
|
| 203 | 183 | |
| 204 | 184 | wxListBazs list2;
|
| 205 | 185 | list2 = list1;
|
| 206 | 186 | |
| 207 | - CPPUNIT_ASSERT( list1.GetCount() == 2 );
|
|
| 208 | - CPPUNIT_ASSERT( list2.GetCount() == 2 );
|
|
| 209 | - CPPUNIT_ASSERT( Baz::GetNumber() == 2 );
|
|
| 187 | + CHECK( list1.GetCount() == 2 );
|
|
| 188 | + CHECK( list2.GetCount() == 2 );
|
|
| 189 | + CHECK( Baz::GetNumber() == 2 );
|
|
| 210 | 190 | |
| 211 | 191 | list1.DeleteContents(true);
|
| 212 | 192 | }
|
| 213 | 193 | |
| 214 | - CPPUNIT_ASSERT( Baz::GetNumber() == 0 );
|
|
| 194 | + CHECK( Baz::GetNumber() == 0 );
|
|
| 195 | +}
|
|
| 196 | + |
|
| 197 | +TEST_CASE("wxList::iterator::cmp", "[list]")
|
|
| 198 | +{
|
|
| 199 | + int dummy[2];
|
|
| 200 | + |
|
| 201 | + wxListInt list;
|
|
| 202 | + list.push_back(dummy);
|
|
| 203 | + list.push_back(dummy + 1);
|
|
| 204 | + |
|
| 205 | + wxListInt::compatibility_iterator it = list.GetFirst();
|
|
| 206 | + CHECK( it == it );
|
|
| 207 | + CHECK( it != nullptr );
|
|
| 208 | + |
|
| 209 | + const wxListInt::compatibility_iterator last = list.GetLast();
|
|
| 210 | + CHECK( last != nullptr );
|
|
| 211 | + CHECK( it != last );
|
|
| 212 | + |
|
| 213 | + it = list.Item(1);
|
|
| 214 | + CHECK( it == last );
|
|
| 215 | + |
|
| 216 | + it = list.Find(dummy + 2);
|
|
| 217 | + CHECK( it == nullptr );
|
|
| 215 | 218 | }
|
| 216 | 219 | |
| 217 | 220 | // Check for WX_DECLARE_LIST_3 which is used to define wxWindowList: we can't
|
| 1 | +<Solution>
|
|
| 2 | + <Configurations>
|
|
| 3 | + <BuildType Name="Debug" />
|
|
| 4 | + <BuildType Name="DLL Debug" />
|
|
| 5 | + <BuildType Name="DLL Release" />
|
|
| 6 | + <BuildType Name="Release" />
|
|
| 7 | + <Platform Name="ARM64" />
|
|
| 8 | + <Platform Name="ARM64EC" />
|
|
| 9 | + <Platform Name="Win32" />
|
|
| 10 | + <Platform Name="x64" />
|
|
| 11 | + </Configurations>
|
|
| 12 | + <Project Path="../build/msw/wx_aui.vcxproj" Id="a16d3832-0f42-57ce-8f48-50e06649ade8" />
|
|
| 13 | + <Project Path="../build/msw/wx_base.vcxproj" Id="3fcc50c2-81e9-5db2-b8d8-2129427568b1" />
|
|
| 14 | + <Project Path="../build/msw/wx_core.vcxproj" Id="6744dad8-9c70-574a-bff2-9f8dddb24a75" />
|
|
| 15 | + <Project Path="../build/msw/wx_html.vcxproj" Id="33cc42f9-7756-5587-863c-8d4461b7c5dd" />
|
|
| 16 | + <Project Path="../build/msw/wx_media.vcxproj" Id="8bd8f8d9-4275-5b42-a8f4-f1db2970a550" />
|
|
| 17 | + <Project Path="../build/msw/wx_net.vcxproj" Id="69f2ede4-7d21-5738-9bc0-f66f61c9ae00" />
|
|
| 18 | + <Project Path="../build/msw/wx_propgrid.vcxproj" Id="97fdab45-9c58-5bc5-a2f4-ee42739ebc63" />
|
|
| 19 | + <Project Path="../build/msw/wx_richtext.vcxproj" Id="7fb0902d-8579-5dce-b883-daf66a885005" />
|
|
| 20 | + <Project Path="../build/msw/wx_stc.vcxproj" Id="23e1c437-a951-5943-8639-a17f3cf2e606" />
|
|
| 21 | + <Project Path="../build/msw/wx_webview.vcxproj" Id="a8e8442a-078a-5fc5-b495-8d71ba77ee6e" />
|
|
| 22 | + <Project Path="../build/msw/wx_xml.vcxproj" Id="3e6dca27-5fa3-53ec-bbd6-2d42294b7ae6" />
|
|
| 23 | + <Project Path="../build/msw/wx_xrc.vcxproj" Id="09f2f96a-1cc6-5e43-af1d-956ec2a4888d" />
|
|
| 24 | + <Project Path="test_gui.vcxproj" Id="9bb295d9-a6aa-510d-aa0d-9375b5d91025">
|
|
| 25 | + <BuildDependency Project="../build/msw/wx_aui.vcxproj" />
|
|
| 26 | + <BuildDependency Project="../build/msw/wx_base.vcxproj" />
|
|
| 27 | + <BuildDependency Project="../build/msw/wx_core.vcxproj" />
|
|
| 28 | + <BuildDependency Project="../build/msw/wx_html.vcxproj" />
|
|
| 29 | + <BuildDependency Project="../build/msw/wx_media.vcxproj" />
|
|
| 30 | + <BuildDependency Project="../build/msw/wx_net.vcxproj" />
|
|
| 31 | + <BuildDependency Project="../build/msw/wx_propgrid.vcxproj" />
|
|
| 32 | + <BuildDependency Project="../build/msw/wx_richtext.vcxproj" />
|
|
| 33 | + <BuildDependency Project="../build/msw/wx_stc.vcxproj" />
|
|
| 34 | + <BuildDependency Project="../build/msw/wx_webview.vcxproj" />
|
|
| 35 | + <BuildDependency Project="../build/msw/wx_xml.vcxproj" />
|
|
| 36 | + <BuildDependency Project="../build/msw/wx_xrc.vcxproj" />
|
|
| 37 | + </Project>
|
|
| 38 | +</Solution> |
| 1 | +<Solution>
|
|
| 2 | + <Configurations>
|
|
| 3 | + <BuildType Name="Debug" />
|
|
| 4 | + <BuildType Name="DLL Debug" />
|
|
| 5 | + <BuildType Name="DLL Release" />
|
|
| 6 | + <BuildType Name="Release" />
|
|
| 7 | + <Platform Name="ARM64" />
|
|
| 8 | + <Platform Name="ARM64EC" />
|
|
| 9 | + <Platform Name="Win32" />
|
|
| 10 | + <Platform Name="x64" />
|
|
| 11 | + </Configurations>
|
|
| 12 | + <Project Path="../build/msw/wx_base.vcxproj" />
|
|
| 13 | + <Project Path="../build/msw/wx_net.vcxproj" />
|
|
| 14 | + <Project Path="../build/msw/wx_xml.vcxproj" />
|
|
| 15 | + <Project Path="test.vcxproj">
|
|
| 16 | + <BuildDependency Project="../build/msw/wx_base.vcxproj" />
|
|
| 17 | + <BuildDependency Project="../build/msw/wx_net.vcxproj" />
|
|
| 18 | + <BuildDependency Project="../build/msw/wx_xml.vcxproj" />
|
|
| 19 | + </Project>
|
|
| 20 | +</Solution> |
| 1 | +<Solution>
|
|
| 2 | + <Configurations>
|
|
| 3 | + <BuildType Name="Debug" />
|
|
| 4 | + <BuildType Name="DLL Debug" />
|
|
| 5 | + <BuildType Name="DLL Release" />
|
|
| 6 | + <BuildType Name="Release" />
|
|
| 7 | + <Platform Name="Win32" />
|
|
| 8 | + <Platform Name="x64" />
|
|
| 9 | + </Configurations>
|
|
| 10 | + <Project Path="../../build/msw/wx_base.vcxproj" Id="3fcc50c2-81e9-5db2-b8d8-2129427568b1" />
|
|
| 11 | + <Project Path="../../build/msw/wx_xml.vcxproj" Id="3e6dca27-5fa3-53ec-bbd6-2d42294b7ae6" />
|
|
| 12 | + <Project Path="wxrc.vcxproj" Id="af3b845a-1816-49f3-ab4b-a1b418df33a8">
|
|
| 13 | + <BuildDependency Project="../../build/msw/wx_base.vcxproj" />
|
|
| 14 | + <BuildDependency Project="../../build/msw/wx_xml.vcxproj" />
|
|
| 15 | + </Project>
|
|
| 16 | +</Solution> |
—
View it on GitLab.
You're receiving this email because of your account on gitlab.com. Manage all notifications · Help