mirror of
https://github.com/github/codeql.git
synced 2026-01-29 14:23:03 +01:00
Extend Types tests to cover interfaces.
This commit is contained in:
@@ -1,3 +1,14 @@
|
||||
| A | m | func() |
|
||||
| AC | m | func() |
|
||||
| AC | n | func() |
|
||||
| AC | o | func() |
|
||||
| AEmbedded | m | func() |
|
||||
| AExtended | m | func() |
|
||||
| AExtended | n | func() |
|
||||
| B | m | func() |
|
||||
| B | n | func() |
|
||||
| C | n | func() |
|
||||
| C | o | func() |
|
||||
| T | half | func() Foo |
|
||||
| T3 | half | func() Foo |
|
||||
| T4 | half | func() Foo |
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
| A | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1.A |
|
||||
| AC | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1.AC |
|
||||
| AEmbedded | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1.AEmbedded |
|
||||
| AExtended | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1.AExtended |
|
||||
| B | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1.B |
|
||||
| Bar | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1.Bar |
|
||||
| C | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1.C |
|
||||
| Foo | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1.Foo |
|
||||
| G | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg2.G |
|
||||
| T | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1.T |
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
| A | A |
|
||||
| AC | AC |
|
||||
| AEmbedded | AEmbedded |
|
||||
| AExtended | AExtended |
|
||||
| B | B |
|
||||
| Bar | Bar |
|
||||
| C | C |
|
||||
| Foo | Foo |
|
||||
| G | G |
|
||||
| T | T |
|
||||
|
||||
29
ql/test/library-tests/semmle/go/Types/pkg1/interfaces.go
Normal file
29
ql/test/library-tests/semmle/go/Types/pkg1/interfaces.go
Normal file
@@ -0,0 +1,29 @@
|
||||
package pkg1
|
||||
|
||||
type A interface {
|
||||
m()
|
||||
}
|
||||
|
||||
type B interface {
|
||||
m()
|
||||
n()
|
||||
}
|
||||
|
||||
type C interface {
|
||||
n()
|
||||
o()
|
||||
}
|
||||
|
||||
type AEmbedded interface {
|
||||
A
|
||||
}
|
||||
|
||||
type AC interface {
|
||||
A
|
||||
C
|
||||
}
|
||||
|
||||
type AExtended interface {
|
||||
A
|
||||
n()
|
||||
}
|
||||
Reference in New Issue
Block a user