(t *testing.T)
| 158 | } |
| 159 | |
| 160 | func TestTextStringIsDeterministic(t *testing.T) { |
| 161 | hello := multiappend([]byte{toCborHeader(TypeText, 5)}, []byte("hello")) |
| 162 | hello2 := multiappend([]byte{toCborHeader(TypeText, 6)}, []byte("hello2")) |
| 163 | combinedHellos := multiappend(hello, hello2) |
| 164 | |
| 165 | for _, testCase := range [][]byte{hello, hello2, combinedHellos} { |
| 166 | if err := Deterministic(testCase); err != nil { |
| 167 | t.Error("Deterministically encoded text string should not return false for deterministicy.") |
| 168 | } |
| 169 | } |
| 170 | } |
| 171 | |
| 172 | func TestByteStringIsNotDeterministic(t *testing.T) { |
| 173 | // Claiming it would be followed by 3 bytes but there are only 2. |
nothing calls this directly
no test coverage detected