@@ -100,5 +100,23 @@ my_stable_add_undecorated(y) = my_add(y)
100
100
@test_nowarn @check my_add (1 )
101
101
@test_throws AssertionError @check my_stable_add (1 )
102
102
@test_throws AssertionError @check my_stable_add_undecorated (1 ) nowarn= [my_stable_add_undecorated]
103
+ @test_throws AssertionError @check my_stable_add_undecorated (1 ) nowarn= :all
104
+ function bar (x)
105
+ x > 0 ? 1.0 : 1
106
+ end
107
+ @test @check (bar (2 )) == 1.0
108
+ @test @check (bar (2 ), maxdepth= 100 ) == 1.0
109
+ @test @check (bar (2 ), nowarn= :none ) == 1.0
110
+ @test @check (bar (2 ), nowarn= :none , maxdepth= 100 ) == 1.0
111
+ @test @check (bar (2 ), nowarn= []) == 1.0
112
+ @test @check (bar (2 ), nowarn= [], maxdepth= 100 ) == 1.0
113
+ @test @check (bar (2 ), nowarn= Any[]) == 1.0
114
+ @test @check (bar (2 ), nowarn= Any[], maxdepth= 100 ) == 1.0
115
+ @test_throws AssertionError @check (bar (2 ), nowarn= [bar])
116
+ @test_throws AssertionError @check (bar (2 ), nowarn= [bar], maxdepth= 100 )
117
+ @test_throws AssertionError @check (bar (2 ), nowarn= Any[bar])
118
+ @test_throws AssertionError @check (bar (2 ), nowarn= Any[bar], maxdepth= 100 )
119
+ @test_throws AssertionError @check (bar (2 ), nowarn= :all )
120
+ @test_throws AssertionError @check (bar (2 ), nowarn= :all , maxdepth= 100 )
103
121
end
104
122
end
0 commit comments