mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: use SSA tests on legacy compiler
Why not? Because the 386 backend can't handle one of them. But other than that, it should work. Change-Id: Iaeb9735f8c3c281136a0734376dec5ddba21be3b Reviewed-on: https://go-review.googlesource.com/22748 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>
This commit is contained in:
parent
9dee7771f5
commit
9f8ecd75fc
2 changed files with 10 additions and 8 deletions
|
|
@ -23,9 +23,6 @@ func buildTest(t *testing.T, filename string) {
|
|||
doTest(t, filename, "build")
|
||||
}
|
||||
func doTest(t *testing.T, filename string, kind string) {
|
||||
if runtime.GOARCH != "amd64" {
|
||||
t.Skipf("skipping SSA tests on %s for now", runtime.GOARCH)
|
||||
}
|
||||
testenv.MustHaveGoBuild(t)
|
||||
var stdout, stderr bytes.Buffer
|
||||
cmd := exec.Command("go", kind, filepath.Join("testdata", filename))
|
||||
|
|
@ -52,7 +49,12 @@ func TestBreakContinue(t *testing.T) { runTest(t, "break_ssa.go") }
|
|||
func TestTypeAssertion(t *testing.T) { runTest(t, "assert_ssa.go") }
|
||||
|
||||
// TestArithmetic tests that both backends have the same result for arithmetic expressions.
|
||||
func TestArithmetic(t *testing.T) { runTest(t, "arith_ssa.go") }
|
||||
func TestArithmetic(t *testing.T) {
|
||||
if runtime.GOARCH == "386" {
|
||||
t.Skip("legacy 386 compiler can't handle this test")
|
||||
}
|
||||
runTest(t, "arith_ssa.go")
|
||||
}
|
||||
|
||||
// TestFP tests that both backends have the same result for floating point expressions.
|
||||
func TestFP(t *testing.T) { runTest(t, "fp_ssa.go") }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue