Skip to content

Commit

Permalink
Group more of the WinRT tests together (#3263)
Browse files Browse the repository at this point in the history
  • Loading branch information
kennykerr authored Sep 6, 2024
1 parent 9f86909 commit 2405bff
Show file tree
Hide file tree
Showing 48 changed files with 28 additions and 42 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,6 @@ jobs:
run: cargo clippy -p test_extensions
- name: Clippy test_handles
run: cargo clippy -p test_handles
- name: Clippy test_helpers
run: cargo clippy -p test_helpers
- name: Clippy test_implement
run: cargo clippy -p test_implement
- name: Clippy test_implement_core
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,6 @@ jobs:
run: cargo test -p test_extensions --target ${{ matrix.target }} ${{ matrix.etc }}
- name: Test test_handles
run: cargo test -p test_handles --target ${{ matrix.target }} ${{ matrix.etc }}
- name: Test test_helpers
run: cargo test -p test_helpers --target ${{ matrix.target }} ${{ matrix.etc }}
- name: Test test_implement
run: cargo test -p test_implement --target ${{ matrix.target }} ${{ matrix.etc }}
- name: Test test_implement_core
Expand Down Expand Up @@ -255,10 +253,10 @@ jobs:
run: cargo test -p test_reference_float --target ${{ matrix.target }} ${{ matrix.etc }}
- name: Test test_registry
run: cargo test -p test_registry --target ${{ matrix.target }} ${{ matrix.etc }}
- name: Clean
run: cargo clean
- name: Test test_registry_default
run: cargo test -p test_registry_default --target ${{ matrix.target }} ${{ matrix.etc }}
- name: Clean
run: cargo clean
- name: Test test_reserved
run: cargo test -p test_reserved --target ${{ matrix.target }} ${{ matrix.etc }}
- name: Test test_resources
Expand Down
1 change: 1 addition & 0 deletions crates/libs/helpers/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ publish = false
[dependencies]
regex = "1.7"
windows-metadata = { workspace = true }
windows-targets = { workspace = true }
18 changes: 18 additions & 0 deletions crates/libs/helpers/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,21 @@ fn find<P: AsRef<Path>>(path: P, regex: &Regex) -> Vec<(String, String)> {

names
}

pub fn set_thread_ui_language() {
// Enables testing without pulling in a dependency on the `windows` crate.
windows_targets::link!("kernel32.dll" "system" fn SetThreadPreferredUILanguages(flags : u32, language : *const u16, _ : *mut u32) -> i32);
pub const MUI_LANGUAGE_NAME: u32 = 8u32;

let language: Vec<_> = "en-US".encode_utf16().chain(std::iter::once(0)).collect();
unsafe {
assert_eq!(
1,
SetThreadPreferredUILanguages(
MUI_LANGUAGE_NAME,
language.as_ptr(),
std::ptr::null_mut()
)
);
}
}
2 changes: 1 addition & 1 deletion crates/tests/misc/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ workspace = true
workspace = true

[dev-dependencies]
helpers = { package = "test_helpers", path = "../helpers" }
helpers = { workspace = true }
2 changes: 1 addition & 1 deletion crates/tests/misc/enums/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ features = [
]

[dev-dependencies]
helpers = { package = "test_helpers", path = "../helpers" }
helpers = { workspace = true }
2 changes: 1 addition & 1 deletion crates/tests/misc/error/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ features = [
]

[dev-dependencies]
helpers = { package = "test_helpers", path = "../helpers" }
helpers = { workspace = true }
12 changes: 0 additions & 12 deletions crates/tests/misc/helpers/Cargo.toml

This file was deleted.

17 changes: 0 additions & 17 deletions crates/tests/misc/helpers/src/lib.rs

This file was deleted.

2 changes: 1 addition & 1 deletion crates/tests/misc/result/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ workspace = true
workspace = true

[dependencies]
helpers = { package = "test_helpers", path = "../helpers" }
helpers = { workspace = true }
static_assertions = "1.0"

[lints.rust]
Expand Down
2 changes: 1 addition & 1 deletion crates/tests/misc/strings/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ features = [
]

[dev-dependencies]
helpers = { package = "test_helpers", path = "../helpers" }
helpers = { workspace = true }
2 changes: 1 addition & 1 deletion crates/tests/misc/win32/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ features = [
]

[dev-dependencies]
helpers = { package = "test_helpers", path = "../helpers" }
helpers = { workspace = true }
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ features = [
]

[dev-dependencies]
helpers = { package = "test_helpers", path = "../helpers" }
helpers = { workspace = true }
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 2405bff

Please sign in to comment.