File tree Expand file tree Collapse file tree 1 file changed +24
-4
lines changed
Expand file tree Collapse file tree 1 file changed +24
-4
lines changed Original file line number Diff line number Diff line change 1- function recursively_unwrap_task_failed_ex (ex:: ErrorException )
2- return ex
1+ extract_test_result_value (test_result:: Test.Pass ) = test_result. value
2+
3+ recursively_unwrap_ex (ex:: ErrorException ) = ex
4+ recursively_unwrap_ex (ex:: Base.IOError ) = ex
5+ function recursively_unwrap_ex (outer_ex:: TaskFailedException )
6+ new_thing = outer_ex. task. exception
7+ return recursively_unwrap_ex (new_thing)
8+ end
9+
10+ Base. @kwdef struct ConfigForTestingTaskFailedException
11+ expected_outer_ex_T
12+ expected_inner_ex_T
13+ expected_inner_ex_INSTANCE
314end
415
5- function recursively_unwrap_task_failed_ex (outer_ex:: TaskFailedException )
6- return recursively_unwrap_task_failed_ex (outer_ex. task. exception)
16+ function test_task_failed_exception (test_result:: Test.Pass , cfg:: ConfigForTestingTaskFailedException )
17+ observed_outer_ex = extract_test_result_value (test_result)
18+ @test observed_outer_ex isa expected_outer_ex_T
19+ observed_inner_ex = recursively_unwrap_task_failed_ex (observed_outer_ex)
20+ @test observed_inner_ex isa typeof (expected_inner_ex_INSTANCE)
21+ @test observed_inner_ex == expected_inner_ex_INSTANCE
22+ return nothing
723end
24+
25+
26+
27+ @test observed_inner_ex isa expected_inner_ex_T # TODO
You can’t perform that action at this time.
0 commit comments