summaryrefslogtreecommitdiff
path: root/test/interface/pointer.go
Commit message (Collapse)AuthorAgeFilesLines
* test/interface: document testsRob Pike2012-02-191-1/+2
| | | | | | | | Most already had comments (yay); adjusted for consistency. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/5676102
* test: use testlib (fourth 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 https://golang.org/cl/5673079
* test: match gccgo error messagesIan Lance Taylor2011-09-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | bug363.go:13:12: error: invalid context-determined non-integer type for shift operand bug363.go:16:12: error: invalid context-determined non-integer type for shift operand pointer.go:34:6: error: incompatible type in initialization (pointer to interface type has no methods) pointer.go:36:6: error: incompatible type in initialization method2.go:15:1: error: invalid pointer or interface receiver type method2.go:16:1: error: invalid pointer or interface receiver type method2.go:21:1: error: invalid pointer or interface receiver type method2.go:22:1: error: invalid pointer or interface receiver type method2.go:28:15: error: type ‘*Val’ has no method ‘val’ method2.go:33:11: error: reference to undefined field or method ‘val’ shift1.go:19:16: error: invalid context-determined non-integer type for shift operand shift1.go:24:19: error: invalid context-determined non-integer type for shift operand shift1.go:25:17: error: invalid context-determined non-integer type for shift operand shift1.go:18:18: error: shift of non-integer operand shift1.go:26:13: error: floating point constant truncated to integer shift1.go:33:15: error: integer constant overflow shift1.go:34:15: error: integer constant overflow shift1.go:35:17: error: integer constant overflow R=golang-dev, r CC=golang-dev https://golang.org/cl/5081051
* errchk: allow multiple patternsRuss Cox2011-08-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | // ERROR "pattern1" "pattern2" means that there has to be one or more lines matching pattern1 and then excluding those, there have to be one or more lines matching pattern2. So if you expect two different error messages from a particular line, writing two separate patterns checks that both errors are produced. Also, errchk now flags lines that produce more errors than expected. Before, as long as at least one error matched the pattern, all the others were ignored. Revise tests to expect or silence these additional errors. R=lvd, r, iant CC=golang-dev https://golang.org/cl/4869044
* gc: another pointer to interface messageRuss Cox2011-04-211-0/+1
| | | | | | R=ken2 CC=golang-dev https://golang.org/cl/4444056
* gc: new typechecking rulesRuss Cox2010-06-081-8/+8
| | | | | | | | | | | | | | | | | * Code for assignment, conversions now mirrors spec. * Changed some snprint -> smprint. * Renamed runtime functions to separate interface conversions from type assertions: convT2I, assertI2T, etc. * Correct checking of \U sequences. Fixes #840. Fixes #830. Fixes #778. R=ken2 CC=golang-dev https://golang.org/cl/1303042
* fix "declared and not used" in tests;Russ Cox2009-09-141-1/+0
| | | | | | | | | also template/template.go, missed last time. R=r DELTA=116 (61 added, 10 deleted, 45 changed) OCL=34620 CL=34622
* more 6g reorg; checkpoint.Russ Cox2009-08-031-1/+1
| | | | | | | | | typecheck.c is now responsible for all type checking except for assignment and function argument "..." R=ken OCL=32661 CL=32667
* add test for yesterday's interface rule change (interface/convert1.go).Russ Cox2009-05-211-0/+37
move interface tests to subdirectory. R=r DELTA=1632 (827 added, 804 deleted, 1 changed) OCL=29181 CL=29191