Skip to content

plot: test that a parameterless option is a switch (plot.go:463 survivor) - #18

Merged
tannevaled merged 1 commit into
mainfrom
test/plot-463-mutant
Nov 30, 2026
Merged

tannevaled merged 1 commit into
mainfrom
test/plot-463-mutant

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

Test only. A mutsweep survivor at plot.go:463 (if !b { return nil, nil } in plOption) was not covered: a parameterless option constructor with false must give no option, with true the option.

TestPlOptionSwitchTrueAppliesFalseDoesNot drives plOption with plot.Density (true gives an option, false gives nil, a non-boolean is an error). mutsweep -only plot.go:463 reports the mutant caught (1 caught, 0 survived).

🤖 Generated with Claude Code

…:463 `!b` survivor)

plOption gives no option for false and the option for true; nothing asserted
the difference, so mutsweep's `!b` -> `b` survived. TestPlOptionSwitch asserts
true -> option, false -> nil, non-bool -> error with plot.Density.
mutsweep -only plot.go:463: caught.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@tannevaled
tannevaled merged commit 6b12add into main Nov 30, 2026
60 checks passed
@tannevaled
tannevaled deleted the test/plot-463-mutant branch November 30, 2026 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant