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
a77f7b24
Commit
a77f7b24
authored
Jun 21, 2008
by
Ken Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove receclarations from tests
that are supposed to succeed SVN=124018
parent
85785fe5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
25 deletions
+25
-25
simparray.go
test/ken/simparray.go
+9
-9
simpconv.go
test/ken/simpconv.go
+6
-6
string.go
test/ken/string.go
+10
-10
No files found.
test/ken/simparray.go
View file @
a77f7b24
...
...
@@ -17,33 +17,33 @@ main()
a
[
i
]
=
float
(
i
);
}
s
:=
float
(
0
);
s
1
:=
float
(
0
);
for
i
:=
5
;
i
<
10
;
i
=
i
+
1
{
s
=
s
+
a
[
i
];
s
1
=
s1
+
a
[
i
];
}
if
s
!=
35
{
panic
s
;
}
if
s
1
!=
35
{
panic
s1
;
}
for
i
:=
short
(
5
);
i
<
10
;
i
=
i
+
1
{
b
[
i
]
=
float
(
i
);
}
s
:=
float
(
0
);
s
2
:=
float
(
0
);
for
i
:=
5
;
i
<
10
;
i
=
i
+
1
{
s
=
s
+
b
[
i
];
s
2
=
s2
+
b
[
i
];
}
if
s
!=
35
{
panic
s
;
}
if
s
2
!=
35
{
panic
s2
;
}
b
:=
new
([
100
]
int
);
for
i
:=
0
;
i
<
100
;
i
=
i
+
1
{
b
[
i
]
=
i
;
}
s
:=
0
;
s
3
:=
0
;
for
i
:=
0
;
i
<
100
;
i
=
i
+
1
{
s
=
s
+
b
[
i
];
s
3
=
s3
+
b
[
i
];
}
if
s
!=
4950
{
panic
s
;
}
if
s
3
!=
4950
{
panic
s3
;
}
}
test/ken/simpconv.go
View file @
a77f7b24
...
...
@@ -9,15 +9,15 @@ package main
func
main
()
{
s
:=
vlong
(
0
);
s
1
:=
vlong
(
0
);
for
i
:=
short
(
0
);
i
<
10
;
i
=
i
+
1
{
s
=
s
+
vlong
(
i
);
s
1
=
s1
+
vlong
(
i
);
}
if
s
!=
45
{
panic
s
;
}
if
s
1
!=
45
{
panic
s1
;
}
s
:=
float
(
0
);
s
2
:=
float
(
0
);
for
i
:=
0
;
i
<
10
;
i
=
i
+
1
{
s
=
s
+
float
(
i
);
s
2
=
s2
+
float
(
i
);
}
if
s
!=
45
{
panic
s
;
}
if
s
2
!=
45
{
panic
s2
;
}
}
test/ken/string.go
View file @
a77f7b24
...
...
@@ -82,21 +82,21 @@ main()
}
/* create string with byte array */
var
z
[
3
]
byte
;
z
[
0
]
=
'a'
;
z
[
1
]
=
'b'
;
z
[
2
]
=
'c'
;
c
=
string
(
z
);
var
z
1
[
3
]
byte
;
z
1
[
0
]
=
'a'
;
z
1
[
1
]
=
'b'
;
z
1
[
2
]
=
'c'
;
c
=
string
(
z
1
);
if
c
!=
"abc"
{
panic
"create array "
,
c
;
}
/* create string with byte array pointer */
z
:=
new
([
3
]
byte
);
z
[
0
]
=
'a'
;
z
[
1
]
=
'b'
;
z
[
2
]
=
'c'
;
c
=
string
(
z
);
z
2
:=
new
([
3
]
byte
);
z
2
[
0
]
=
'a'
;
z
2
[
1
]
=
'b'
;
z
2
[
2
]
=
'c'
;
c
=
string
(
z
2
);
if
c
!=
"abc"
{
panic
"create array pointer "
,
c
;
}
...
...
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