Verifies: STK-REQ-001 [boundary] MCDC STK-REQ-001: N/A
(t *testing.T)
| 2266 | // Verifies: STK-REQ-001 [boundary] |
| 2267 | // MCDC STK-REQ-001: N/A |
| 2268 | func TestValueTypeString(t *testing.T) { |
| 2269 | cases := []struct { |
| 2270 | value ValueType |
| 2271 | expected string |
| 2272 | }{ |
| 2273 | {NotExist, "non-existent"}, |
| 2274 | {String, "string"}, |
| 2275 | {Number, "number"}, |
| 2276 | {Object, "object"}, |
| 2277 | {Array, "array"}, |
| 2278 | {Boolean, "boolean"}, |
| 2279 | {Null, "null"}, |
| 2280 | {Unknown, "unknown"}, |
| 2281 | {ValueType(255), "unknown"}, |
| 2282 | } |
| 2283 | |
| 2284 | for _, tc := range cases { |
| 2285 | if got := tc.value.String(); got != tc.expected { |
| 2286 | t.Fatalf("ValueType(%d).String() = %q, want %q", tc.value, got, tc.expected) |
| 2287 | } |
| 2288 | } |
| 2289 | } |
| 2290 | |
| 2291 | // Verifies: STK-REQ-001 [boundary] |
| 2292 | // MCDC STK-REQ-001: N/A |