Repository navigation
refactor(tests): CMake-based CDB, workspace fixture, test cleanup #378
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 4 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
5fdd857
refactor(tests): unify TempFile→TempDir, extract shared helpers
16bit-ykiko 3241c5e
refactor(tests): move LSP helpers to CliceClient methods
16bit-ykiko e5e60f5
refactor(tests): use CMake+Ninja to generate CDB for module tests
16bit-ykiko 217982e
fix(tests): address CodeRabbit review comments
16bit-ykiko 76dd648
fix(tests): use CMake 3.28 FILE_SET CXX_MODULES for proper module sup…
16bit-ykiko dd7f31d
fix(tests): stop copying CDB from build/ to workspace root
16bit-ykiko 8fa3e11
fix(tests): use CMake 3.28 FILE_SET CXX_MODULES for proper module sup…
16bit-ykiko abf08c7
refactor(tests): add @pytest.mark.workspace decorator for cleaner tes…
16bit-ykiko 9c435b1
refactor(tests): auto-initialize client in fixture, add type annotations
16bit-ykiko 7047cb4
style(tests): remove type annotations from test function parameters
16bit-ykiko 7a22571
fix(tests): use AsyncGenerator for client fixture return type
16bit-ykiko b89b8b8
refactor(tests): use asyncio_mode=auto, clean up redundant comments, …
16bit-ykiko 40c3450
fix(tests): fix cmake CDB generation on macOS CI
16bit-ykiko 8555072
fix(tests): correct expected error line in test_module_compile_error
16bit-ykiko c135864
fix(tests): use project toolchain for CDB generation on macOS CI
16bit-ykiko b7c1fa2
fix(tests): disable CMAKE_CXX_SCAN_FOR_MODULES for Windows CI
16bit-ykiko aa4e3dd
refactor: use clang++ instead of clang-cl on Windows
16bit-ykiko 5f95196
fix(tests): address CodeRabbit review feedback
16bit-ykiko 10b56f8
refactor: use clang++ instead of clang-cl on Windows
16bit-ykiko ce1aabd
fix: restore clang-cl ASan linking logic alongside clang++ path
16bit-ykiko 0f945c5
refactor: simplify toolchain and fix ASan detection for clang++ on Wi…
16bit-ykiko 6d17812
fix(windows): disable ICF in Debug to avoid ASan ODR false positives
16bit-ykiko 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
Some comments aren't visible on the classic Files Changed page.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| cmake_minimum_required(VERSION 3.20) | ||
| project(chained_modules CXX) | ||
|
|
||
| set(CMAKE_CXX_STANDARD 20) | ||
| set(CMAKE_CXX_EXTENSIONS OFF) | ||
|
|
||
| set(SOURCES mod_a.cppm mod_b.cppm) | ||
| set_source_files_properties(${SOURCES} PROPERTIES LANGUAGE CXX) | ||
| add_library(test OBJECT ${SOURCES}) |
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,9 @@ | ||
| cmake_minimum_required(VERSION 3.20) | ||
| project(circular_module_dependency CXX) | ||
|
|
||
| set(CMAKE_CXX_STANDARD 20) | ||
| set(CMAKE_CXX_EXTENSIONS OFF) | ||
|
|
||
| set(SOURCES cycle_a.cppm cycle_b.cppm ok.cppm) | ||
| set_source_files_properties(${SOURCES} PROPERTIES LANGUAGE CXX) | ||
| add_library(test OBJECT ${SOURCES}) |
9 changes: 9 additions & 0 deletions
9
tests/data/modules/class_export_and_inheritance/CMakeLists.txt
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,9 @@ | ||
| cmake_minimum_required(VERSION 3.20) | ||
| project(class_export_and_inheritance CXX) | ||
|
|
||
| set(CMAKE_CXX_STANDARD 20) | ||
| set(CMAKE_CXX_EXTENSIONS OFF) | ||
|
|
||
| set(SOURCES shape.cppm circle.cppm) | ||
| set_source_files_properties(${SOURCES} PROPERTIES LANGUAGE CXX) | ||
| add_library(test OBJECT ${SOURCES}) |
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,9 @@ | ||
| cmake_minimum_required(VERSION 3.20) | ||
| project(consumer_imports_module CXX) | ||
|
|
||
| set(CMAKE_CXX_STANDARD 20) | ||
| set(CMAKE_CXX_EXTENSIONS OFF) | ||
|
|
||
| set(SOURCES math.cppm main.cpp) | ||
| set_source_files_properties(${SOURCES} PROPERTIES LANGUAGE CXX) | ||
| add_library(test OBJECT ${SOURCES}) |
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,9 @@ | ||
| cmake_minimum_required(VERSION 3.20) | ||
| project(deep_chain CXX) | ||
|
|
||
| set(CMAKE_CXX_STANDARD 20) | ||
| set(CMAKE_CXX_EXTENSIONS OFF) | ||
|
|
||
| set(SOURCES m1.cppm m2.cppm m3.cppm m4.cppm m5.cppm) | ||
| set_source_files_properties(${SOURCES} PROPERTIES LANGUAGE CXX) | ||
| add_library(test OBJECT ${SOURCES}) |
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,9 @@ | ||
| cmake_minimum_required(VERSION 3.20) | ||
| project(diamond_modules CXX) | ||
|
|
||
| set(CMAKE_CXX_STANDARD 20) | ||
| set(CMAKE_CXX_EXTENSIONS OFF) | ||
|
|
||
| set(SOURCES base.cppm left.cppm right.cppm top.cppm) | ||
| set_source_files_properties(${SOURCES} PROPERTIES LANGUAGE CXX) | ||
| add_library(test OBJECT ${SOURCES}) |
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,9 @@ | ||
| cmake_minimum_required(VERSION 3.20) | ||
| project(dotted_module_name CXX) | ||
|
|
||
| set(CMAKE_CXX_STANDARD 20) | ||
| set(CMAKE_CXX_EXTENSIONS OFF) | ||
|
|
||
| set(SOURCES io.cppm app.cppm) | ||
| set_source_files_properties(${SOURCES} PROPERTIES LANGUAGE CXX) | ||
| add_library(test OBJECT ${SOURCES}) |
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,9 @@ | ||
| cmake_minimum_required(VERSION 3.20) | ||
| project(export_block CXX) | ||
|
|
||
| set(CMAKE_CXX_STANDARD 20) | ||
| set(CMAKE_CXX_EXTENSIONS OFF) | ||
|
|
||
| set(SOURCES block.cppm consumer.cppm) | ||
| set_source_files_properties(${SOURCES} PROPERTIES LANGUAGE CXX) | ||
| add_library(test OBJECT ${SOURCES}) |
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,9 @@ | ||
| cmake_minimum_required(VERSION 3.20) | ||
| project(export_namespace CXX) | ||
|
|
||
| set(CMAKE_CXX_STANDARD 20) | ||
| set(CMAKE_CXX_EXTENSIONS OFF) | ||
|
|
||
| set(SOURCES ns.cppm calc.cppm) | ||
| set_source_files_properties(${SOURCES} PROPERTIES LANGUAGE CXX) | ||
| add_library(test OBJECT ${SOURCES}) |
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,10 @@ | ||
| cmake_minimum_required(VERSION 3.20) | ||
| project(global_module_fragment CXX) | ||
|
|
||
| set(CMAKE_CXX_STANDARD 20) | ||
| set(CMAKE_CXX_EXTENSIONS OFF) | ||
|
|
||
| set(SOURCES gmf.cppm) | ||
| set_source_files_properties(${SOURCES} PROPERTIES LANGUAGE CXX) | ||
| add_library(test OBJECT ${SOURCES}) | ||
| target_include_directories(test PRIVATE ${CMAKE_SOURCE_DIR}) |
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,10 @@ | ||
| cmake_minimum_required(VERSION 3.20) | ||
| project(gmf_with_import CXX) | ||
|
|
||
| set(CMAKE_CXX_STANDARD 20) | ||
| set(CMAKE_CXX_EXTENSIONS OFF) | ||
|
|
||
| set(SOURCES base.cppm combined.cppm) | ||
| set_source_files_properties(${SOURCES} PROPERTIES LANGUAGE CXX) | ||
| add_library(test OBJECT ${SOURCES}) | ||
| target_include_directories(test PRIVATE ${CMAKE_SOURCE_DIR}) |
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,9 @@ | ||
| cmake_minimum_required(VERSION 3.20) | ||
| project(hover_on_imported_symbol CXX) | ||
|
|
||
| set(CMAKE_CXX_STANDARD 20) | ||
| set(CMAKE_CXX_EXTENSIONS OFF) | ||
|
|
||
| set(SOURCES defs.cppm use.cpp) | ||
| set_source_files_properties(${SOURCES} PROPERTIES LANGUAGE CXX) | ||
| add_library(test OBJECT ${SOURCES}) |
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,9 @@ | ||
| cmake_minimum_required(VERSION 3.20) | ||
| project(independent_modules CXX) | ||
|
|
||
| set(CMAKE_CXX_STANDARD 20) | ||
| set(CMAKE_CXX_EXTENSIONS OFF) | ||
|
|
||
| set(SOURCES x.cppm y.cppm) | ||
| set_source_files_properties(${SOURCES} PROPERTIES LANGUAGE CXX) | ||
| add_library(test OBJECT ${SOURCES}) |
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,9 @@ | ||
| cmake_minimum_required(VERSION 3.20) | ||
| project(module_compile_error CXX) | ||
|
|
||
| set(CMAKE_CXX_STANDARD 20) | ||
| set(CMAKE_CXX_EXTENSIONS OFF) | ||
|
|
||
| set(SOURCES good.cppm bad.cppm) | ||
| set_source_files_properties(${SOURCES} PROPERTIES LANGUAGE CXX) | ||
| add_library(test OBJECT ${SOURCES}) |
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,9 @@ | ||
| cmake_minimum_required(VERSION 3.20) | ||
| project(module_implementation_unit CXX) | ||
|
|
||
| set(CMAKE_CXX_STANDARD 20) | ||
| set(CMAKE_CXX_EXTENSIONS OFF) | ||
|
|
||
| set(SOURCES greeter.cppm greeter_impl.cpp) | ||
| set_source_files_properties(${SOURCES} PROPERTIES LANGUAGE CXX) | ||
| add_library(test OBJECT ${SOURCES}) |
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,9 @@ | ||
| cmake_minimum_required(VERSION 3.20) | ||
| project(module_partitions CXX) | ||
|
|
||
| set(CMAKE_CXX_STANDARD 20) | ||
| set(CMAKE_CXX_EXTENSIONS OFF) | ||
|
|
||
| set(SOURCES part_a.cppm part_b.cppm lib.cppm) | ||
| set_source_files_properties(${SOURCES} PROPERTIES LANGUAGE CXX) | ||
| add_library(test OBJECT ${SOURCES}) |
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,7 @@ | ||
| cmake_minimum_required(VERSION 3.20) | ||
| project(no_modules_plain_cpp CXX) | ||
|
|
||
| set(CMAKE_CXX_STANDARD 20) | ||
| set(CMAKE_CXX_EXTENSIONS OFF) | ||
|
|
||
| add_library(test OBJECT plain.cpp) |
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,9 @@ | ||
| cmake_minimum_required(VERSION 3.20) | ||
| project(partition_chain CXX) | ||
|
|
||
| set(CMAKE_CXX_STANDARD 20) | ||
| set(CMAKE_CXX_EXTENSIONS OFF) | ||
|
|
||
| set(SOURCES types.cppm core.cppm sys.cppm) | ||
| set_source_files_properties(${SOURCES} PROPERTIES LANGUAGE CXX) | ||
| add_library(test OBJECT ${SOURCES}) |
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,9 @@ | ||
| cmake_minimum_required(VERSION 3.20) | ||
| project(partition_interface CXX) | ||
|
|
||
| set(CMAKE_CXX_STANDARD 20) | ||
| set(CMAKE_CXX_EXTENSIONS OFF) | ||
|
|
||
| set(SOURCES part.cppm primary.cppm) | ||
| set_source_files_properties(${SOURCES} PROPERTIES LANGUAGE CXX) | ||
| add_library(test OBJECT ${SOURCES}) |
9 changes: 9 additions & 0 deletions
9
tests/data/modules/partition_with_external_import/CMakeLists.txt
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,9 @@ | ||
| cmake_minimum_required(VERSION 3.20) | ||
| project(partition_with_external_import CXX) | ||
|
|
||
| set(CMAKE_CXX_STANDARD 20) | ||
| set(CMAKE_CXX_EXTENSIONS OFF) | ||
|
|
||
| set(SOURCES ext.cppm part.cppm app.cppm) | ||
| set_source_files_properties(${SOURCES} PROPERTIES LANGUAGE CXX) | ||
| add_library(test OBJECT ${SOURCES}) |
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,10 @@ | ||
| cmake_minimum_required(VERSION 3.20) | ||
| project(partition_with_gmf CXX) | ||
|
|
||
| set(CMAKE_CXX_STANDARD 20) | ||
| set(CMAKE_CXX_EXTENSIONS OFF) | ||
|
|
||
| set(SOURCES part_cfg.cppm cfg.cppm) | ||
| set_source_files_properties(${SOURCES} PROPERTIES LANGUAGE CXX) | ||
| add_library(test OBJECT ${SOURCES}) | ||
| target_include_directories(test PRIVATE ${CMAKE_SOURCE_DIR}) |
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,9 @@ | ||
| cmake_minimum_required(VERSION 3.20) | ||
| project(private_module_fragment CXX) | ||
|
|
||
| set(CMAKE_CXX_STANDARD 20) | ||
| set(CMAKE_CXX_EXTENSIONS OFF) | ||
|
|
||
| set(SOURCES priv.cppm) | ||
| set_source_files_properties(${SOURCES} PROPERTIES LANGUAGE CXX) | ||
| add_library(test OBJECT ${SOURCES}) |
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,9 @@ | ||
| cmake_minimum_required(VERSION 3.20) | ||
| project(re_export CXX) | ||
|
|
||
| set(CMAKE_CXX_STANDARD 20) | ||
| set(CMAKE_CXX_EXTENSIONS OFF) | ||
|
|
||
| set(SOURCES core.cppm wrapper.cppm user.cppm) | ||
| set_source_files_properties(${SOURCES} PROPERTIES LANGUAGE CXX) | ||
| add_library(test OBJECT ${SOURCES}) |
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,9 @@ | ||
| cmake_minimum_required(VERSION 3.20) | ||
| project(save_recompile CXX) | ||
|
|
||
| set(CMAKE_CXX_STANDARD 20) | ||
| set(CMAKE_CXX_EXTENSIONS OFF) | ||
|
|
||
| set(SOURCES leaf.cppm mid.cppm) | ||
| set_source_files_properties(${SOURCES} PROPERTIES LANGUAGE CXX) | ||
| add_library(test OBJECT ${SOURCES}) |
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,9 @@ | ||
| cmake_minimum_required(VERSION 3.20) | ||
| project(single_module_no_deps CXX) | ||
|
|
||
| set(CMAKE_CXX_STANDARD 20) | ||
| set(CMAKE_CXX_EXTENSIONS OFF) | ||
|
|
||
| set(SOURCES mod_a.cppm) | ||
| set_source_files_properties(${SOURCES} PROPERTIES LANGUAGE CXX) | ||
| add_library(test OBJECT ${SOURCES}) |
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,9 @@ | ||
| cmake_minimum_required(VERSION 3.20) | ||
| project(template_export CXX) | ||
|
|
||
| set(CMAKE_CXX_STANDARD 20) | ||
| set(CMAKE_CXX_EXTENSIONS OFF) | ||
|
|
||
| set(SOURCES tmpl.cppm use_tmpl.cppm) | ||
| set_source_files_properties(${SOURCES} PROPERTIES LANGUAGE CXX) | ||
| add_library(test OBJECT ${SOURCES}) |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.