(t *testing.T)
| 66 | } |
| 67 | |
| 68 | func TestNullableStringConversionToString(t *testing.T) { |
| 69 | ns := new(nullableString) |
| 70 | if act := ns.String(); act != nilStr { |
| 71 | t.Error("Unset nullableString should convert to \"nil\"") |
| 72 | } |
| 73 | someVal := "someval" |
| 74 | if err := ns.Set(someVal); err != nil { |
| 75 | t.Errorf("Couldn't set nullableString to %q", someVal) |
| 76 | } |
| 77 | if act := ns.String(); act != someVal { |
| 78 | t.Errorf("Expected %q, but got %q", someVal, act) |
| 79 | } |
| 80 | } |