(t *testing.T)
| 1150 | } |
| 1151 | |
| 1152 | func TestPhaseJSON(t *testing.T) { |
| 1153 | expected := Phase(2) |
| 1154 | // convert structure to json bytes |
| 1155 | gotBytes, err := json.Marshal(expected) |
| 1156 | require.NoError(t, err) |
| 1157 | // convert bytes to structure |
| 1158 | got := new(Phase) |
| 1159 | // unmarshal into bytes |
| 1160 | require.NoError(t, json.Unmarshal(gotBytes, got)) |
| 1161 | // compare got vs expected |
| 1162 | require.Equal(t, &expected, got) |
| 1163 | } |
| 1164 | |
| 1165 | func TestAddHeight(t *testing.T) { |
| 1166 | // pre-define expected |