Skip to content

Commit

Permalink
add test for @Kwargs
Browse files Browse the repository at this point in the history
  • Loading branch information
aviatesk committed May 31, 2023
1 parent e8e5990 commit 3adafca
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/namedtuple.jl
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,12 @@ end
@test_throws LoadError include_string(Main, "@NamedTuple(a::Int, b)")
end

# @Kwargs
@testset "@Kwargs" begin
@test @Kwargs{a::Int,b::String} == typeof(pairs((;a=1,b="2")))
@test @Kwargs{} == typeof(pairs((;)))
end

# issue #29333, implicit names
let x = 1, y = 2
@test (;y) === (y = 2,)
Expand Down

0 comments on commit 3adafca

Please sign in to comment.