Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
0e70f272
Commit
0e70f272
authored
Feb 18, 2012
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
all: shorten some of the longer tests
R=golang-dev, r CC=golang-dev
https://golang.org/cl/5675092
parent
2ece2f58
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
0 deletions
+31
-0
src/pkg/compress/flate/deflate_test.go
src/pkg/compress/flate/deflate_test.go
+7
-0
src/pkg/image/ycbcr_test.go
src/pkg/image/ycbcr_test.go
+3
-0
src/pkg/math/big/nat_test.go
src/pkg/math/big/nat_test.go
+3
-0
src/pkg/math/rand/rand_test.go
src/pkg/math/rand/rand_test.go
+6
-0
src/pkg/old/netchan/netchan_test.go
src/pkg/old/netchan/netchan_test.go
+12
-0
No files found.
src/pkg/compress/flate/deflate_test.go
View file @
0e70f272
...
...
@@ -306,6 +306,9 @@ func TestDeflateInflateString(t *testing.T) {
t
.
Error
(
err
)
}
testToFromWithLimit
(
t
,
gold
,
test
.
label
,
test
.
limit
)
if
testing
.
Short
()
{
break
}
}
}
...
...
@@ -363,6 +366,10 @@ func TestWriterDict(t *testing.T) {
// See http://code.google.com/p/go/issues/detail?id=2508
func
TestRegression2508
(
t
*
testing
.
T
)
{
if
testing
.
Short
()
{
t
.
Logf
(
"test disabled with -short"
)
return
}
w
,
err
:=
NewWriter
(
ioutil
.
Discard
,
1
)
if
err
!=
nil
{
t
.
Fatalf
(
"NewWriter: %v"
,
err
)
...
...
src/pkg/image/ycbcr_test.go
View file @
0e70f272
...
...
@@ -49,6 +49,9 @@ func TestYCbCr(t *testing.T) {
testYCbCr
(
t
,
r
,
subsampleRatio
,
delta
)
}
}
if
testing
.
Short
()
{
break
}
}
}
...
...
src/pkg/math/big/nat_test.go
View file @
0e70f272
...
...
@@ -512,6 +512,9 @@ func TestStringPowers(t *testing.T) {
t
.
Errorf
(
"failed at %d ** %d in base %d: %s != %s"
,
b
,
p
,
b
,
xs
,
xs2
)
}
}
if
b
>=
3
&&
testing
.
Short
()
{
break
}
}
}
...
...
src/pkg/math/rand/rand_test.go
View file @
0e70f272
...
...
@@ -141,6 +141,9 @@ func TestNonStandardNormalValues(t *testing.T) {
for
m
:=
0.5
;
m
<
mmax
;
m
*=
2
{
for
_
,
seed
:=
range
testSeeds
{
testNormalDistribution
(
t
,
numTestSamples
,
m
,
sd
,
seed
)
if
testing
.
Short
()
{
break
}
}
}
}
...
...
@@ -191,6 +194,9 @@ func TestNonStandardExponentialValues(t *testing.T) {
for
rate
:=
0.05
;
rate
<
10
;
rate
*=
2
{
for
_
,
seed
:=
range
testSeeds
{
testExponentialDistribution
(
t
,
numTestSamples
,
rate
,
seed
)
if
testing
.
Short
()
{
break
}
}
}
}
...
...
src/pkg/old/netchan/netchan_test.go
View file @
0e70f272
...
...
@@ -291,6 +291,10 @@ func exportLoopback(exp *Exporter, t *testing.T) {
// This test checks that channel operations can proceed
// even when other concurrent operations are blocked.
func
TestIndependentSends
(
t
*
testing
.
T
)
{
if
testing
.
Short
()
{
t
.
Logf
(
"disabled test during -short"
)
return
}
exp
,
imp
:=
pair
(
t
)
exportLoopback
(
exp
,
t
)
...
...
@@ -378,6 +382,10 @@ const flowCount = 100
// test flow control from exporter to importer.
func
TestExportFlowControl
(
t
*
testing
.
T
)
{
if
testing
.
Short
()
{
t
.
Logf
(
"disabled test during -short"
)
return
}
exp
,
imp
:=
pair
(
t
)
sendDone
:=
make
(
chan
bool
,
1
)
...
...
@@ -394,6 +402,10 @@ func TestExportFlowControl(t *testing.T) {
// test flow control from importer to exporter.
func
TestImportFlowControl
(
t
*
testing
.
T
)
{
if
testing
.
Short
()
{
t
.
Logf
(
"disabled test during -short"
)
return
}
exp
,
imp
:=
pair
(
t
)
ch
:=
make
(
chan
int
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment