Skip to content

Commit

Permalink
Go: Add test for AliasType extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
mbg committed Aug 16, 2024
1 parent 4e3cb72 commit a237876
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
37 changes: 37 additions & 0 deletions go/ql/test/library-tests/semmle/go/Types/Aliases.expected
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
| DirEntry | file://:0:0:0:0 | DirEntry |
| FileInfo | file://:0:0:0:0 | FileInfo |
| FileMode | file://:0:0:0:0 | FileMode |
| GenericSignatureAlias | generic.go:84:6:84:21 | GenericSignature |
| Kind | file://:0:0:0:0 | Kind |
| Kind | file://:0:0:0:0 | basic interface type |
| PathError | file://:0:0:0:0 | PathError |
| TypeAlias | generic.go:36:6:36:17 | GenericArray |
| _type | file://:0:0:0:0 | Type |
| aNameOff | file://:0:0:0:0 | NameOff |
| aTextOff | file://:0:0:0:0 | TextOff |
| aTypeOff | file://:0:0:0:0 | TypeOff |
| any | file://:0:0:0:0 | Kind |
| any | file://:0:0:0:0 | basic interface type |
| arrayType | file://:0:0:0:0 | ArrayType |
| arraytype | file://:0:0:0:0 | ArrayType |
| chanType | file://:0:0:0:0 | ChanType |
| chantype | file://:0:0:0:0 | ChanType |
| funcType | file://:0:0:0:0 | FuncType |
| functype | file://:0:0:0:0 | FuncType |
| interfaceType | file://:0:0:0:0 | InterfaceType |
| interfacetype | file://:0:0:0:0 | InterfaceType |
| maptype | file://:0:0:0:0 | MapType |
| name | file://:0:0:0:0 | Name |
| nameOff | file://:0:0:0:0 | NameOff |
| ptrType | file://:0:0:0:0 | PtrType |
| ptrtype | file://:0:0:0:0 | PtrType |
| sliceType | file://:0:0:0:0 | SliceType |
| slicetype | file://:0:0:0:0 | SliceType |
| structField | file://:0:0:0:0 | StructField |
| structType | file://:0:0:0:0 | StructType |
| structtype | file://:0:0:0:0 | StructType |
| syscallErrorType | file://:0:0:0:0 | Errno |
| textOff | file://:0:0:0:0 | TextOff |
| typeOff | file://:0:0:0:0 | TypeOff |
| uncommonType | file://:0:0:0:0 | UncommonType |
| uncommontype | file://:0:0:0:0 | UncommonType |
4 changes: 4 additions & 0 deletions go/ql/test/library-tests/semmle/go/Types/Aliases.ql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import go

Check failure on line 1 in go/ql/test/library-tests/semmle/go/Types/Aliases.ql

View workflow job for this annotation

GitHub Actions / Test Linux (Ubuntu)

[106/524 comp 4.4s eval 46ms] FAILED(RESULT) /home/runner/work/codeql/codeql/go/ql/test/library-tests/semmle/go/Types/Aliases.ql

Check failure on line 1 in go/ql/test/library-tests/semmle/go/Types/Aliases.ql

View workflow job for this annotation

GitHub Actions / Test MacOS

[276/524 comp 2.5s eval 11ms] FAILED(RESULT) /Users/runner/work/codeql/codeql/go/ql/test/library-tests/semmle/go/Types/Aliases.ql

from AliasType at
select at.getName(), at.getRhs()

0 comments on commit a237876

Please sign in to comment.