Skip to content

Commit 2804b30

Browse files
committed
Fix CI
1 parent eb158f8 commit 2804b30

6 files changed

Lines changed: 14 additions & 8 deletions

File tree

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ project(cppwinrt LANGUAGES CXX)
1313
set(CMAKE_CXX_STANDARD 20)
1414
set(CMAKE_CXX_STANDARD_REQUIRED True)
1515

16-
set(CPPWINRT_BUILD_VERSION "2.3.4.5" CACHE STRING "The version string used for cppwinrt.")
17-
if(CPPWINRT_BUILD_VERSION STREQUAL "2.3.4.5" OR CPPWINRT_BUILD_VERSION STREQUAL "0.0.0.0")
16+
set(CPPWINRT_BUILD_VERSION "1.2.3.4" CACHE STRING "The version string used for cppwinrt.")
17+
if(CPPWINRT_BUILD_VERSION STREQUAL "1.2.3.4" OR CPPWINRT_BUILD_VERSION STREQUAL "0.0.0.0")
1818
message(WARNING "CPPWINRT_BUILD_VERSION has been set to a dummy version string. Do not use in production!")
1919
endif()
2020
message(STATUS "Using version string: ${CPPWINRT_BUILD_VERSION}")

Directory.Build.Props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
</PropertyGroup>
3838

3939
<PropertyGroup>
40-
<CppWinRTBuildVersion Condition="'$(CppWinRTBuildVersion)'==''">2.3.4.5</CppWinRTBuildVersion>
40+
<CppWinRTBuildVersion Condition="'$(CppWinRTBuildVersion)'==''">1.2.3.4</CppWinRTBuildVersion>
4141
<CppWinRTPlatform>$(Platform)</CppWinRTPlatform>
4242
<CppWinRTPlatform Condition="'$(Platform)'=='Win32'">x86</CppWinRTPlatform>
4343
<OutDir>$(SolutionDir)_build\$(CppWinRTPlatform)\$(Configuration)\</OutDir>

build_test_all.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ call msbuild /p:Configuration=%target_configuration%,Platform=%target_platform%,
4444

4545
call msbuild /m /p:Configuration=%target_configuration%,Platform=%target_platform%,CppWinRTBuildVersion=%target_version% cppwinrt.slnx /t:test\test
4646
call msbuild /m /p:Configuration=%target_configuration%,Platform=%target_platform%,CppWinRTBuildVersion=%target_version% cppwinrt.slnx /t:test\test_cpp20
47-
call msbuild /m /p:Configuration=%target_configuration%,Platform=%target_platform%,CppWinRTBuildVersion=%target_version% cppwinrt.slnx /t:test\test_cpp23
4847
call msbuild /m /p:Configuration=%target_configuration%,Platform=%target_platform%,CppWinRTBuildVersion=%target_version% cppwinrt.slnx /t:test\test_cpp20_no_sourcelocation
48+
call msbuild /m /p:Configuration=%target_configuration%,Platform=%target_platform%,CppWinRTBuildVersion=%target_version% cppwinrt.slnx /t:test\test_cpp23
4949
call msbuild /m /p:Configuration=%target_configuration%,Platform=%target_platform%,CppWinRTBuildVersion=%target_version% cppwinrt.slnx /t:test\test_fast
5050
call msbuild /m /p:Configuration=%target_configuration%,Platform=%target_platform%,CppWinRTBuildVersion=%target_version% cppwinrt.slnx /t:test\test_slow
5151
call msbuild /m /p:Configuration=%target_configuration%,Platform=%target_platform%,CppWinRTBuildVersion=%target_version% cppwinrt.slnx /t:test\test_module_lock_custom

run_tests.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ if "%target_configuration%"=="" set target_configuration=Debug
1010

1111
call :run_test test
1212
call :run_test test_cpp20
13-
call :run_test test_cpp23
1413
call :run_test test_cpp20_no_sourcelocation
14+
call :run_test test_cpp23
1515
call :run_test test_fast
1616
call :run_test test_slow
1717
call :run_test test_old

test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ set(SKIP_LARGE_PCH FALSE CACHE BOOL "Skip building large precompiled headers.")
106106

107107
add_subdirectory(test)
108108
add_subdirectory(test_cpp20)
109-
add_subdirectory(test_cpp23)
110109
add_subdirectory(test_cpp20_no_sourcelocation)
110+
add_subdirectory(test_cpp23)
111111

112112
if(HAS_WINDOWSNUMERICS)
113113
add_subdirectory(old_tests)

test/test_cpp23/delegate_deducing_this.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,19 +93,23 @@ TEST_CASE("typedeventhandler")
9393
REQUIRE(sum == 3);
9494
}
9595

96+
#if !(defined(_M_IX86) && !defined(_M_X64) && defined(__clang__))
97+
// Clang 20 target x86 generates incorrect code for this test.
98+
// In observed_sender ctor (#1), this = X; in assignment operator (#2), this = X+16 (bytes).
99+
// FIXME: Enable the test after Clang is fixed
96100
TEST_CASE("observablevector_vectorchanged")
97101
{
98102
IObservableVector<int> vector = single_threaded_observable_vector<int>();
99103

100104
int called{};
101-
IObservableVector<int> observed_sender{ nullptr };
105+
IObservableVector<int> observed_sender{ nullptr }; // #1
102106
CollectionChange change{};
103107
uint32_t index{};
104108

105109
auto token = vector.VectorChanged([&](this auto, IObservableVector<int> sender, IVectorChangedEventArgs args)
106110
{
107111
++called;
108-
observed_sender = sender;
112+
observed_sender = sender; // #2
109113
change = args.CollectionChange();
110114
index = args.Index();
111115
});
@@ -121,3 +125,5 @@ TEST_CASE("observablevector_vectorchanged")
121125
}
122126

123127
#endif
128+
129+
#endif

0 commit comments

Comments
 (0)