Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
f710e8ed
Commit
f710e8ed
authored
Jun 26, 2008
by
Ken Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simultaneous assignment test
SVN=124994
parent
433ac8e5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
68 additions
and
0 deletions
+68
-0
test/simasign.go
test/simasign.go
+68
-0
No files found.
test/simasign.go
0 → 100644
View file @
f710e8ed
// $G $F.go && $L $F.$A && ./$A.out
// 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.
package
main
var
a
,
b
,
c
,
d
,
e
,
f
,
g
,
h
,
i
int
;
func
printit
()
{
print
a
,
b
,
c
,
d
,
e
,
f
,
g
,
h
,
i
,
"
\n
"
;
}
func
testit
()
bool
{
if
a
+
b
+
c
+
d
+
e
+
f
+
g
+
h
+
i
!=
45
{
print
"sum does not add to 45
\n
"
;
printit
();
panic
;
}
return
a
==
1
&&
b
==
2
&&
c
==
3
&&
d
==
4
&&
e
==
5
&&
f
==
6
&&
g
==
7
&&
h
==
8
&&
i
==
9
;
}
func
main
()
{
a
=
1
;
b
=
2
;
c
=
3
;
d
=
4
;
e
=
5
;
f
=
6
;
g
=
7
;
h
=
8
;
i
=
9
;
if
!
testit
()
{
panic
"init val
\n
"
;
}
for
z
:=
0
;
z
<
100
;
z
++
{
a
,
b
,
c
,
d
,
e
,
f
,
g
,
h
,
i
=
b
,
c
,
d
,
a
,
i
,
e
,
f
,
g
,
h
;
if
testit
()
{
if
z
==
19
{
break
;
}
print
"on "
,
z
,
"th iteration
\n
"
;
printit
();
panic
;
}
}
if
!
testit
()
{
print
"final val
\n
"
;
printit
();
panic
;
}
}
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