Add tests.

This commit is contained in:
Max Schaefer
2020-04-09 09:41:02 +01:00
parent d5c8570bfc
commit 1bf835f156
5 changed files with 48 additions and 0 deletions

View File

@@ -1,2 +1,4 @@
| hello2.go:0:0:0:0 | hello2.go | generated |
| hello.go:0:0:0:0 | hello.go | generated |
| httptest.go:0:0:0:0 | httptest.go | test |
| test1.go:0:0:0:0 | test1.go | test |

View File

@@ -0,0 +1,6 @@
| test1.go:5:1:5:26 | function declaration |
| test1.go:7:1:7:27 | function declaration |
| test1.go:15:1:15:31 | function declaration |
| test1.go:17:1:17:32 | function declaration |
| test1.go:25:1:25:17 | function declaration |
| test1.go:27:1:27:18 | function declaration |

View File

@@ -0,0 +1,4 @@
import go
from TestCase tc
select tc

View File

@@ -0,0 +1,5 @@
package main
import "net/http/httptest"
func setup(server *httptest.Server) {}

View File

@@ -0,0 +1,31 @@
package main
import "testing"
func Test(t *testing.T) {} // test case
func Test2(t *testing.T) {} // test case
func TestMustHaveSingleParameter(t *testing.T, b bool) {} // not a test case
func TestParameterMustHaveCorrectType(b *testing.B) {} // not a test case
func TestsDoNotLookLikeThis(t *testing.T) {} // not a test case
func Benchmark(b *testing.B) {} // test case
func Benchmark2(b *testing.B) {} // test case
func BenchmarkMustHaveSingleParameter(b *testing.B, flag bool) {} // not a test case
func BenchmarkParameterMustHaveCorrectType(t *testing.T) {} // not a test case
func BenchmarksDoNotLookLikeThis(b *testing.B) {} // not a test case
func Example() {} // test case
func Example2() {} // test case
func ExampleMustNotHaveParameter(t *testing.T) {} // not a test case
func ExamplesDoNotLookLikeThis() {} // not a test case