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
27fb2abf
Commit
27fb2abf
authored
Jun 06, 2008
by
Rob Pike
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
first cut at test suite
SVN=121454
parent
fa259ff8
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
96 additions
and
11 deletions
+96
-11
golden.out
test/golden.out
+49
-0
hashmap.go
test/hashmap.go
+0
-2
run
test/run
+40
-0
test0.go
test/test0.go
+7
-9
No files found.
test/golden.out
0 → 100644
View file @
27fb2abf
=========== char_lit.go
char_lit.go:5: syntax error
char_lit.go:17: unknown escape sequence: \
char_lit.go:19: unknown escape sequence: "
BUG: known to fail incorrectly
=========== float_lit.go
float_lit.go:5: syntax error
float_lit.go:28: overflow in float constant
float_lit.go:56: overflow in float constant
float_lit.go:60: overflow in float constant
float_lit.go:64: overflow in float constant
BUG: known to fail incorrectly
=========== hashmap.go
hashmap.go:46: fatal error: optoas: no entry LSH-<uint32>UINT32
BUG: known to fail incorrectly
=========== helloworld.go
hello, world
=========== int_lit.go
int_lit.go:5: syntax error
BUG: known to fail incorrectly
=========== sieve.go
sieve.go:8: syntax error
sieve.go:16: prime undefined
sieve.go:17: out undefined
sieve.go:18: syntax error
sieve.go:27: fatal error: walktype: switch 1 unknown op RECV l(27)
BUG: known to fail incorrectly
=========== string_lit.go
string_lit.go:5: syntax error
string_lit.go:12: unknown escape sequence: \
string_lit.go:12: unknown escape sequence: '
BUG: known to fail incorrectly
=========== test0.go
test0.go:23: addtyp: renaming Point/<Point>{<x><int32>INT32;<y><int32>INT32;} to Point2/<Point2>FORW
test0.go:48: illegal types for operand
(<float32>FLOAT32) AS (<int32>INT32)
test0.go:49: illegal types for operand
(<float32>FLOAT32) AS (<int32>INT32)
test0.go:50: error in shape across assignment
test0.go:55: illegal types for operand
(*<Point2>{}) CALLMETH (<Point2>{})
test0.go:54: function call must be single valued (0)
test0.go:54: illegal types for operand
(<Point2>{}) AS ({})
BUG: known to fail incorrectly
=========== turing.go
^B^A^H^H^K^B^Q^@^C^C^C^A^@index 0<111>111
throw: bounds
BUG: known to fail incorrectly
test/hashmap.go
View file @
27fb2abf
...
...
@@ -4,8 +4,6 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// To compile: go hashmap.go && gcc -o g.out main.go.c gort0.c && g.out
package
main
// ----------------------------------------------------------------------------
...
...
test/run
0 → 100755
View file @
27fb2abf
#!/bin/sh
# 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.
case
X
"
$GOARCH
"
in
Xamd64
)
export
A
=
6
;;
*
)
echo
1>&2 run: unknown architecture
exit
1
esac
export
A
=
6
export
G
=
${
A
}
g
export
L
=
${
A
}
l
failed
=
0
for
i
in
*
.go
do
echo
'==========='
$i
export
F
=
$(
basename
$i
.go
)
sed
-n
'1,/[^/]/p'
$i
|
sed
's@//@@; $d'
>
/tmp/
$USER
.
$$
.gotest
if
!
sh /tmp/
$USER
.
$$
.gotest
then
echo
>
&2 fail:
$i
fi
done
|
cat
-v
>
run.out
case
$failed
in
1
)
echo
FAIL
esac
rm
/tmp/
$USER
.
$$
.gotest
if
!
diff run.out golden.out
then
failed
=
1
fi
exit
$failed
test/test0.go
View file @
27fb2abf
...
...
@@ -4,8 +4,6 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// This is test0.go.
package
Test0
const
...
...
@@ -29,11 +27,11 @@ type (
)
func
(
p
*
Point
)
Initialize
(
x
,
y
int
)
{
p
.
x
,
p
.
y
=
x
,
y
p
.
x
,
p
.
y
=
x
,
y
;
}
func
(
p
*
Point
)
Distance
()
int
{
return
p
.
x
*
p
.
x
+
p
.
y
*
p
.
y
return
p
.
x
*
p
.
x
+
p
.
y
*
p
.
y
;
}
var
(
...
...
@@ -45,14 +43,14 @@ var (
func
foo
()
{}
func
min
(
x
,
y
int
)
int
{
if
x
<
y
{
return
x
}
return
y
if
x
<
y
{
return
x
;
}
return
y
;
}
func
swap
(
x
,
y
int
)
(
u
,
v
int
)
{
u
=
y
;
v
=
x
;
return
return
;
}
func
control_structs
()
{
...
...
@@ -64,7 +62,7 @@ func control_structs() {
for
j
:=
0
;
j
<
i
;
j
++
{
if
i
==
0
{
}
else
i
=
0
;
var
x
float
var
x
float
;
}
foo
:
// a label
var
j
int
;
...
...
@@ -77,6 +75,6 @@ func control_structs() {
goto
foo
;
default
:
i
=
-+-+
i
;
break
break
;
}
}
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