Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion benchmark_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package check_test

import (
"time"
. "gopkg.in/check.v1"
. "github.com/pascallouisperez/check"
)

var benchmarkS = Suite(&BenchmarkS{})
Expand Down
2 changes: 1 addition & 1 deletion bootstrap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ package check_test

import (
"fmt"
"gopkg.in/check.v1"
"github.com/pascallouisperez/check"
"strings"
)

Expand Down
4 changes: 4 additions & 0 deletions check.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ type C struct {
method *methodType
kind funcKind
testName string
testSect string
_status funcStatus
logb *logger
logw io.Writer
Expand Down Expand Up @@ -313,6 +314,9 @@ func (c *C) logCode(path string, line int) {
code += err.Error()
}
}
if c.testSect != "" {
c.log(indent(c.testSect, " section: "))
}
c.log(indent(code, " "))
}

Expand Down
2 changes: 1 addition & 1 deletion check_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"testing"
"time"

"gopkg.in/check.v1"
"github.com/pascallouisperez/check"
)

// We count the number of suites run at least to get a vague hint that the
Expand Down
2 changes: 1 addition & 1 deletion checkers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package check_test

import (
"errors"
"gopkg.in/check.v1"
"github.com/pascallouisperez/check"
"reflect"
"runtime"
)
Expand Down
2 changes: 1 addition & 1 deletion fixture_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
package check_test

import (
. "gopkg.in/check.v1"
. "github.com/pascallouisperez/check"
)

// -----------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion foundation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ package check_test

import (
"fmt"
"gopkg.in/check.v1"
"github.com/pascallouisperez/check"
"log"
"os"
"regexp"
Expand Down
6 changes: 6 additions & 0 deletions helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ func (c *C) Skip(reason string) {
c.stopNow()
}

// Section informs that the running test is in a particular section, such that
// errors may be reported with the appropriate logging.
func (c *C) Section(testSect string) {
c.testSect = testSect
}

// -----------------------------------------------------------------------
// Basic logging.

Expand Down
2 changes: 1 addition & 1 deletion helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package check_test

import (
"gopkg.in/check.v1"
"github.com/pascallouisperez/check"
"os"
"reflect"
"runtime"
Expand Down
2 changes: 1 addition & 1 deletion printer_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package check_test

import (
. "gopkg.in/check.v1"
. "github.com/pascallouisperez/check"
)

var _ = Suite(&PrinterS{})
Expand Down
2 changes: 1 addition & 1 deletion run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package check_test

import (
"errors"
. "gopkg.in/check.v1"
. "github.com/pascallouisperez/check"
"os"
"sync"
)
Expand Down