I think there may be an issue in bisect search with
change set elements not actually being independent,
to be explored later. For now, modify the test to
remove that property.
Change-Id: I4b171bc024795d950cf4663374ad1dfc4e2952fc
Reviewed-on: https://go-review.googlesource.com/c/go/+/494036
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
}
// This test does nothing by itself, but you can run
+//
// bisect 'GODEBUG=buggy=1#PATTERN' go test -run=BisectTestCase
+//
// to see that the GODEBUG bisect support is working.
// TestCmdBisect above does exactly that.
func TestBisectTestCase(t *testing.T) {
s := New("#buggy")
for i := 0; i < 10; i++ {
- if s.Value() == "1" {
+ a := s.Value() == "1"
+ b := s.Value() == "1"
+ c := s.Value() == "1" // BISECT BUG
+ d := s.Value() == "1" // BISECT BUG
+ e := s.Value() == "1" // BISECT BUG
+
+ if a {
t.Log("ok")
}
- if s.Value() == "1" {
+ if b {
t.Log("ok")
}
- if s.Value() == "1" { // BISECT BUG
+ if c {
t.Error("bug")
}
- if s.Value() == "1" && // BISECT BUG
- s.Value() == "1" { // BISECT BUG
+ if d &&
+ e {
t.Error("bug")
}
}