@@ -41,8 +41,8 @@ var lexTests = []lexTest{
4141 {"error" , "somekey." , []item {mkItem (itemIdentifier , "somekey" ), iDot , iEOF }},
4242}
4343
44- // collect gathers the emitted items into a slice.
45- func collect (t * lexTest ) (items []item ) {
44+ // collectItems gathers the emitted items into a slice.
45+ func collectItems (t * lexTest ) (items []item ) {
4646 l := lex (t .input )
4747 for {
4848 item := l .nextItem ()
@@ -54,7 +54,7 @@ func collect(t *lexTest) (items []item) {
5454 return
5555}
5656
57- func equal (i1 , i2 []item , checkPos bool ) bool {
57+ func itemEqual (i1 , i2 []item , checkPos bool ) bool {
5858 if len (i1 ) != len (i2 ) {
5959 return false
6060 }
@@ -71,8 +71,8 @@ func equal(i1, i2 []item, checkPos bool) bool {
7171
7272func TestLex (t * testing.T ) {
7373 for _ , test := range lexTests {
74- items := collect (& test )
75- if ! equal (items , test .items , false ) {
74+ items := collectItems (& test )
75+ if ! itemEqual (items , test .items , false ) {
7676 t .Errorf ("%s: got\n \t %+v\n expected\n \t %v" , test .name , items , test .items )
7777 }
7878 }
0 commit comments