Skip to content

Commit a0f4d02

Browse files
author
udhos
committed
Split testing.
1 parent bee6c6d commit a0f4d02

File tree

3 files changed

+25
-7
lines changed

3 files changed

+25
-7
lines changed

basgo-build/build_test.go

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -817,9 +817,25 @@ const sourceGosub = `
817817
410 return
818818
`
819819

820-
func TestBuild(t *testing.T) {
820+
func TestBuild200(t *testing.T) {
821+
testRange(t, 0, 200)
822+
}
823+
824+
func TestBuild400(t *testing.T) {
825+
testRange(t, 200, 400)
826+
}
827+
828+
func TestBuild600(t *testing.T) {
829+
testRange(t, 400, len(testTable))
830+
}
831+
832+
func testRange(t *testing.T, low, high int) {
833+
834+
table := testTable[low:high]
835+
836+
for i, data := range table {
821837

822-
for _, data := range testTable {
838+
t.Logf("testRange [%d:%d]: %d of %d", low, high, i+low, len(testTable))
823839

824840
t.Logf("source: %q\n", data.source)
825841

build.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ build() {
1515
#hash golint >/dev/null && golint "$pkg"
1616
#hash staticcheck >/dev/null && staticcheck "$pkg"
1717

18-
go test "$pkg"
18+
time go test "$pkg"
1919
go install -v "$pkg"
2020
}
2121

@@ -36,6 +36,8 @@ build ./baslib/codepage
3636
build ./baslib/file
3737
build ./baslib
3838

39-
msg PLEASE STAND BY: tests for basgo-build may take some minutes
39+
msg "PLEASE STAND BY: tests for basgo-build may take some minutes"
40+
msg " for full testing output, stop testing and run the command below:"
41+
msg " time go test -test.v ./basgo-build"
4042
build ./basgo-build
4143

tmp-graphics/a2.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package main
22

33
import (
4-
"github.com/udhos/baslib/baslib"
54
"github.com/faiface/mainthread"
5+
"github.com/udhos/baslib/baslib"
66
//"github.com/go-gl/glfw/v3.2/glfw"
77
"math"
88
"os"
@@ -13,8 +13,8 @@ func main() {
1313
}
1414

1515
func run() {
16-
mainthread.Call(func(){
17-
baslib.G = baslib.InitWin(640, 480)
16+
mainthread.Call(func() {
17+
baslib.G = baslib.InitWin(640, 480)
1818
})
1919
var (
2020
sng_i float64 // var [i]

0 commit comments

Comments
 (0)