summaryrefslogtreecommitdiff
path: root/test/const3.go
Commit message (Collapse)AuthorAgeFilesLines
* test: [a-c]: add introductory comments to testsRob Pike2012-02-191-0/+2
| | | | | | | | | | | | 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 http://codereview.appspot.com/5656100
* test: use testlib (first 100)Russ Cox2012-02-161-1/+1
| | | | | | | | | | | 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 http://codereview.appspot.com/5656082
* gc: another shift bugRuss Cox2010-12-131-0/+6
| | | | | | | | Fixes issue 1316. R=ken2 CC=golang-dev http://codereview.appspot.com/3575042
* fmt.Print*: reimplement to switch on type first.Rob Pike2010-06-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This shortens, simplifies and regularizes the code significantly. (Improvements to reflect could make another step.) Passes all.bash. One semantic change occurs: The String() method changes behavior. It used to run only for string formats such as %s and %q. Instead, it now runs whenever the item has the method and the result is then processed by the format as a string. Besides the regularization, this has three effects: 1) width is honored for String() items 2) %x works for String() items 3) implementations of String that merely recur will recur forever Regarding point 3, example from the updated documentation: type X int func (x X) String() string { return Sprintf("%d", x) } should cast the value before recurring: func (x X) String() string { return Sprintf("%d", int(x)) } R=rsc CC=golang-dev http://codereview.appspot.com/1613045
* delete all uses of panicln by rewriting them using panic or,Rob Pike2010-03-241-10/+10
| | | | | | | | | in the tests, println+panic. gofmt some tests too. R=rsc CC=golang-dev http://codereview.appspot.com/741041
* make 6g constants behave as ken proposes. (i hope.)Russ Cox2009-03-121-0/+29
various bug fixes and tests involving constants. test/const1.go is the major new test case. R=ken OCL=26216 CL=26224