Skip to content
This repository has been archived by the owner on Jan 5, 2019. It is now read-only.

Commit

Permalink
Test Cstyle bool
Browse files Browse the repository at this point in the history
  • Loading branch information
bufdev committed Jan 3, 2018
1 parent 1a09f23 commit e600e2a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions comment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ func TestParseCommentWithEmptyLinesIndentAndTripleSlash(t *testing.T) {
if got, want := def.Elements[0].(*Comment).Position.Line, 2; got != want {
t.Fatalf("got [%d] want [%d]", got, want)
}
if got, want := def.Elements[0].(*Comment).Cstyle, false; got != want {
t.Fatalf("got [%v] want [%v]", got, want)
}
}

func TestParseCStyleComment(t *testing.T) {
Expand Down Expand Up @@ -117,6 +120,9 @@ comment 3
if got, want := def.Elements[0].(*Comment).Lines[4], " comment 4"; got != want {
t.Fatalf("got [%v] want [%v]", got, want)
}
if got, want := def.Elements[0].(*Comment).Cstyle, true; got != want {
t.Fatalf("got [%v] want [%v]", got, want)
}
}

func TestParseCStyleCommentWithIndent(t *testing.T) {
Expand Down Expand Up @@ -146,6 +152,9 @@ func TestParseCStyleCommentWithIndent(t *testing.T) {
if got, want := def.Elements[0].(*Comment).Lines[4], " comment 4"; got != want {
t.Fatalf("got [%v] want [%v]", got, want)
}
if got, want := def.Elements[0].(*Comment).Cstyle, true; got != want {
t.Fatalf("got [%v] want [%v]", got, want)
}
}

func TestParseCommentWithTripleSlash(t *testing.T) {
Expand Down

0 comments on commit e600e2a

Please sign in to comment.