|
24 | 24 | @test setproperties(o, (a=2, b=3.0)) === AB(2,3.0) |
25 | 25 | @test setproperties(o, a=2, b=3.0) === AB(2,3.0) |
26 | 26 |
|
27 | | - @test_throws ArgumentError setproperties(o, (a=2, c=3.0)) |
28 | | - @test_throws ArgumentError setproperties(o, a=2, c=3.0) |
| 27 | + res = @test_throws ArgumentError setproperties(o, (a=2, this_field_does_not_exist=3.0)) |
| 28 | + msg = sprint(showerror, res.value) |
| 29 | + @test occursin("this_field_does_not_exist", msg) |
| 30 | + @test occursin("overload", msg) |
| 31 | + @test occursin("ConstructionBase.setproperties", msg) |
| 32 | + |
| 33 | + res = @test_throws ArgumentError setproperties(o, a=2, this_field_does_not_exist=3.0) |
| 34 | + msg = sprint(showerror, res.value) |
| 35 | + @test occursin("this_field_does_not_exist", msg) |
| 36 | + @test occursin("overload", msg) |
| 37 | + @test occursin("ConstructionBase.setproperties", msg) |
| 38 | + |
29 | 39 | @test setproperties(Empty(), NamedTuple()) === Empty() |
30 | 40 | @test setproperties(Empty()) === Empty() |
31 | 41 |
|
|
0 commit comments