mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
test: remove semiocolons.
The ken directory is untouched so we have some examples with explicit semis. R=gri CC=golang-dev https://golang.org/cl/2157041
This commit is contained in:
parent
cd8f4cd206
commit
4f61fc96b2
88 changed files with 2512 additions and 2516 deletions
|
|
@ -11,10 +11,10 @@ package main
|
|||
import "unsafe"
|
||||
|
||||
func f([]byte) {
|
||||
panic("unreachable");
|
||||
panic("unreachable")
|
||||
}
|
||||
|
||||
var dummy [512<<20]byte; // give us a big address space
|
||||
var dummy [512<<20]byte // give us a big address space
|
||||
func main() {
|
||||
// the test only tests what we intend to test
|
||||
// if dummy starts in the first 256 MB of memory.
|
||||
|
|
@ -22,7 +22,7 @@ func main() {
|
|||
// at the address that might be accidentally
|
||||
// dereferenced below.
|
||||
if uintptr(unsafe.Pointer(&dummy)) > 256<<20 {
|
||||
panic("dummy too far out");
|
||||
panic("dummy too far out")
|
||||
}
|
||||
|
||||
// The problem here is that indexing into p[] with a large
|
||||
|
|
@ -32,6 +32,6 @@ func main() {
|
|||
// To avoid needing a check on every slice beyond the
|
||||
// usual len and cap, we require the *array -> slice
|
||||
// conversion to do the check.
|
||||
var p *[1<<30]byte = nil;
|
||||
f(p[0:]); // should crash
|
||||
var p *[1<<30]byte = nil
|
||||
f(p[0:]) // should crash
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue