Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
85f8d450
Commit
85f8d450
authored
Sep 16, 2008
by
Rob Pike
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix some broken tests (tests themselves were wrong)
R=gri,rsc OCL=15310 CL=15402
parent
c3b397bd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
89 additions
and
29 deletions
+89
-29
235.go
test/235.go
+10
-2
bug075.go
test/fixedbugs/bug075.go
+0
-0
golden.out
test/golden.out
+79
-27
No files found.
test/235.go
View file @
85f8d450
...
...
@@ -34,6 +34,14 @@ func min(xs *[]uint64) uint64 {
func
main
()
{
F
:=
[]
uint64
{
2
,
3
,
5
};
const
n
=
len
(
F
);
OUT
:=
[]
uint64
{
2
,
3
,
4
,
5
,
6
,
8
,
9
,
10
,
12
,
15
,
16
,
18
,
20
,
24
,
25
,
27
,
30
,
32
,
36
,
40
,
45
,
48
,
50
,
54
,
60
,
64
,
72
,
75
,
80
,
81
,
90
,
96
,
100
,
108
,
120
,
125
,
128
,
135
,
144
,
150
,
160
,
162
,
180
,
192
,
200
,
216
,
225
,
240
,
243
,
250
,
256
,
270
,
288
,
300
,
320
,
324
,
360
,
375
,
384
,
400
,
405
,
432
,
450
,
480
,
486
,
500
,
512
,
540
,
576
,
600
,
625
,
640
,
648
,
675
,
720
,
729
,
750
,
768
,
800
,
810
,
864
,
900
,
960
,
972
,
1000
,
1024
,
1080
,
1125
,
1152
,
1200
,
1215
,
1250
,
1280
,
1296
,
1350
,
1440
,
1458
,
1500
,
1536
,
1600
};
x
:=
uint64
(
1
);
ins
:=
new
([]
*
T
,
n
);
...
...
@@ -44,7 +52,7 @@ func main() {
xs
[
i
]
=
x
;
}
for
i
:=
0
;
i
<
100
;
i
++
{
for
i
:=
0
;
i
<
len
(
OUT
)
;
i
++
{
t
:=
min
(
xs
);
for
i
:=
0
;
i
<
n
;
i
++
{
ins
[
i
]
-<
x
;
...
...
@@ -55,7 +63,7 @@ func main() {
}
x
=
min
(
xs
);
print
(
x
,
"
\n
"
);
if
x
!=
OUT
[
i
]
{
panic
(
"bad: "
,
x
,
" should be "
,
OUT
[
i
]);
}
}
sys
.
exit
(
0
);
}
test/bugs/bug075.go
→
test/
fixed
bugs/bug075.go
View file @
85f8d450
File moved
test/golden.out
View file @
85f8d450
=========== ./bufiolib.go
throw: index out of range
SIGSEGV: segmentation violation
Faulting address: 0x0
pc: 0x11c43
0x11c43?zi
throw(98060, 0, 235528, ...)
throw(0x17f0c, 0x39808, 0x5e2e, ...)
0x11b97?zi
sys·throwindex(235528, 0, 0, ...)
sys·throwindex(0x39808, 0x0, 0x1, ...)
0x5e2e?zi
bufio·BufRead_ReadLineString(235312, 0, 65546, ...)
bufio·BufRead_ReadLineString(0x39730, 0x1000a, 0x39758, ...)
0x1cb8?zi
main·ReadLines(235312, 0, 235304, ...)
main·ReadLines(0x39730, 0x39728, 0x1, ...)
0x2bb5?zi
main·TestBufRead(85470, 0, 1, ...)
main·TestBufRead(0x14dde, 0x1, 0x7fff5fbff268, ...)
0x3830?zi
main·main(1, 0, 1606414952, ...)
main·main(0x1, 0x7fff5fbff268, 0x0, ...)
=========== ./func1.go
func1.go:12: var a redeclared in this block
previous declaration at func1.go:12
...
...
@@ -6,6 +32,9 @@ func1.go:12: var a redeclared in this block
=========== ./helloworld.go
hello, world
=========== ./map.go
skipping increment test until bug060 is fixed
=========== ./peano.go
0! = 1
1! = 1
...
...
@@ -59,7 +88,7 @@ bugs/bug020.go:7: type of a structure field cannot be an open array
BUG should compile
=========== bugs/bug026.go
sys·printstring: main·sig
s
_I: not defined
sys·printstring: main·sig
i
_I: not defined
BUG: known to fail incorrectly
=========== bugs/bug032.go
...
...
@@ -70,6 +99,8 @@ BUG: compilation succeeds incorrectly
=========== bugs/bug060.go
map does not increment
BUG: map increment
=========== bugs/bug064.go
bugs/bug064.go:15: illegal types for operand: CALL
(<int32>INT32)
...
...
@@ -81,11 +112,6 @@ bugs/bug074.go:6: syntax error
bugs/bug074.go:7: x: undefined
BUG: compiler crashes - Bus error
=========== bugs/bug075.go
bugs/bug075.go:11: bad shape across assignment - cr=1 cl=2
BUG: known to fail incorrectly
=========== bugs/bug077.go
BUG: known to succeed incorrectly
...
...
@@ -125,45 +151,43 @@ BUG: compilation succeeds incorrectly
throw: ifaces2i: nil pointer
SIGSEGV: segmentation violation
Faulting address: 0x0
pc: 0x1
b7d
0x1
b7d
?zi
throw(304
09
, 0, 0, ...)
throw(0x7
6c9
, 0x0, 0x0, ...)
0x2
07f
?zi
sys·ifaces2i(314
40, 0, 31480
, ...)
sys·ifaces2i(0x7
ad0, 0x7af8
, 0x0, ...)
pc: 0x1
c11
0x1
c11
?zi
throw(304
65
, 0, 0, ...)
throw(0x7
701
, 0x0, 0x0, ...)
0x2
113
?zi
sys·ifaces2i(314
96, 0, 31536
, ...)
sys·ifaces2i(0x7
b08, 0x7b30
, 0x0, ...)
0x136f?zi
main·main(1, 0, 160641
639
2, ...)
main·main(0x1, 0x7fff5fbff
80
8, 0x0, ...)
main·main(1, 0, 160641
495
2, ...)
main·main(0x1, 0x7fff5fbff
26
8, 0x0, ...)
BUG: fails incorrectly
=========== bugs/bug094.go
bugs/bug094.go:11: left side of := must be a name
bad top
. LITERAL-I0 l(3
4
3)
. LITERAL-I0 l(3
5
3)
bugs/bug094.go:11: fatal error: walktype: top=3 LITERAL
BUG: fails incorrectly
=========== bugs/bug095.go
found 2, expected 1
panic on line 3
4
2 PC=0x139e
panic on line 3
5
2 PC=0x139e
0x139e?zi
main·main(1, 0, 160641
639
2, ...)
main·main(0x1, 0x7fff5fbff
80
8, 0x0, ...)
main·main(1, 0, 160641
495
2, ...)
main·main(0x1, 0x7fff5fbff
26
8, 0x0, ...)
BUG wrong result
Trace/BPT trap ./$A.out
=========== bugs/bug097.go
panic on line 3
44 PC=0x13c2
0x13
c2
?zi
main·main(1, 0, 160641
639
2, ...)
main·main(0x1, 0x7fff5fbff
80
8, 0x0, ...)
panic on line 3
54 PC=0x13bc
0x13
bc
?zi
main·main(1, 0, 160641
495
2, ...)
main·main(0x1, 0x7fff5fbff
26
8, 0x0, ...)
BUG wrong result
Trace/BPT trap ./$A.out
=========== bugs/bug098.go
bugs/bug098.go:10: illegal types for operand: AS
...
...
@@ -171,6 +195,34 @@ bugs/bug098.go:10: illegal types for operand: AS
(**MAP[<int32>INT32]<int32>INT32)
BUG should compile
=========== bugs/bug099.go
done1
SIGSEGV: segmentation violation
Faulting address: 0x0
pc: 0x0
0x0?zi
panic(5070, 0, 45192, ...)
panic(0x13ce, 0xb088, 0xb088, ...)
=========== bugs/bug102.go
throw: index out of range
SIGSEGV: segmentation violation
Faulting address: 0x0
pc: 0x2615
0x2615?zi
throw(31052, 0, 0, ...)
throw(0x794c, 0x0, 0x1315, ...)
0x2569?zi
sys·throwindex(45096, 0, 0, ...)
sys·throwindex(0xb028, 0x0, 0x0, ...)
0x1315?zi
main·main(1, 0, 1606414952, ...)
main·main(0x1, 0x7fff5fbff268, 0x0, ...)
=========== fixedbugs/bug015.go
fixedbugs/bug015.go:7: overflow converting constant to <int64>INT64
...
...
@@ -205,7 +257,7 @@ fixedbugs/bug035.go:7: var f redeclared in this block
=========== fixedbugs/bug037.go
fixedbugs/bug037.go:6: vlong: undefined
fixedbugs/bug037.go:6: fatal error: addvar: n=NAME-s G0 a(1) l(3
3
8) t=<T> nil
fixedbugs/bug037.go:6: fatal error: addvar: n=NAME-s G0 a(1) l(3
4
8) t=<T> nil
=========== fixedbugs/bug039.go
fixedbugs/bug039.go:6: var x redeclared in this block
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment