From 13762bd76c0d3a7c2f71e4842f8db4cdc91d28ec Mon Sep 17 00:00:00 2001 From: Max Schaefer Date: Tue, 14 Apr 2020 10:18:27 +0100 Subject: [PATCH] Mark frontend errors in `Types/unknownFunction.go` as expected. --- .../semmle/go/Types/SignatureType_getNumParameter.expected | 2 +- .../semmle/go/Types/SignatureType_getNumResult.expected | 2 +- ql/test/library-tests/semmle/go/Types/notype.expected | 6 +++--- ql/test/library-tests/semmle/go/Types/unknownFunction.go | 4 +++- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/ql/test/library-tests/semmle/go/Types/SignatureType_getNumParameter.expected b/ql/test/library-tests/semmle/go/Types/SignatureType_getNumParameter.expected index 48855348e90..cc10eecd92b 100644 --- a/ql/test/library-tests/semmle/go/Types/SignatureType_getNumParameter.expected +++ b/ql/test/library-tests/semmle/go/Types/SignatureType_getNumParameter.expected @@ -8,4 +8,4 @@ | pkg1/tst.go:33:1:35:1 | function declaration | 0 | | pkg1/tst.go:37:1:37:26 | function declaration | 1 | | pkg1/tst.go:39:1:57:1 | function declaration | 2 | -| unknownFunction.go:8:1:12:1 | function declaration | 0 | +| unknownFunction.go:10:1:14:1 | function declaration | 0 | diff --git a/ql/test/library-tests/semmle/go/Types/SignatureType_getNumResult.expected b/ql/test/library-tests/semmle/go/Types/SignatureType_getNumResult.expected index a90412830d7..4a50841a812 100644 --- a/ql/test/library-tests/semmle/go/Types/SignatureType_getNumResult.expected +++ b/ql/test/library-tests/semmle/go/Types/SignatureType_getNumResult.expected @@ -8,4 +8,4 @@ | pkg1/tst.go:33:1:35:1 | function declaration | 1 | | pkg1/tst.go:37:1:37:26 | function declaration | 0 | | pkg1/tst.go:39:1:57:1 | function declaration | 0 | -| unknownFunction.go:8:1:12:1 | function declaration | 0 | +| unknownFunction.go:10:1:14:1 | function declaration | 0 | diff --git a/ql/test/library-tests/semmle/go/Types/notype.expected b/ql/test/library-tests/semmle/go/Types/notype.expected index 669165864d4..ded6be7bc59 100644 --- a/ql/test/library-tests/semmle/go/Types/notype.expected +++ b/ql/test/library-tests/semmle/go/Types/notype.expected @@ -1,3 +1,3 @@ -| unknownFunction.go:9:7:9:21 | unknownFunction | invalid type | -| unknownFunction.go:9:7:9:23 | call to unknownFunction | invalid type | -| unknownFunction.go:10:7:10:15 | ...+... | invalid type | +| unknownFunction.go:11:7:11:21 | unknownFunction | invalid type | +| unknownFunction.go:11:7:11:23 | call to unknownFunction | invalid type | +| unknownFunction.go:12:7:12:15 | ...+... | invalid type | diff --git a/ql/test/library-tests/semmle/go/Types/unknownFunction.go b/ql/test/library-tests/semmle/go/Types/unknownFunction.go index 5af16d4b13f..1eda1dba942 100644 --- a/ql/test/library-tests/semmle/go/Types/unknownFunction.go +++ b/ql/test/library-tests/semmle/go/Types/unknownFunction.go @@ -1,7 +1,9 @@ package main // This file tests type inference for expressions referencing undeclared entities. -// It is therefore expected to produce extractor warnings. +// It is therefore expected to expected frontend errors. + +// codeql test: expect frontend errors import "fmt"