(t *testing.T)
| 111 | } |
| 112 | |
| 113 | func TestEquals(t *testing.T) { |
| 114 | oneInt := IntegerValue{ |
| 115 | Value: 1, |
| 116 | } |
| 117 | twoInt := IntegerValue{ |
| 118 | Value: 2, |
| 119 | } |
| 120 | oneString := StringValue{ |
| 121 | Value: "one", |
| 122 | } |
| 123 | twoString := StringValue{ |
| 124 | Value: "two", |
| 125 | } |
| 126 | oneNull := NullValue{} |
| 127 | twoNull := NullValue{} |
| 128 | |
| 129 | shouldBeEqual(t, oneInt, oneInt) |
| 130 | shouldBeEqual(t, oneString, oneString) |
| 131 | shouldBeEqual(t, oneNull, twoNull) |
| 132 | shouldNotBeEqual(t, oneInt, twoInt) |
| 133 | shouldNotBeEqual(t, oneString, twoString) |
| 134 | shouldNotBeEqual(t, oneString, oneInt) |
| 135 | shouldNotBeEqual(t, oneNull, oneInt) |
| 136 | shouldNotBeEqual(t, oneNull, oneString) |
| 137 | shouldNotBeEqual(t, twoInt, twoNull) |
| 138 | } |
| 139 | |
| 140 | func shouldBeEqual(t *testing.T, valueOne ValueInterface, valueTwo ValueInterface) { |
| 141 | const ErrorMsgShouldBeEqual = "%s(type: %v) is not equal %s(type: %v), but is should be" |
nothing calls this directly
no test coverage detected