Also clean up the test assertions, and add a check for assertions
missing function invocations (there was one).
For #37438
Change-Id: Iafbfeae2c25217eac894181e01480b25b7cffbd4
Reviewed-on: https://go-review.googlesource.com/c/go/+/266859
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Michael Matloob <matloob@golang.org>
}
// Downgrade returns a build list for the target module
-// in which the given additional modules are downgraded.
+// in which the given additional modules are downgraded,
+// potentially overriding the requirements of the target.
//
// The versions to be downgraded may be unreachable from reqs.Latest and
// reqs.Previous, but the methods of reqs must otherwise handle such versions
name: cross1V
A: B2 C D2 E1
-B1:
+B1:
B2: D1
C: D2
D1: E2
name: cross1U
A: B1 C
-B1:
+B1:
B2: D1
C: D2
D1: E2
upgrade A B2: A B2 C D2 E2
name: cross1R
-A: B C
+A: B C
B: D2
C: D1
D1: E2
A1: X1
B1: X2
X1: I1
-X2:
+X2:
build M: M A1 B1 I1 X2
# Upgrade from B1 to B2 should not drop the transitive dep on D.
F1:
downgrade A F1: A B1 E1
-name: down3
-A:
+name: downcycle
+A: A B2
+B2: A
+B1:
+downgrade A B1: A B1
# golang.org/issue/25542.
name: noprev1
A: B4 C2
-B2.hidden:
-C2:
+B2.hidden:
+C2:
downgrade A B2.hidden: A B2.hidden C2
name: noprev2
A: B4 C2
-B2.hidden:
-B1:
-C2:
+B2.hidden:
+B1:
+C2:
downgrade A B2.hidden: A B2.hidden C2
name: noprev3
A: B4 C2
-B3:
-B2.hidden:
-C2:
+B3:
+B2.hidden:
+C2:
downgrade A B2.hidden: A B2.hidden C2
# Cycles involving the target.
A1: X1
B1: X2
X1: I1
-X2:
+X2:
req M: A1 B1
name: reqnone
for _, fn := range fns {
fn(t)
}
+ if len(fns) == 0 {
+ t.Errorf("no functions tested")
+ }
})
}
}