Skip to content

Commit 4db5294

Browse files
committed
add @inferred to tests
1 parent 5b06f8e commit 4db5294

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

test/runtests.jl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,16 @@ using Test
55

66
function test_model_interface(K)
77
# test defaults
8-
m = K(fwhm=10)
8+
m = @inferred K(fwhm=10)
99
@test size(m) == (31, 31)
1010
@test axes(m) == (-15:15, -15:15)
1111
@test m.pos SA[0, 0]
1212
@test eltype(m) == Float64
1313

14-
@test m[0, 0] m(0, 0) m(SA[0, 0]) 1
14+
val_idx = @inferred m[0, 0]
15+
val_call = @inferred m(0, 0)
16+
val_tup = @inferred m(SA[0, 0])
17+
@test val_idx val_call val_tup 1
1518
@test_throws ErrorException m(CartesianIndex(0, 0))
1619
# out of bounds but it's cool
1720
@test m[-100, -10] m(-10, -100)

0 commit comments

Comments
 (0)