Skip to content

Commit 4fa484d

Browse files
authored
Merge pull request github#12130 from owen-mc/go/port-integration-tests
Go: port integration tests
2 parents c66a44f + 7ebe472 commit 4fa484d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+1770
-1
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
htmlFiles
2+
extractionErrors
3+
#select
4+
| test.go:0:0:0:0 | test.go |
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package makesample
2+
3+
import (
4+
"golang.org/x/net/ipv4"
5+
)
6+
7+
func test() {
8+
9+
header := ipv4.Header{}
10+
header.Version = 4
11+
12+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import sys
2+
3+
from create_database_utils import *
4+
5+
run_codeql_database_create([], lang="go")
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import go
2+
import semmle.go.DiagnosticsReporting
3+
4+
from GoFile f
5+
select f
6+
7+
query predicate htmlFiles(HtmlFile x) { any() }
8+
9+
query predicate extractionErrors(string msg, int sev) { reportableDiagnostics(_, msg, sev) }
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
all:
2+
go get
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
go 1.14
2+
3+
require (
4+
golang.org/x/net v0.0.0-20200505041828-1ed23360d12c
5+
)
6+
7+
module makesample
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
2+
golang.org/x/net v0.0.0-20200505041828-1ed23360d12c h1:zJ0mtu4jCalhKg6Oaukv6iIkb+cOvDrajDH9DH46Q4M=
3+
golang.org/x/net v0.0.0-20200505041828-1ed23360d12c/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
4+
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
5+
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd h1:xhmwyvizuTgC2qz7ZlMluP20uW+C3Rm0FD/WLDX8884=
6+
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
7+
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
htmlFiles
2+
extractionErrors
3+
#select
4+
| test.go:0:0:0:0 | test.go |
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package makesample
2+
3+
import (
4+
"golang.org/x/net/ipv4"
5+
)
6+
7+
func test() {
8+
9+
header := ipv4.Header{}
10+
header.Version = 4
11+
12+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import sys
2+
3+
from create_database_utils import *
4+
5+
run_codeql_database_create([], lang="go")

0 commit comments

Comments
 (0)