File tree Expand file tree Collapse file tree 6 files changed +28
-7
lines changed Expand file tree Collapse file tree 6 files changed +28
-7
lines changed Original file line number Diff line number Diff line change @@ -145,7 +145,7 @@ where
145145 }
146146
147147 if input. is_empty ( ) {
148- panic ! ( "at least one `--in` is required ") ;
148+ input . push ( "default ") ;
149149 } ;
150150
151151 if output. is_empty ( ) {
Original file line number Diff line number Diff line change 1+ #![ allow(
2+ non_snake_case,
3+ non_upper_case_globals,
4+ non_camel_case_types,
5+ dead_code,
6+ clippy:: all
7+ ) ]
8+
9+ windows_targets:: link!( "kernel32.dll" "system" fn GetTickCount ( ) -> u32 ) ;
Original file line number Diff line number Diff line change 1+ #![ allow(
2+ non_snake_case,
3+ non_upper_case_globals,
4+ non_camel_case_types,
5+ dead_code,
6+ clippy:: all
7+ ) ]
8+
9+ windows_targets:: link!( "kernel32.dll" "system" fn GetTickCount ( ) -> u32 ) ;
Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ pub mod core_sys_flat_no_core;
1212pub mod core_sys_no_core;
1313pub mod core_win;
1414pub mod core_win_flat;
15+ pub mod default_assumed;
16+ pub mod default_default;
1517pub mod delegate;
1618pub mod delegate_generic;
1719pub mod deps;
Original file line number Diff line number Diff line change 1+ #[ track_caller]
12fn bindgen ( args : & str ) {
23 windows_bindgen:: bindgen ( args. split_whitespace ( ) ) ;
34}
45
5- #[ test]
6- #[ should_panic( expected = "at least one `--in` is required" ) ]
7- fn at_least_one_input ( ) {
8- bindgen ( "" ) ;
9- }
10-
116#[ test]
127#[ should_panic( expected = "exactly one `--out` is required" ) ]
138fn at_least_one_output ( ) {
Original file line number Diff line number Diff line change @@ -132,6 +132,12 @@ fn main() {
132132 // Tests for sort order
133133 test ( "--out sort.rs --filter E_FAIL S_FALSE E_OUTOFMEMORY ERROR_OUTOFMEMORY Windows.Foundation.Rect RECT GetTickCount FatalExit --sys --no-core" ) ;
134134
135+ // Tests input defaults
136+ test_raw (
137+ "--out default_default.rs --filter GetTickCount --sys --flat --no-comment --in default" ,
138+ ) ;
139+ test_raw ( "--out default_assumed.rs --filter GetTickCount --sys --flat --no-comment" ) ;
140+
135141 // Tests for header elements
136142 test_raw ( "--out comment.rs --in default --filter GetTickCount --sys --flat" ) ;
137143 test_raw (
You can’t perform that action at this time.
0 commit comments