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
c77f0900
Commit
c77f0900
authored
Oct 26, 2010
by
Robert Griesemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
go/scanner: delete unnecessary type declarations
R=rsc, r2 CC=golang-dev
https://golang.org/cl/2735041
parent
5556f733
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
9 deletions
+4
-9
scanner_test.go
src/pkg/go/scanner/scanner_test.go
+4
-9
No files found.
src/pkg/go/scanner/scanner_test.go
View file @
c77f0900
...
@@ -427,14 +427,11 @@ func TestSemis(t *testing.T) {
...
@@ -427,14 +427,11 @@ func TestSemis(t *testing.T) {
}
}
type
seg
struct
{
var
segments
=
[]
struct
{
srcline
string
// a line of source text
srcline
string
// a line of source text
filename
string
// filename for current token
filename
string
// filename for current token
line
int
// line number for current token
line
int
// line number for current token
}
}{
var
segments
=
[]
seg
{
// exactly one token per line since the test consumes one token per segment
// exactly one token per line since the test consumes one token per segment
{
" line1"
,
"TestLineComments"
,
1
},
{
" line1"
,
"TestLineComments"
,
1
},
{
"
\n
line2"
,
"TestLineComments"
,
2
},
{
"
\n
line2"
,
"TestLineComments"
,
2
},
...
@@ -604,14 +601,12 @@ func checkError(t *testing.T, src string, tok token.Token, pos int, err string)
...
@@ -604,14 +601,12 @@ func checkError(t *testing.T, src string, tok token.Token, pos int, err string)
}
}
type
srcerr
struct
{
var
errors
=
[]
struct
{
src
string
src
string
tok
token
.
Token
tok
token
.
Token
pos
int
pos
int
err
string
err
string
}
}{
var
errors
=
[]
srcerr
{
{
"
\"\"
"
,
token
.
STRING
,
0
,
""
},
{
"
\"\"
"
,
token
.
STRING
,
0
,
""
},
{
"
\"
"
,
token
.
STRING
,
0
,
"string not terminated"
},
{
"
\"
"
,
token
.
STRING
,
0
,
"string not terminated"
},
{
"/**/"
,
token
.
COMMENT
,
0
,
""
},
{
"/**/"
,
token
.
COMMENT
,
0
,
""
},
...
...
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