aboutsummaryrefslogtreecommitdiff
path: root/test/cmp.go
AgeCommit message (Collapse)Author
2015-06-26Fix several out of date references to 4g/5g/6g/8g/9g.Aaron Jacobs
Change-Id: Ifb8e4e13c7778a7c0113190051415e096f5db94f Reviewed-on: https://go-review.googlesource.com/11390 Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Andrew Gerrand <adg@golang.org>
2014-02-27cmd/gc: do not nop-convert equivalent but different interface types.Rémy Oudompheng
The cached computed interface tables are indexed by the interface types, not by the unnamed underlying interfaces To preserve the invariants expected by interface comparison, an itab generated for an interface type must not be used for a value of a different interface type even if the representation is identical. Fixes #7207. LGTM=rsc R=rsc, iant, khr CC=golang-codereviews https://golang.org/cl/69210044
2014-02-24cmd/gc: fix walkcompare bugs.Rémy Oudompheng
Revision c0e0467635ec (cmd/gc: return canonical Node* from temp) exposed original nodes of temporaries, allowing callers to mutate their types. In walkcompare a temporary could be typed as ideal because of this. Additionnally, assignment of a comparison result to a custom boolean type was broken. Fixes #7366. LGTM=rsc R=rsc, iant, khr CC=golang-codereviews https://golang.org/cl/66930044
2013-07-16test: invert incorrect condition.Alan Donovan
R=gri CC=golang-dev https://golang.org/cl/11359043
2013-07-02cmd/gc: fix computation of equality class of types.Rémy Oudompheng
A struct with a single field was considered as equivalent to the field type, which is incorrect is the field is blank. Fields with padding could make the compiler think some types are comparable when they are not. Fixes #5698. R=rsc, golang-dev, daniel.morsing, bradfitz, gri, r CC=golang-dev https://golang.org/cl/10271046
2013-02-21exp/ssa/interp: (#6 of 5): test interpretation of SSA form of $GOROOT/test/*.go.Alan Donovan
The interpreter's os.Exit now triggers a special panic rather than kill the test process. (It's semantically dubious, since it will run deferred routines.) Interpret now returns its exit code rather than calling os.Exit. Also: - disabled parts of a few $GOROOT/tests via os.Getenv("GOSSAINTERP"). - remove unnecessary 'slots' param to external functions; they are never closures. Most of the tests are disabled until go/types supports shifts. They can be reenabled if you patch this workaround: https://golang.org/cl/7312068 R=iant, bradfitz CC=golang-dev, gri https://golang.org/cl/7313062
2012-02-19test: [a-c]: add introductory comments to testsRob Pike
Very few of the compiler regression tests include a comment saying waht they do. Many are obvious, some are anything but. I've started with a-c in the top directory. More will follow once we agree on the approach, correctness, and thoroughness here. zerodivide.go sneaked in too. R=rsc, r CC=golang-dev https://golang.org/cl/5656100
2012-02-17cmd/gc: fix comparison of struct with _ fieldRuss Cox
Fixes #2989. R=ken2 CC=golang-dev https://golang.org/cl/5674091
2012-02-16test: use testlib (first 100)Russ Cox
X ,s;^// \$G (\$D/)?\$F\.go *$;// compile;g X ,s;^// \$G (\$D/)?\$F\.go && \$L \$F\.\$A *$;// build;g X ,s;^// \$G (\$D/)?\$F\.go && \$L \$F\.\$A && \./\$A\.out *$;// run;g X ,s;^// errchk \$G( -e)? (\$D/)?\$F\.go *$;// errorcheck;g R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/5656082
2011-12-15gc: inlining, allow empty bodies, fix _ arguments.Luuk van Dijk
R=rsc CC=golang-dev https://golang.org/cl/5487077
2011-12-12gc: implement == on structs and arraysRuss Cox
To allow these types as map keys, we must fill in equal and hash functions in their algorithm tables. Structs or arrays that are "just memory", like [2]int, can and do continue to use the AMEM algorithm. Structs or arrays that contain special values like strings or interface values use generated functions for both equal and hash. The runtime helper func runtime.equal(t, x, y) bool handles the general equality case for x == y and calls out to the equal implementation in the algorithm table. For short values (<= 4 struct fields or array elements), the sequence of elementwise comparisons is inlined instead of calling runtime.equal. R=ken, mpimenov CC=golang-dev https://golang.org/cl/5451105
2011-09-26test: silence/coalesce some testsRuss Cox
Add copyright notice to nilptr.go. R=golang-dev, r CC=golang-dev https://golang.org/cl/5139048