mirror of
				https://github.com/golang/go.git
				synced 2025-10-31 08:40:55 +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
				
			
		|  | @ -10,8 +10,8 @@ package main | |||
| 
 | ||||
| import "unsafe" | ||||
| 
 | ||||
| var dummy [512<<20]byte;	// give us a big address space | ||||
| var q *[1<<30]byte; | ||||
| var dummy [512<<20]byte	// give us a big address space | ||||
| var q *[1<<30]byte | ||||
| func main() { | ||||
| 	// the test only tests what we intend to test | ||||
| 	// if dummy starts in the first 256 MB of memory. | ||||
|  | @ -19,7 +19,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 | ||||
|  | @ -29,7 +29,7 @@ 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 x []byte; | ||||
| 	var y = &x; | ||||
| 	*y = q[0:];	// should crash (uses arraytoslice runtime routine) | ||||
| 	var x []byte | ||||
| 	var y = &x | ||||
| 	*y = q[0:]	// should crash (uses arraytoslice runtime routine) | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Rob Pike
						Rob Pike