File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -563,6 +563,12 @@ fn test_mixed_header_and_header_contents() {
563563 }
564564}
565565
566+ #[ test]
567+ #[ should_panic( expected = "No headers provided" ) ]
568+ fn test_no_header_provided ( ) {
569+ let _ = builder ( ) . generate ( ) ;
570+ }
571+
566572#[ test]
567573fn test_macro_fallback_non_system_dir ( ) {
568574 let actual = builder ( )
Original file line number Diff line number Diff line change @@ -336,6 +336,11 @@ impl Builder {
336336 . map ( String :: into_boxed_str) ,
337337 ) ;
338338
339+ assert ! (
340+ !self . options. input_headers. is_empty( ) ||
341+ !self . options. input_header_contents. is_empty( ) ,
342+ "No headers provided"
343+ ) ;
339344 for header in & self . options . input_headers {
340345 self . options
341346 . for_each_callback ( |cb| cb. header_file ( header. as_ref ( ) ) ) ;
You can’t perform that action at this time.
0 commit comments