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
|
- name: Build
|
||||||
run: go build -v ./...
|
run: go build -v ./...
|
||||||
|
|
||||||
- name: Test
|
|
||||||
if: matrix.os != 'ubuntu-latest'
|
|
||||||
run: go test -v ./...
|
|
||||||
- name: Test with coverage
|
- name: Test with coverage
|
||||||
if: matrix.os == 'ubuntu-latest'
|
|
||||||
run: go test -v -coverprofile="coverage.txt" -covermode=atomic ./...
|
run: go test -v -coverprofile="coverage.txt" -covermode=atomic ./...
|
||||||
|
|
||||||
- name: Install
|
- name: Install
|
||||||
|
|||||||
@@ -27,6 +27,11 @@ import (
|
|||||||
"golang.org/x/tools/go/ssa"
|
"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) {
|
func TestReplaceGoName(t *testing.T) {
|
||||||
if ret := replaceGoName("foo", 0); ret != "foo" {
|
if ret := replaceGoName("foo", 0); ret != "foo" {
|
||||||
t.Fatal("replaceGoName:", ret)
|
t.Fatal("replaceGoName:", ret)
|
||||||
@@ -155,6 +160,9 @@ func TestPkgKind(t *testing.T) {
|
|||||||
if v, _ := pkgKind("noinit"); v != PkgNoInit {
|
if v, _ := pkgKind("noinit"); v != PkgNoInit {
|
||||||
t.Fatal("pkgKind:", v)
|
t.Fatal("pkgKind:", v)
|
||||||
}
|
}
|
||||||
|
if v, _ := pkgKind("link"); v != PkgLinkIR {
|
||||||
|
t.Fatal("pkgKind:", v)
|
||||||
|
}
|
||||||
if v, _ := pkgKind(""); v != PkgLLGo {
|
if v, _ := pkgKind(""); v != PkgLLGo {
|
||||||
t.Fatal("pkgKind:", v)
|
t.Fatal("pkgKind:", v)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user