Extend Types tests to cover interfaces.

This commit is contained in:
Max Schaefer
2020-02-27 09:31:52 +00:00
parent 545379c050
commit 6dfd5fd934
4 changed files with 52 additions and 0 deletions

View File

@@ -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 |

View File

@@ -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 |

View File

@@ -1,4 +1,10 @@
| A | A |
| AC | AC |
| AEmbedded | AEmbedded |
| AExtended | AExtended |
| B | B |
| Bar | Bar |
| C | C |
| Foo | Foo |
| G | G |
| T | T |

View 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()
}