Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(225)

Side by Side Diff: test/fixedbugs/bug262.go

Issue 748041: code review 748041: gc: tests omitted from the last bug fix (Closed)
Patch Set: code review 748041: gc: tests omitted from the last bug fix Created 14 years, 11 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | test/fixedbugs/bug263.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // $G $D/$F.go && $L $F.$A && ./$A.out
2
3 // Copyright 2010 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file.
6
7 package main
8
9 import (
10 "os"
11 "strconv"
12 )
13
14 var trace string
15
16 func f() string {
17 trace += "f"
18 return "abc"
19 }
20
21 func g() *os.Error {
22 trace += "g"
23 var x os.Error
24 return &x
25 }
26
27 func h() string {
28 trace += "h"
29 return "123"
30 }
31
32 func i() *int {
33 trace += "i"
34 var i int
35 return &i
36 }
37
38
39 func main() {
40 m := make(map[string]int)
41 m[f()], *g() = strconv.Atoi(h())
42 if m["abc"] != 123 || trace != "fgh" {
43 panic("BUG", m["abc"], trace)
44 }
45 mm := make(map[string]os.Error)
46 trace = ""
47 mm["abc"] = os.EINVAL
48 *i(), mm[f()] = strconv.Atoi(h())
49 if mm["abc"] != nil || trace != "ifh" {
50 panic("BUG1", mm["abc"], trace)
51 }
52 }
OLDNEW
« no previous file with comments | « no previous file | test/fixedbugs/bug263.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b