don't rerun comparison pointlessly

The comment says "convert to each type and compare", but it
doesn't convert, it just compares the given container result to
three different forms of the same result. That's neat for testing
BitwiseEqual but doesn't actually give us more information, and
it takes nearly 3x as long.
This commit is contained in:
Seebs 2022-08-23 14:19:01 -05:00 committed by seebs
parent edbb2d3e1e
commit f3c164c483

View file

@ -3766,11 +3766,11 @@ func TestContainerCombinations(t *testing.T) {
ret := runContainerFunc(testOp.f, cts[x][testOp.x], cts[y][testOp.y])
exp := testOp.exp
// Convert to all container types and check result.
for _, ct := range containerTypes {
if err := ret.BitwiseCompare(cts[ct][exp]); err != nil {
t.Error(err)
}
// Compare to the same-type container, which is usually the cheapest
// to compare with.
ct := ret.typ()
if err := ret.BitwiseCompare(cts[ct][exp]); err != nil {
t.Error(err)
}
})
}