File tree Expand file tree Collapse file tree 7 files changed +22
-20
lines changed Expand file tree Collapse file tree 7 files changed +22
-20
lines changed Original file line number Diff line number Diff line change @@ -184,6 +184,8 @@ jobs:
184184 run : cargo clippy -p test_interop
185185 - name : Clippy test_lib
186186 run : cargo clippy -p test_lib
187+ - name : Clippy test_linux
188+ run : cargo clippy -p test_linux
187189 - name : Clippy test_literals
188190 run : cargo clippy -p test_literals
189191 - name : Clippy test_match
@@ -216,8 +218,6 @@ jobs:
216218 run : cargo clippy -p test_return_struct
217219 - name : Clippy test_riddle
218220 run : cargo clippy -p test_riddle
219- - name : Clippy test_simple_component
220- run : cargo clippy -p test_simple_component
221221 - name : Clippy test_standalone
222222 run : cargo clippy -p test_standalone
223223 - name : Clippy test_string_param
Original file line number Diff line number Diff line change 1919 uses : actions/checkout@v4
2020 - name : Update toolchain
2121 run : rustup update --no-self-update stable && rustup default stable
22- - name : Run cargo build
23- run : cargo build -p test_simple_component --target x86_64-unknown-linux-gnu
22+ - name : Run cargo test
23+ run : cargo test -p test_linux --target x86_64-unknown-linux-gnu
Original file line number Diff line number Diff line change @@ -210,6 +210,8 @@ jobs:
210210 run : cargo test -p test_interop --target ${{ matrix.target }} ${{ matrix.etc }}
211211 - name : Test test_lib
212212 run : cargo test -p test_lib --target ${{ matrix.target }} ${{ matrix.etc }}
213+ - name : Test test_linux
214+ run : cargo test -p test_linux --target ${{ matrix.target }} ${{ matrix.etc }}
213215 - name : Test test_literals
214216 run : cargo test -p test_literals --target ${{ matrix.target }} ${{ matrix.etc }}
215217 - name : Test test_match
@@ -242,8 +244,6 @@ jobs:
242244 run : cargo test -p test_return_struct --target ${{ matrix.target }} ${{ matrix.etc }}
243245 - name : Test test_riddle
244246 run : cargo test -p test_riddle --target ${{ matrix.target }} ${{ matrix.etc }}
245- - name : Test test_simple_component
246- run : cargo test -p test_simple_component --target ${{ matrix.target }} ${{ matrix.etc }}
247247 - name : Test test_standalone
248248 run : cargo test -p test_standalone --target ${{ matrix.target }} ${{ matrix.etc }}
249249 - name : Test test_string_param
Original file line number Diff line number Diff line change 11[package ]
2- name = " test_simple_component "
2+ name = " test_linux "
33version = " 0.0.0"
44edition = " 2021"
55publish = false
66
7- [lib ]
8- crate-type = [" cdylib" ]
9-
107[dependencies .windows ]
118path = " ../../libs/windows"
129features = [
10+ " Foundation" ,
1311 " Win32_Foundation" ,
1412]
Original file line number Diff line number Diff line change 1+
Original file line number Diff line number Diff line change 1+ use windows:: core:: * ;
2+
3+ #[ test]
4+ fn test ( ) {
5+ unsafe {
6+ let s: PCSTR = s ! ( "hello world" ) ;
7+ assert_eq ! ( s. to_string( ) . unwrap( ) , "hello world" ) ;
8+
9+ // TODO: https://github.com/microsoft/windows-rs/pull/3004 should enable the following test.
10+ // let w: PCWSTR = w!("wide world");
11+ // assert_eq!(w.to_string().unwrap(), "wide world");
12+ }
13+ }
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments