-
Notifications
You must be signed in to change notification settings - Fork 263
Enable more tests on llvm-mingw and some fixes #1229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
06bc152
Enable test_cpp20 for llvm-mingw
alvinhochun cc78e04
Enable test_old for llvm-mingw
alvinhochun e057f10
Fetch windowsnumerics.impl.h to enable tests on llvm-mingw
alvinhochun 3d9f500
Enable more test cases that works on llvm-mingw
alvinhochun 88d13a8
Set language to English in some tests
alvinhochun 1e2e3aa
Use lowercase Windows include headers
alvinhochun File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| add_subdirectory(UnitTests) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| file(GLOB TEST_SRCS | ||
| LIST_DIRECTORIES false | ||
| CONFIGURE_DEPENDS | ||
| *.cpp | ||
| ) | ||
| list(FILTER TEST_SRCS EXCLUDE REGEX "/(Main|pch)\\.cpp") | ||
|
|
||
|
|
||
| # We can't build custom Component for mingw-w64 because it doesn't have an | ||
| # alternative to midl that can produce winmd files. | ||
| list(APPEND BROKEN_TESTS | ||
| Boxing2 | ||
| Composable | ||
| Errors | ||
| Events | ||
| FastInput | ||
| Parameters | ||
| StructCodeGen | ||
| Structures | ||
| delegate_weak_strong | ||
| factory_cache | ||
| get_activation_factory | ||
| smart_pointers | ||
| ) | ||
|
|
||
| list(APPEND BROKEN_TESTS | ||
| # Missing `Windows.Applicationmodel.Activation.h` | ||
| constexpr | ||
|
|
||
| # Missing `Windows.ApplicationModel.Appointments.h` | ||
| enum_flags | ||
|
|
||
| # Missing component `Reflect`. | ||
| # Test is also not included in the VS project. | ||
| reflect | ||
|
|
||
| # Segfault in winrt::impl::natvis::abi_val. | ||
| # Test is also not included in the VS project. | ||
| natvis | ||
| ) | ||
|
|
||
| # Exclude broken tests | ||
| foreach(TEST_SRCS_EXCLUDE_ITEM IN LISTS BROKEN_TESTS) | ||
| list(FILTER TEST_SRCS EXCLUDE REGEX "/${TEST_SRCS_EXCLUDE_ITEM}\\.cpp") | ||
| endforeach() | ||
|
|
||
| add_executable(test_old Main.cpp ${TEST_SRCS}) | ||
| target_link_libraries(test_old runtimeobject synchronization) | ||
|
|
||
| target_precompile_headers(test_old PRIVATE pch.h) | ||
| set_source_files_properties( | ||
| conditional_implements_pure.cpp | ||
| PROPERTIES SKIP_PRECOMPILE_HEADERS true | ||
| ) | ||
|
|
||
| add_dependencies(test_old build-cppwinrt-projection) | ||
|
|
||
| add_test( | ||
| NAME test_old | ||
| COMMAND "$<TARGET_FILE:test_old>" | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this lambda has no captures, it can be converted to a normal function with __stdcall.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That can work though it's not as clean as it currently is. However, the test that actually requires this code cannot be built due to missing
__uuidof(IContextCallback)(which has been fixed on mingw-w64 upstream, but the current llvm-mingw 15 toolchain doesn't have the fix), so there is no harm just leaving this out for now.