File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -54,19 +54,19 @@ fn run_csaf_tests<CsafType>(
5454 // Check if this is expected to be a negative or positive test case
5555 if test_num. starts_with ( '0' ) || test_num. starts_with ( '2' ) {
5656 // Negative test case - should fail with specific errors
57- let expected_errors = expected_errors
57+
58+ let mut expected_errors = expected_errors
5859 . get ( test_num)
5960 . expect ( & format ! (
6061 "Missing expected error definition for negative test case {}" ,
6162 test_num
6263 ) )
63- . clone ( )
64- . sort_by ( |a, b| a. message . cmp ( & b. message ) ) ;
64+ . clone ( ) ;
65+ expected_errors. sort_by ( |a, b| a. message . cmp ( & b. message ) ) ;
66+ let mut test_errors = test_function ( & doc) . unwrap_err ( ) ;
67+ test_errors. sort_by ( |a, b| a. message . cmp ( & b. message ) ) ;
6568 assert_eq ! (
66- expected_errors,
67- test_function( & doc)
68- . unwrap_err( )
69- . sort_by( |a, b| a. message. cmp( & b. message) ) ,
69+ expected_errors, test_errors,
7070 "Negative test case {} should have failed with the expected error" ,
7171 test_num
7272 ) ;
You can’t perform that action at this time.
0 commit comments