Muex.Mutator.MapSemantics (Muex v0.8.1)

View Source

Elixir-specific mutator that swaps put/put_new on Map and Keyword.

  • Map.put <-> Map.put_new
  • Keyword.put <-> Keyword.put_new

put always writes; put_new writes only when the key is absent. They have the same arity and return type, so a surviving mutant means no test exercises the case where the key is already present — a common real-world bug.

Only module-qualified calls on Map/Keyword are matched; the call arguments are preserved.