Skip to content

Commit 3adafca

Browse files
committed
add test for @Kwargs
1 parent e8e5990 commit 3adafca

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/namedtuple.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,12 @@ end
342342
@test_throws LoadError include_string(Main, "@NamedTuple(a::Int, b)")
343343
end
344344

345+
# @Kwargs
346+
@testset "@Kwargs" begin
347+
@test @Kwargs{a::Int,b::String} == typeof(pairs((;a=1,b="2")))
348+
@test @Kwargs{} == typeof(pairs((;)))
349+
end
350+
345351
# issue #29333, implicit names
346352
let x = 1, y = 2
347353
@test (;y) === (y = 2,)

0 commit comments

Comments
 (0)