@@ -27,7 +27,7 @@ func Test_lyricInteractor_RenderVerse(t *testing.T) {
2727
2828 type args struct {
2929 y int
30- verses [ ]repository.HymnVerse
30+ verses map [ int ]repository.HymnVerse
3131 }
3232 tests := []struct {
3333 name string
@@ -39,8 +39,8 @@ func Test_lyricInteractor_RenderVerse(t *testing.T) {
3939 name : "KJ-002. 1column" ,
4040 args : args {
4141 y : 100 ,
42- verses : [ ]repository.HymnVerse {
43- repository.HymnVerse {
42+ verses : map [ int ]repository.HymnVerse {
43+ 2 : repository.HymnVerse {
4444 Number : sql.NullInt32 {Int32 : 2 , Valid : true },
4545 VerseNum : sql.NullInt32 {Int32 : 2 , Valid : true },
4646 Row : sql.NullInt16 {Int16 : 1 , Valid : true },
@@ -75,16 +75,16 @@ func Test_lyricInteractor_RenderVerse(t *testing.T) {
7575 name : "KJ-005. 2column" ,
7676 args : args {
7777 y : 100 ,
78- verses : [ ]repository.HymnVerse {
79- repository.HymnVerse {
78+ verses : map [ int ]repository.HymnVerse {
79+ 2 : repository.HymnVerse {
8080 Number : sql.NullInt32 {Int32 : 5 , Valid : true },
8181 VerseNum : sql.NullInt32 {Int32 : 2 , Valid : true },
8282 Row : sql.NullInt16 {Int16 : 1 , Valid : true },
8383 StyleRow : sql.NullInt32 {Int32 : 6 , Valid : true },
8484 Col : sql.NullInt16 {Int16 : 1 , Valid : true },
8585 Content : sql.NullString {String : verse2a , Valid : true },
8686 },
87- repository.HymnVerse {
87+ 3 : repository.HymnVerse {
8888 Number : sql.NullInt32 {Int32 : 5 , Valid : true },
8989 VerseNum : sql.NullInt32 {Int32 : 3 , Valid : true },
9090 Row : sql.NullInt16 {Int16 : 1 , Valid : true },
@@ -130,24 +130,24 @@ func Test_lyricInteractor_RenderVerse(t *testing.T) {
130130 name : "KJ-026. mixed 2 and 1 column" ,
131131 args : args {
132132 y : 100 ,
133- verses : [ ]repository.HymnVerse {
134- repository.HymnVerse {
133+ verses : map [ int ]repository.HymnVerse {
134+ 2 : repository.HymnVerse {
135135 Number : sql.NullInt32 {Int32 : 5 , Valid : true },
136136 VerseNum : sql.NullInt32 {Int32 : 2 , Valid : true },
137137 Row : sql.NullInt16 {Int16 : 1 , Valid : true },
138138 StyleRow : sql.NullInt32 {Int32 : 6 , Valid : true },
139139 Col : sql.NullInt16 {Int16 : 1 , Valid : true },
140140 Content : sql.NullString {String : verse3a , Valid : true },
141141 },
142- repository.HymnVerse {
142+ 3 : repository.HymnVerse {
143143 Number : sql.NullInt32 {Int32 : 5 , Valid : true },
144144 VerseNum : sql.NullInt32 {Int32 : 3 , Valid : true },
145145 Row : sql.NullInt16 {Int16 : 1 , Valid : true },
146146 StyleRow : sql.NullInt32 {Int32 : 6 , Valid : true },
147147 Col : sql.NullInt16 {Int16 : 2 , Valid : true },
148148 Content : sql.NullString {String : verse3b , Valid : true },
149149 },
150- repository.HymnVerse {
150+ 4 : repository.HymnVerse {
151151 Number : sql.NullInt32 {Int32 : 5 , Valid : true },
152152 VerseNum : sql.NullInt32 {Int32 : 4 , Valid : true },
153153 Row : sql.NullInt16 {Int16 : 2 , Valid : true },
@@ -196,7 +196,7 @@ func Test_lyricInteractor_RenderVerse(t *testing.T) {
196196 for _ , tt := range tests {
197197 t .Run (tt .name , func (t * testing.T ) {
198198 li := lyricInteractor {}
199- if got := li .RenderVerse (context .Background (), tt .initCanvas (ctrl ), tt .args .y , tt .args .verses ); ! reflect .DeepEqual (got , tt .want ) {
199+ if got := li .RenderVerse (context .Background (), tt .initCanvas (ctrl ), tt .args .y , tt .args .verses , nil ); ! reflect .DeepEqual (got , tt .want ) {
200200 t .Errorf ("lyricInteractor.RenderVerse() = %v, want %v" , got , tt .want )
201201 }
202202 })
0 commit comments