@@ -76,6 +76,7 @@ func TestSave(t *testing.T) {
76
76
ID : "some-id" ,
77
77
Name : "gopher" ,
78
78
Age : 29 ,
79
+ Weight : 150.03 ,
79
80
BirthTime : time .Now ().Add (- 29 * 365 * 24 * time .Hour ),
80
81
Address : Address {
81
82
Data : map [string ]string {"first_line" : "secret" },
@@ -104,6 +105,7 @@ func TestSave(t *testing.T) {
104
105
expected := map [string ]string {
105
106
"name" : "gopher" ,
106
107
"age" : "29" ,
108
+ "weight" : "150.03" ,
107
109
"birth" : person .BirthTime .Format (time .RFC3339Nano ),
108
110
"colors" : "" ,
109
111
"address_city_name" : "nyc" ,
@@ -121,6 +123,7 @@ func TestSavePointer(t *testing.T) {
121
123
ID : "some-id" ,
122
124
Name : "gopher" ,
123
125
Age : 29 ,
126
+ Weight : 153.2993 ,
124
127
BirthTime : time .Now ().Add (- 29 * 365 * 24 * time .Hour ),
125
128
PreferredColors : []string {"red" , "blue" , "yellow" },
126
129
Address : Address {
@@ -150,6 +153,7 @@ func TestSavePointer(t *testing.T) {
150
153
expected := map [string ]string {
151
154
"name" : "gopher" ,
152
155
"age" : "29" ,
156
+ "weight" : "153.2993" ,
153
157
"birth" : person .BirthTime .Format (time .RFC3339Nano ),
154
158
"colors" : "red%%%blue%%%yellow" ,
155
159
"address_city_name" : "nyc" ,
@@ -335,6 +339,7 @@ func TestLoadStruct(t *testing.T) {
335
339
err = storage .Save ("test-key" , map [string ]string {
336
340
"name" : "Gopher" ,
337
341
"age" : "29" ,
342
+ "weight" : "159.332" ,
338
343
"birth" : date .Format (time .RFC3339Nano ),
339
344
"colors" : "red%%%green%%%blue%%%black" ,
340
345
"address_number" : "-2" ,
@@ -356,6 +361,7 @@ func TestLoadStruct(t *testing.T) {
356
361
expectedPerson .Address .Number = - 2
357
362
expectedPerson .Name = "Gopher"
358
363
expectedPerson .Age = 29
364
+ expectedPerson .Weight = 159.332
359
365
expectedPerson .BirthTime = date
360
366
expectedPerson .PreferredColors = []string {"red" , "green" , "blue" , "black" }
361
367
err = storage .Load ("test-key" , & person )
0 commit comments