textmachine/platform/internal/gates/testdata/mutantfixture/near_test.go

27 lines
873 B
Go

package mutantfixture
import "testing"
// The upper edge, and the named pin of the harness's first fixture record.
func TestTheBandStopsAtTen(t *testing.T) {
if Allowed(11) {
t.Error("11 is inside the band")
}
if !Allowed(10) {
t.Error("10 is outside the band")
}
}
// The lower edge, watched by a DIFFERENT test: a planting here makes the package red without the
// named pin falling, which is the harness's «right verdict, wrong reason» case.
func TestTheBandRefusesNegatives(t *testing.T) {
if Allowed(-1) {
t.Error("-1 is inside the band")
}
}
// Red on purpose, and never selected by any other record's `-run`: it is how the fixture produces a
// set whose BASELINE is not green before any mutation.
func TestThisOneIsRedOnPurpose(t *testing.T) {
t.Error("this test is red by construction: the harness must refuse to measure anything in its set")
}