<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/go-git.git/src/testing/quick/quick_test.go, branch dev.inline</title>
<subtitle>github.com: golang/go
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/go-git.git/'/>
<entry>
<title>Revert "testing/quick: generate more map and slice states"</title>
<updated>2016-05-06T18:25:28+00:00</updated>
<author>
<name>Russ Cox</name>
<email>rsc@golang.org</email>
</author>
<published>2016-05-06T15:28:19+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/go-git.git/commit/?id=670a5cda2048af8d83958af0f4b2fda8f7b4ea72'/>
<id>670a5cda2048af8d83958af0f4b2fda8f7b4ea72</id>
<content type='text'>
This reverts commit 0ccabe2e0b42a2602e0f37ce28d5368aa811f530.

Change-Id: Ib1c230fb6801c0ee26f4a352b0c1130fa240a76a
Reviewed-on: https://go-review.googlesource.com/22860
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
Run-TryBot: Ian Lance Taylor &lt;iant@golang.org&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 0ccabe2e0b42a2602e0f37ce28d5368aa811f530.

Change-Id: Ib1c230fb6801c0ee26f4a352b0c1130fa240a76a
Reviewed-on: https://go-review.googlesource.com/22860
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
Run-TryBot: Ian Lance Taylor &lt;iant@golang.org&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>testing/quick: generate more map and slice states</title>
<updated>2016-02-26T20:04:04+00:00</updated>
<author>
<name>Matt T. Proud</name>
<email>matt.proud@gmail.com</email>
</author>
<published>2015-10-29T10:14:05+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/go-git.git/commit/?id=0ccabe2e0b42a2602e0f37ce28d5368aa811f530'/>
<id>0ccabe2e0b42a2602e0f37ce28d5368aa811f530</id>
<content type='text'>
This change adds support in testing/quick to generate maps and slices
in additional states:

  (1.) nil maps

  (2.) nil slices

  (3.) empty slice occupancy: `len(s) == 0 &amp;&amp; s != nil`

  (4.) partial slice occupancy: `len(s) &lt; cap(s) &amp;&amp; s != nil`

  (5.) full slice occupancy: `len(s) == cap(s) &amp;&amp; s != nil`

Prior to this, only #5 was ever generated, thereby not sufficiently
exercising all of the fuzzable code path outcomes.

This change depends on https://go-review.googlesource.com/#/c/17499/.

Change-Id: I9343c475cefbd72ffc5237281826465c25872206
Reviewed-on: https://go-review.googlesource.com/16470
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
Run-TryBot: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This change adds support in testing/quick to generate maps and slices
in additional states:

  (1.) nil maps

  (2.) nil slices

  (3.) empty slice occupancy: `len(s) == 0 &amp;&amp; s != nil`

  (4.) partial slice occupancy: `len(s) &lt; cap(s) &amp;&amp; s != nil`

  (5.) full slice occupancy: `len(s) == cap(s) &amp;&amp; s != nil`

Prior to this, only #5 was ever generated, thereby not sufficiently
exercising all of the fuzzable code path outcomes.

This change depends on https://go-review.googlesource.com/#/c/17499/.

Change-Id: I9343c475cefbd72ffc5237281826465c25872206
Reviewed-on: https://go-review.googlesource.com/16470
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
Run-TryBot: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>testing/quick: terminate for arbitrary recursive types</title>
<updated>2015-08-29T19:23:37+00:00</updated>
<author>
<name>Håvard Haugen</name>
<email>havard.haugen@gmail.com</email>
</author>
<published>2015-06-09T22:30:32+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/go-git.git/commit/?id=74245b03534dfec5f719aa60e03c0b932aa63e26'/>
<id>74245b03534dfec5f719aa60e03c0b932aa63e26</id>
<content type='text'>
Recursive types R containing slices of R's did not terminate despite the
effort in CL 10821.

For recursive types there was a competition between slice expansion by a
factor 'complexSize', and termination with probability '1/complexSize'
which lead to stack overflow as soon as a recursive struct had slices
pointing to its own type.

Fix this by shrinking the size hint as a function of recursion depth.
This has the dual effect of reducing the number of elements generated
per slice and also increasing the probability for termination.

Fixes #11148.

Change-Id: Ib61155b4f2e2de3873d508d63a1f4be759426d67
Reviewed-on: https://go-review.googlesource.com/13830
Reviewed-by: Adam Langley &lt;agl@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Recursive types R containing slices of R's did not terminate despite the
effort in CL 10821.

For recursive types there was a competition between slice expansion by a
factor 'complexSize', and termination with probability '1/complexSize'
which lead to stack overflow as soon as a recursive struct had slices
pointing to its own type.

Fix this by shrinking the size hint as a function of recursion depth.
This has the dual effect of reducing the number of elements generated
per slice and also increasing the probability for termination.

Fixes #11148.

Change-Id: Ib61155b4f2e2de3873d508d63a1f4be759426d67
Reviewed-on: https://go-review.googlesource.com/13830
Reviewed-by: Adam Langley &lt;agl@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>testing/quick: probabilistically generate nil pointers</title>
<updated>2015-06-08T21:19:13+00:00</updated>
<author>
<name>Håvard Haugen</name>
<email>havard.haugen@gmail.com</email>
</author>
<published>2015-06-07T19:28:58+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/go-git.git/commit/?id=7089ea4e475a11beaed6837027b7f5254449989f'/>
<id>7089ea4e475a11beaed6837027b7f5254449989f</id>
<content type='text'>
The documentation for quick.Value says that it "returns an arbitrary
value of the given type." In spite of this, nil values for pointers were
never generated, which seems more like an oversight than an intentional
choice.

The lack of nil values meant that testing recursive type like

  type Node struct {
  	Next *Node
  }

with testing/quick would lead to a stack overflow since the data
structure would never terminate.

This change may break tests that don't check for nil with pointers
returned from quick.Value. Two such instances were found in the standard
library, one of which was in the testing/quick package itself.

Fixes #8818.

Change-Id: Id390dcce649d12fbbaa801ce6f58f5defed77e60
Reviewed-on: https://go-review.googlesource.com/10821
Reviewed-by: Adam Langley &lt;agl@golang.org&gt;
Run-TryBot: Adam Langley &lt;agl@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The documentation for quick.Value says that it "returns an arbitrary
value of the given type." In spite of this, nil values for pointers were
never generated, which seems more like an oversight than an intentional
choice.

The lack of nil values meant that testing recursive type like

  type Node struct {
  	Next *Node
  }

with testing/quick would lead to a stack overflow since the data
structure would never terminate.

This change may break tests that don't check for nil with pointers
returned from quick.Value. Two such instances were found in the standard
library, one of which was in the testing/quick package itself.

Fixes #8818.

Change-Id: Id390dcce649d12fbbaa801ce6f58f5defed77e60
Reviewed-on: https://go-review.googlesource.com/10821
Reviewed-by: Adam Langley &lt;agl@golang.org&gt;
Run-TryBot: Adam Langley &lt;agl@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>testing/quick: align tests with reflect.Kind.</title>
<updated>2015-04-26T02:40:40+00:00</updated>
<author>
<name>Matt T. Proud</name>
<email>matt.proud@gmail.com</email>
</author>
<published>2015-04-12T17:50:52+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/go-git.git/commit/?id=b6a0450bece6820b6a6d272ce7468915c4aaf796'/>
<id>b6a0450bece6820b6a6d272ce7468915c4aaf796</id>
<content type='text'>
This commit is largely cosmetic in the sense that it is the remnants
of a change proposal I had prepared for testing/quick, until I
discovered that 3e9ed27 already implemented the feature I was looking
for: quick.Value() for reflect.Kind Array.  What you see is a merger
and manual cleanup; the cosmetic cleanups are as follows:

(1.) Keeping the TestCheckEqual and its associated input functions
in the same order as type kinds defined in reflect.Kind.  Since
3e9ed27 was committed, the test case began to diverge from the
constant's ordering.

(2.) The `Intptr` derivatives existed to exercise quick.Value with
reflect.Kind's `Ptr` constant.  All `Intptr` (unrelated to `uintptr`)
in the test have been migrated to ensure the parallelism of the
listings and to convey that `Intptr` is not special.

(3.) Correct a misspelling (transposition) of "alias", whereby it is
named as "Alais".

Change-Id: I441450db16b8bb1272c52b0abcda3794dcd0599d
Reviewed-on: https://go-review.googlesource.com/8804
Reviewed-by: Russ Cox &lt;rsc@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit is largely cosmetic in the sense that it is the remnants
of a change proposal I had prepared for testing/quick, until I
discovered that 3e9ed27 already implemented the feature I was looking
for: quick.Value() for reflect.Kind Array.  What you see is a merger
and manual cleanup; the cosmetic cleanups are as follows:

(1.) Keeping the TestCheckEqual and its associated input functions
in the same order as type kinds defined in reflect.Kind.  Since
3e9ed27 was committed, the test case began to diverge from the
constant's ordering.

(2.) The `Intptr` derivatives existed to exercise quick.Value with
reflect.Kind's `Ptr` constant.  All `Intptr` (unrelated to `uintptr`)
in the test have been migrated to ensure the parallelism of the
listings and to convey that `Intptr` is not special.

(3.) Correct a misspelling (transposition) of "alias", whereby it is
named as "Alais".

Change-Id: I441450db16b8bb1272c52b0abcda3794dcd0599d
Reviewed-on: https://go-review.googlesource.com/8804
Reviewed-by: Russ Cox &lt;rsc@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>testing/quick: support generation of array types in Value</title>
<updated>2015-02-04T16:17:07+00:00</updated>
<author>
<name>Chris Kastorff</name>
<email>encryptio@gmail.com</email>
</author>
<published>2015-02-04T12:43:00+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/go-git.git/commit/?id=3e9ed273a244da5d96472656af911a6d2714a9e8'/>
<id>3e9ed273a244da5d96472656af911a6d2714a9e8</id>
<content type='text'>
Generating array types like [4]int would fail even though the int type
is generatable. Allow generating values of array types when the inner
type is generatable.

Change-Id: I7d71b3c18edb3737e2fec1ddf5e36c9dc8401971
Reviewed-on: https://go-review.googlesource.com/3865
Reviewed-by: Josh Bleecher Snyder &lt;josharian@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Generating array types like [4]int would fail even though the int type
is generatable. Allow generating values of array types when the inner
type is generatable.

Change-Id: I7d71b3c18edb3737e2fec1ddf5e36c9dc8401971
Reviewed-on: https://go-review.googlesource.com/3865
Reviewed-by: Josh Bleecher Snyder &lt;josharian@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>build: move package sources from src/pkg to src</title>
<updated>2014-09-08T04:08:51+00:00</updated>
<author>
<name>Russ Cox</name>
<email>rsc@golang.org</email>
</author>
<published>2014-09-08T04:08:51+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/go-git.git/commit/?id=c007ce824d9a4fccb148f9204e04c23ed2984b71'/>
<id>c007ce824d9a4fccb148f9204e04c23ed2984b71</id>
<content type='text'>
Preparation was in CL 134570043.
This CL contains only the effect of 'hg mv src/pkg/* src'.
For more about the move, see golang.org/s/go14nopkg.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Preparation was in CL 134570043.
This CL contains only the effect of 'hg mv src/pkg/* src'.
For more about the move, see golang.org/s/go14nopkg.
</pre>
</div>
</content>
</entry>
</feed>
