Skip to content

Commit

Permalink
WIP - failing test for kwrestarg
Browse files Browse the repository at this point in the history
  • Loading branch information
dgollahon committed Oct 4, 2023
1 parent d878314 commit ba3022b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/mutant/ast/structure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,11 @@ def variable_descendants(node)
fixed: EMPTY_ARRAY,
variable: nil
),
Node.new(
type: :forwarded_kwrestarg,
fixed: EMPTY_ARRAY,
variable: nil
),
Node.new(
type: :forwarded_restarg,
fixed: EMPTY_ARRAY,
Expand Down
7 changes: 7 additions & 0 deletions meta/hash.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,10 @@
# Empty hash
mutation '{}'
end

Mutant::Meta::Example.add :hash do
source 'def foo(**); { default: 1, ** }; end'

mutation 'def foo(**); { default: 1 }; end'
mutation 'def foo(**); {}; end'
end

0 comments on commit ba3022b

Please sign in to comment.