blob: e849308a5d53b54ca6458a625a8c03b6f49a6f98 [file] [log] [blame]
Keith Randall3288bc12020-08-16 12:41:42 -07001// Copyright 2020 The Go Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5package framepointer_test
6
7import (
8 "go/build"
9 "testing"
10
11 "golang.org/x/tools/go/analysis/analysistest"
12 "golang.org/x/tools/go/analysis/passes/framepointer"
13)
14
15func Test(t *testing.T) {
16 if build.Default.GOOS != "linux" && build.Default.GOOS != "darwin" {
17 // The test has an os-generic assembly file, testdata/a/asm_amd64.s.
18 // It should produce errors on linux or darwin, but not on other archs.
19 // Unfortunately, there's no way to say that in the "want" comments
20 // in that file. So we skip testing on other GOOSes. The framepointer
21 // analyzer should not report any errors on those GOOSes, so it's not
22 // really a hard test on those platforms.
23 t.Skipf("test for GOOS=%s is not implemented", build.Default.GOOS)
24 }
25 analysistest.Run(t, analysistest.TestData(), framepointer.Analyzer, "a")
26}