TestCollectSkipNames
This commit is contained in:
4
.github/workflows/go.yml
vendored
4
.github/workflows/go.yml
vendored
@@ -52,11 +52,7 @@ jobs:
|
||||
- name: Build
|
||||
run: go build -v ./...
|
||||
|
||||
- name: Test
|
||||
if: matrix.os != 'ubuntu-latest'
|
||||
run: go test -v ./...
|
||||
- name: Test with coverage
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
run: go test -v -coverprofile="coverage.txt" -covermode=atomic ./...
|
||||
|
||||
- name: Install
|
||||
|
||||
@@ -27,6 +27,11 @@ import (
|
||||
"golang.org/x/tools/go/ssa"
|
||||
)
|
||||
|
||||
func TestCollectSkipNames(t *testing.T) {
|
||||
ctx := &context{skips: make(map[string]none)}
|
||||
ctx.collectSkipNames("//llgo:skip abs")
|
||||
}
|
||||
|
||||
func TestReplaceGoName(t *testing.T) {
|
||||
if ret := replaceGoName("foo", 0); ret != "foo" {
|
||||
t.Fatal("replaceGoName:", ret)
|
||||
@@ -155,6 +160,9 @@ func TestPkgKind(t *testing.T) {
|
||||
if v, _ := pkgKind("noinit"); v != PkgNoInit {
|
||||
t.Fatal("pkgKind:", v)
|
||||
}
|
||||
if v, _ := pkgKind("link"); v != PkgLinkIR {
|
||||
t.Fatal("pkgKind:", v)
|
||||
}
|
||||
if v, _ := pkgKind(""); v != PkgLLGo {
|
||||
t.Fatal("pkgKind:", v)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user