(t *testing.T, key LValue, value LValue, expect time.Time)
| 112 | } |
| 113 | |
| 114 | func assertOsDateFields(t *testing.T, key LValue, value LValue, expect time.Time) { |
| 115 | switch key.String() { |
| 116 | case "year": |
| 117 | if value.String() != strconv.Itoa(expect.Year()) { |
| 118 | t.Errorf("year=%v, expect.Year=%v", value.String(), expect.Year()) |
| 119 | } |
| 120 | case "month": |
| 121 | if value.String() != strconv.Itoa(int(expect.Month())) { |
| 122 | t.Errorf("month=%v, expect.Month=%v", value.String(), expect.Month()) |
| 123 | } |
| 124 | case "day": |
| 125 | if value.String() != strconv.Itoa(expect.Day()) { |
| 126 | t.Errorf("day=%v, expect.Day=%v", value.String(), expect.Day()) |
| 127 | } |
| 128 | case "hour": |
| 129 | if value.String() != strconv.Itoa(expect.Hour()) { |
| 130 | t.Errorf("hour=%v, expect.Hour=%v", value.String(), expect.Hour()) |
| 131 | } |
| 132 | case "min": |
| 133 | if value.String() != strconv.Itoa(expect.Minute()) { |
| 134 | t.Errorf("min=%v, expect.Minute=%v", value.String(), expect.Minute()) |
| 135 | } |
| 136 | case "sec": |
| 137 | if value.String() != strconv.Itoa(expect.Second()) { |
| 138 | t.Errorf("sec=%v, expect.Second=%v", value.String(), expect.Second()) |
| 139 | } |
| 140 | } |
| 141 | } |
no test coverage detected
searching dependent graphs…