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
63ef5a41
Commit
63ef5a41
authored
Oct 06, 2009
by
Robert Griesemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change tabwidth to 8 for tests
R=rsc DELTA=39 (0 added, 0 deleted, 39 changed) OCL=35360 CL=35376
parent
5afce0ca
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
39 deletions
+39
-39
printer_test.go
src/pkg/go/printer/printer_test.go
+1
-1
comments.x
src/pkg/go/printer/testdata/comments.x
+1
-1
declarations.golden
src/pkg/go/printer/testdata/declarations.golden
+33
-33
expressions.golden
src/pkg/go/printer/testdata/expressions.golden
+4
-4
No files found.
src/pkg/go/printer/printer_test.go
View file @
63ef5a41
...
@@ -17,7 +17,7 @@ import (
...
@@ -17,7 +17,7 @@ import (
const
(
const
(
dataDir
=
"testdata"
;
dataDir
=
"testdata"
;
tabwidth
=
4
;
tabwidth
=
8
;
)
)
...
...
src/pkg/go/printer/testdata/comments.x
View file @
63ef5a41
...
@@ -17,7 +17,7 @@ type S0 struct {
...
@@ -17,7 +17,7 @@ type S0 struct {
type
S1
struct
{
type
S1
struct
{
S0
;
S0
;
A
,
B
,
C
float
;
//
3
exported
fields
A
,
B
,
C
float
;
//
3
exported
fields
D
int
;
//
2
unexported
fields
D
int
;
//
2
unexported
fields
//
contains
unexported
fields
//
contains
unexported
fields
}
}
...
...
src/pkg/go/printer/testdata/declarations.golden
View file @
63ef5a41
...
@@ -19,10 +19,10 @@ import (
...
@@ -19,10 +19,10 @@ import (
)
)
import
(
import
(
"io"
;
"io"
;
aLongRename
"io"
;
aLongRename
"io"
;
b
"io"
;
b
"io"
;
c
"i"
"o"
;
c
"i"
"o"
;
)
)
//
no
newlines
between
consecutive
single
imports
,
but
//
no
newlines
between
consecutive
single
imports
,
but
...
@@ -124,16 +124,16 @@ func _() {
...
@@ -124,16 +124,16 @@ func _() {
// no entry has a type
// no entry has a type
const (
const (
zzzzzz = 1;
zzzzzz = 1;
z
= 2;
z = 2;
zzz
= 3;
zzz = 3;
)
)
// some entries have a type
// some entries have a type
const (
const (
xxxxxx
= 1;
xxxxxx = 1;
x
= 2;
x = 2;
xxx
= 3;
xxx = 3;
yyyyyyyy float = iota;
yyyyyyyy float = iota;
yyyy
= "bar";
yyyy = "bar";
yyy;
yyy;
yy = 2;
yy = 2;
)
)
...
@@ -143,31 +143,31 @@ func _() {
...
@@ -143,31 +143,31 @@ func _() {
// no entry has a type
// no entry has a type
var (
var (
zzzzzz = 1;
zzzzzz = 1;
z
= 2;
z = 2;
zzz
= 3;
zzz = 3;
)
)
// some entries have a type
// some entries have a type
var (
var (
xxxxxx int;
xxxxxx int;
x
float;
x float;
xxx
string;
xxx string;
yyyyyyyy int
= 1234;
yyyyyyyy int = 1234;
y
float = 3.14;
y float = 3.14;
yyyy
= "bar";
yyyy = "bar";
yyy
string = "foo";
yyy string = "foo";
)
)
}
}
func _() {
func _() {
type (
type (
xxxxxx int;
xxxxxx int;
x
float;
x float;
xxx
string;
xxx string;
xxxxx []x;
xxxxx []x;
xx
struct{};
xx struct{};
xxxxxxx struct {
xxxxxxx struct {
_, _ int;
_, _ int;
_
float;
_ float;
};
};
xxxx chan<- string;
xxxx chan<- string;
)
)
...
@@ -178,7 +178,7 @@ func _() {
...
@@ -178,7 +178,7 @@ func _() {
type ES struct{}
type ES struct{}
type _ struct { // this comment must not change indentation
type _ struct { // this comment must not change indentation
f
int;
f int;
f, ff, fff, ffff int;
f, ff, fff, ffff int;
}
}
...
@@ -216,14 +216,14 @@ type _ struct {
...
@@ -216,14 +216,14 @@ type _ struct {
type _ struct {
type _ struct {
bool;
bool;
a, b, c
int;
a, b, c int;
int
"tag";
int "tag";
ES;
// comment
ES; // comment
float
"tag"; // comment
float "tag"; // comment
f
int; // comment
f int; // comment
f, ff, fff, ffff int; // comment
f, ff, fff, ffff int; // comment
g
float "tag";
g float "tag";
h
float "tag"; // comment
h float "tag"; // comment
}
}
...
@@ -246,16 +246,16 @@ type _ interface {
...
@@ -246,16 +246,16 @@ type _ interface {
}
}
type _ interface { // this comment must not change indentation
type _ interface { // this comment must not change indentation
EI;
// here'
s
a
comment
EI; // here'
s
a
comment
f
();
//
no
blank
between
identifier
and
()
f
();
//
no
blank
between
identifier
and
()
fffff
();
//
no
blank
between
identifier
and
()
fffff
();
//
no
blank
between
identifier
and
()
gggggggggggg
(
x
,
y
,
z
int
);
//
hurray
gggggggggggg
(
x
,
y
,
z
int
);
//
hurray
}
}
//
formatting
of
variable
declarations
//
formatting
of
variable
declarations
func
_
()
{
func
_
()
{
type
day
struct
{
type
day
struct
{
n
int
;
n
int
;
short
,
long
string
;
short
,
long
string
;
}
}
var
(
var
(
...
...
src/pkg/go/printer/testdata/expressions.golden
View file @
63ef5a41
...
@@ -9,11 +9,11 @@ type T struct {
...
@@ -9,11 +9,11 @@ type T struct {
}
}
var
(
var
(
a
,
b
,
c
,
d
,
e
int
;
a
,
b
,
c
,
d
,
e
int
;
longIdentifier1
,
longIdentifier2
,
longIdentifier3
int
;
longIdentifier1
,
longIdentifier2
,
longIdentifier3
int
;
t0
,
t1
,
t2
T
;
t0
,
t1
,
t2
T
;
s
string
;
s
string
;
p
*
int
;
p
*
int
;
)
)
...
...
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