aboutsummaryrefslogtreecommitdiff
path: root/test/zerodivide.go
AgeCommit message (Collapse)Author
2021-10-06all: use bytes.Cut, strings.CutRuss Cox
Many uses of Index/IndexByte/IndexRune/Split/SplitN can be written more clearly using the new Cut functions. Do that. Also rewrite to other functions if that's clearer. For #46336. Change-Id: I68d024716ace41a57a8bf74455c62279bde0f448 Reviewed-on: https://go-review.googlesource.com/c/go/+/351711 Trust: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-12-23test: lock in test for _ assignment evaluation/zerodivide panicEmmanuel Odeke
Fixes #5790. Fixes #18421. * Lock in _ = x1/x2 divide by zero runtime panics since it is actually evaluated and not discarded as in previous versions before Go1.8. * Update a test that was skipping over zerodivide tests that expected runtime panics, enabling us to check for the expected panics. Change-Id: I0af0a6ecc19345fa9763ab2e35b275fb2d9d0194 Reviewed-on: https://go-review.googlesource.com/34712 Reviewed-by: Keith Randall <khr@golang.org>
2013-02-12test: ensure all failing tests exit nonzero.Alan Donovan
Previously merely printing an error would cause the golden file comparison (in 'bash run') to fail, but that is no longer the case with the new run.go driver. R=iant CC=golang-dev https://golang.org/cl/7310087
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-16test: use testlib (final 61)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/5671080
2011-11-01non-pkg: gofix -r error -force=errorRuss Cox
R=golang-dev, iant, r, r CC=golang-dev https://golang.org/cl/5307066
2011-10-27test: error-related fixesRuss Cox
R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/5328051
2011-01-19delete float, complex - code changesRuss Cox
also: cmplx -> complex float64(1.0) -> 1.0 float64(1) -> 1.0 R=gri, r, gri1, r2 CC=golang-dev https://golang.org/cl/3991043
2010-12-15remove naclRuss Cox
The recent linker changes broke NaCl support a month ago, and there are no known users of it. The NaCl code can always be recovered from the repository history. R=adg, r CC=golang-dev https://golang.org/cl/3671042
2010-09-11test: Make gccgo believe that the variables can change.Ian Lance Taylor
This test is supposed to test runtime behaviour. However, gccgo is smart enough to see that the variables are local to the package and that they never change. Add a function so that gccgo thinks that the variables can in fact vary, so that the test works at runtime as expected. R=rsc CC=golang-dev https://golang.org/cl/2178041
2010-07-30fix buildKai Backman
R=rsc CC=golang-dev https://golang.org/cl/1913042
2010-07-30arm: bugfixes (stack clobbering, indices)Kai Backman
also changed zerodivide to output "BUG" R=rsc CC=golang-dev https://golang.org/cl/1871055
2010-07-20more soft float support. passes several basic testsKai Backman
but with less precision than hardware counterparts. fixed a number of tests to output BUG when they failed. changed the runner to distinghuish between output and output containing ^BUG R=rsc CC=dho, golang-dev https://golang.org/cl/1778041
2010-06-18test: add missing import for zerodivideChristopher Wedgwood
R=rsc CC=golang-dev, r https://golang.org/cl/1706043
2010-06-18complex divide: match C99 implementationRuss Cox
R=iant, ken2, r, r2, ken3 CC=golang-dev https://golang.org/cl/1686044
2010-06-14runtime: correct fault for 16-bit divide on LeopardRuss Cox
R=r CC=golang-dev https://golang.org/cl/1703041
2010-06-14Add test for division by zero.Rob Pike
It fails with 6g. Once 6g is fixed up I will extend the value tests. R=rsc, iant CC=golang-dev https://golang.org/cl/1677043