]> Cypherpunks repositories - gostls13.git/commitdiff
added two new small tests
authorRob Pike <r@golang.org>
Mon, 16 Jun 2008 22:18:10 +0000 (15:18 -0700)
committerRob Pike <r@golang.org>
Mon, 16 Jun 2008 22:18:10 +0000 (15:18 -0700)
SVN=123010

test/bugs/bug047.go [new file with mode: 0644]
test/bugs/bug048.go [new file with mode: 0644]
test/golden.out

diff --git a/test/bugs/bug047.go b/test/bugs/bug047.go
new file mode 100644 (file)
index 0000000..a5beae5
--- /dev/null
@@ -0,0 +1,21 @@
+// $G $D/$F.go && $L $F.$A && ./$A.out
+
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+func main() {
+
+       type T struct {
+               s string;
+               f float;
+       };
+       var s string = "hello";
+       var f float = 0.2;
+       t := T(s, f);
+
+       type M map[int] int;
+       m0 := M(7 , 8);
+}
diff --git a/test/bugs/bug048.go b/test/bugs/bug048.go
new file mode 100644 (file)
index 0000000..0dfbaae
--- /dev/null
@@ -0,0 +1,13 @@
+// $G $D/$F.go && $L $F.$A && ./$A.out
+
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+func main() {
+       type M map[int] int;
+       m0 := M(7 , 8); // parses OK
+       m1 := M(7 : 8); // BUG: syntax error
+}
index 8845e16eaf450804231d1d3c634756b63697fee8..5c6b17b5d489ae2f96649ca2cbb101061a70757e 100644 (file)
@@ -225,6 +225,23 @@ BUG: known to fail incorrectly
 bugs/bug046.go:7: illegal <this> pointer
 BUG: known to fail incorrectly
 
+=========== bugs/bug047.go
+bugs/bug047.go:13: illegal types for operand: CONV
+       (<T>{<s><string>*STRING;<f><float32>FLOAT32;})
+bugs/bug047.go:16: illegal types for operand: CONV
+       (MAP[<int32>INT32]<int32>INT32)
+bugs/bug047.go:13: illegal types for operand: CONV
+       (<T>{<s><string>*STRING;<f><float32>FLOAT32;})
+bugs/bug047.go:16: illegal types for operand: CONV
+       (MAP[<int32>INT32]<int32>INT32)
+BUG: known to fail incorrectly
+
+=========== bugs/bug048.go
+bugs/bug048.go:7: illegal types for operand: CONV
+       (MAP[<int32>INT32]<int32>INT32)
+bugs/bug048.go:8: syntax error
+BUG: known to fail incorrectly
+
 =========== fixedbugs/bug000.go
 
 =========== fixedbugs/bug001.go