(t *testing.T)
| 179 | } |
| 180 | |
| 181 | func TestArrayIsDeterministic(t *testing.T) { |
| 182 | arr := multiappend([]byte{toCborHeader(TypeArray, 5)}, uint23, uint24, uint45, uint4294967295, uint18446744073709551615) |
| 183 | cborSequenceArray := multiappend(arr, arr) |
| 184 | |
| 185 | for _, testCase := range [][]byte{arr, cborSequenceArray} { |
| 186 | if err := Deterministic(testCase); err != nil { |
| 187 | t.Error("Deterministically encoded CBOR array should not return false for deterministicy.") |
| 188 | } |
| 189 | } |
| 190 | } |
| 191 | |
| 192 | func TestEmptyArrayIsDeterministic(t *testing.T) { |
| 193 | if err := Deterministic([]byte{toCborHeader(TypeArray, 0)}); err != nil { |
nothing calls this directly
no test coverage detected