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

Delta Between Two Patch Sets: test/fixedbugs/bug242.go

Issue 5376076: code review 5376076: gc: remove m[k] = x, false (Closed)
Left Patch Set: Created 13 years, 4 months ago
Right Patch Set: diff -r 5a1c75805f59 https://go.googlecode.com/hg Created 13 years, 4 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:
Right: Side by side diff | Download
« no previous file with change/comment | « test/fixedbugs/bug220.go ('k') | test/named1.go » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 // $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: tuple evaluation order 1 // $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: tuple evaluation order
2 2
3 // Copyright 2010 The Go Authors. All rights reserved. 3 // Copyright 2010 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style 4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file. 5 // license that can be found in the LICENSE file.
6 6
7 // Test order of evaluation in tuple assignments. 7 // Test order of evaluation in tuple assignments.
8 8
9 package main 9 package main
10 10
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 // 11 12 86 // 11 12
87 *f(), p2 = m[gint()] 87 *f(), p2 = m[gint()]
88 a[11] += '0' 88 a[11] += '0'
89 if !p1 || p2 { 89 if !p1 || p2 {
90 println("bad map check", i, p1, p2) 90 println("bad map check", i, p1, p2)
91 panic("fail") 91 panic("fail")
92 } 92 }
93 93
94 m[13] = 'B' 94 m[13] = 'B'
95 // 13 14 95 // 13 14
96 » m[gint()] = gbyte(), false 96 » delete(m, gint())
97 » gbyte()
97 if _, present := m[13]; present { 98 if _, present := m[13]; present {
98 println("bad map removal") 99 println("bad map removal")
99 panic("fail") 100 panic("fail")
100 } 101 }
101 102
102 c := make(chan byte, 1) 103 c := make(chan byte, 1)
103 c <- 'C' 104 c <- 'C'
104 // 15 16 105 // 15 16
105 *f(), p1 = <-e1(c, 16) 106 *f(), p1 = <-e1(c, 16)
106 close(c) 107 close(c)
(...skipping 16 matching lines...) Expand all
123 println("bad interface check", i, p1, p2) 124 println("bad interface check", i, p1, p2)
124 panic("fail") 125 panic("fail")
125 } 126 }
126 127
127 s := string(a[0:i]) 128 s := string(a[0:i])
128 if s != "def ii A 0 C 0 " { 129 if s != "def ii A 0 C 0 " {
129 println("bad array results:", s) 130 println("bad array results:", s)
130 panic("fail") 131 panic("fail")
131 } 132 }
132 } 133 }
LEFTRIGHT

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