LEFT | RIGHT |
(Both sides are equal) |
1 // Copyright 2010 The Go Authors. All rights reserved. | 1 // Copyright 2010 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 // Basic test cases for cgo. | 5 // Basic test cases for cgo. |
6 | 6 |
7 package cgotest | 7 package cgotest |
8 | 8 |
9 /* | 9 /* |
10 #include <stdio.h> | 10 #include <stdio.h> |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 b := (int64)(0xc008427b) | 155 b := (int64)(0xc008427b) |
156 if a != b { | 156 if a != b { |
157 t.Errorf("Incorrect unsigned int - got %x, want %x", a, b) | 157 t.Errorf("Incorrect unsigned int - got %x, want %x", a, b) |
158 } | 158 } |
159 } | 159 } |
160 | 160 |
161 // Static (build-time) test that syntax traversal visits all operands of s[i:j:k
]. | 161 // Static (build-time) test that syntax traversal visits all operands of s[i:j:k
]. |
162 func sliceOperands(array [2000]int) { | 162 func sliceOperands(array [2000]int) { |
163 _ = array[C.KILO:C.KILO:C.KILO] // no type error | 163 _ = array[C.KILO:C.KILO:C.KILO] // no type error |
164 } | 164 } |
LEFT | RIGHT |