File tree 5 files changed +54
-0
lines changed
5 files changed +54
-0
lines changed Original file line number Diff line number Diff line change
1
+ package testing
2
+
3
+ import (
4
+ "testing"
5
+
6
+ "github.com/stretchr/testify/require"
7
+ )
8
+
9
+ func TestInvalidJSON (t * testing.T ) {
10
+ require .NotEmpty (t , InvalidJSONMessage )
11
+ }
Original file line number Diff line number Diff line change
1
+ package petstore
2
+
3
+ import (
4
+ "testing"
5
+
6
+ "github.com/stretchr/testify/require"
7
+ )
8
+
9
+ func TestAPI (t * testing.T ) {
10
+ doc , api := NewAPI (t )
11
+
12
+ require .NotNil (t , doc )
13
+ require .NotNil (t , api )
14
+ }
Original file line number Diff line number Diff line change
1
+ package logger
2
+
3
+ import (
4
+ "testing"
5
+
6
+ "github.com/stretchr/testify/require"
7
+ )
8
+
9
+ func TestLogger (t * testing.T ) {
10
+ require .False (t , DebugEnabled ())
11
+ }
Original file line number Diff line number Diff line change 5
5
"os"
6
6
)
7
7
8
+ var _ Logger = StandardLogger {}
9
+
8
10
type StandardLogger struct {}
9
11
10
12
func (StandardLogger ) Printf (format string , args ... interface {}) {
Original file line number Diff line number Diff line change
1
+ package header
2
+
3
+ import (
4
+ "net/http"
5
+ "testing"
6
+
7
+ "github.com/stretchr/testify/require"
8
+ )
9
+
10
+ func TestHeader (t * testing.T ) {
11
+ hdr := http.Header {
12
+ "x-test" : []string {"value" },
13
+ }
14
+ clone := Copy (hdr )
15
+ require .Len (t , clone , len (hdr ))
16
+ }
You can’t perform that action at this time.
0 commit comments