mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-13 15:33:40 +00:00
testing: test testing package using tinygo test
This commit is contained in:
committed by
Ron Evans
parent
5e5ce98d42
commit
c25a7cc747
@@ -203,6 +203,7 @@ TEST_PACKAGES = \
|
|||||||
hash/crc64 \
|
hash/crc64 \
|
||||||
math \
|
math \
|
||||||
math/cmplx \
|
math/cmplx \
|
||||||
|
testing \
|
||||||
text/scanner \
|
text/scanner \
|
||||||
unicode/utf8 \
|
unicode/utf8 \
|
||||||
|
|
||||||
@@ -211,8 +212,6 @@ TEST_PACKAGES = \
|
|||||||
.PHONY: tinygo-test
|
.PHONY: tinygo-test
|
||||||
tinygo-test:
|
tinygo-test:
|
||||||
$(TINYGO) test $(TEST_PACKAGES)
|
$(TINYGO) test $(TEST_PACKAGES)
|
||||||
# until "test testing" passes
|
|
||||||
cd tests/tinygotest && $(TINYGO) test benchmark_test.go
|
|
||||||
|
|
||||||
.PHONY: smoketest
|
.PHONY: smoketest
|
||||||
smoketest:
|
smoketest:
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
package testbench
|
package testing_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
@@ -11,8 +11,8 @@ import (
|
|||||||
var buf = make([]byte, 13579)
|
var buf = make([]byte, 13579)
|
||||||
|
|
||||||
func NonASCII(b []byte, i int, offset int) int {
|
func NonASCII(b []byte, i int, offset int) int {
|
||||||
for i = offset; i < len(b) + offset; i++ {
|
for i = offset; i < len(b)+offset; i++ {
|
||||||
if b[i % len(b)] >= 0x80 {
|
if b[i%len(b)] >= 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user