(t *testing.T)
| 16 | } |
| 17 | |
| 18 | func TestProductString(t *testing.T) { |
| 19 | x := Product(109) |
| 20 | assert.Equal(t, "Product(109)", x.String()) |
| 21 | x = Product(1) |
| 22 | assert.Equal(t, "Dynamite", x.String()) |
| 23 | |
| 24 | y, err := ParseProduct("Anvil") |
| 25 | require.NoError(t, err, "Failed parsing anvil") |
| 26 | assert.Equal(t, AcmeIncProductAnvil, y) |
| 27 | |
| 28 | z, err := ParseProduct("Snake") |
| 29 | require.Error(t, err, "Shouldn't parse a snake") |
| 30 | assert.Equal(t, Product(0), z) |
| 31 | } |
| 32 | |
| 33 | func TestProductUnmarshal(t *testing.T) { |
| 34 | tests := []struct { |
nothing calls this directly
no test coverage detected
searching dependent graphs…