summaryrefslogtreecommitdiff
path: root/src/lib/testing.go
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2008-11-19 11:50:58 -0800
committerRob Pike <r@golang.org>2008-11-19 11:50:58 -0800
commita6b71cb1ad58a14a778e28107cea6360b84591f3 (patch)
treee14633c7fb1873e4dd22fe703f31e46a8e8fe955 /src/lib/testing.go
parent55b4b4555ab75ad85e145be5fc3780762a26c532 (diff)
downloadgolang-a6b71cb1ad58a14a778e28107cea6360b84591f3.tar.gz
gotest, via testing.go, should warn you if you failed to create any tests.
when chatty, it should tell you how many there are. R=rsc DELTA=5 (5 added, 0 deleted, 0 changed) OCL=19590 CL=19590
Diffstat (limited to 'src/lib/testing.go')
-rw-r--r--src/lib/testing.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/testing.go b/src/lib/testing.go
index a5d960fe8..53a2c19d1 100644
--- a/src/lib/testing.go
+++ b/src/lib/testing.go
@@ -21,6 +21,11 @@ export type Test struct {
export func Main(tests *[]Test) {
flag.Parse();
ok := true;
+ if len(tests) == 0 {
+ println("warning: no tests available");
+ } else if chatty {
+ println(len(tests), "tests to run");
+ }
for i := 0; i < len(tests); i++ {
if chatty {
println("=== RUN ", tests[i].name);