(t *testing.T)
| 897 | } |
| 898 | |
| 899 | func TestString(t *testing.T) { |
| 900 | b := NewBufferRandom(32) |
| 901 | b.Melt() |
| 902 | s := b.String() |
| 903 | for i := range b.Bytes() { |
| 904 | b.Bytes()[i] = 'x' |
| 905 | if string(b.Bytes()) != s { |
| 906 | t.Error("string does not map same memory") |
| 907 | } |
| 908 | } |
| 909 | b.Destroy() |
| 910 | s = b.String() |
| 911 | if s != "" { |
| 912 | t.Error("string should be empty") |
| 913 | } |
| 914 | b = newNullBuffer() |
| 915 | if s != "" { |
| 916 | t.Error("string should be empty") |
| 917 | } |
| 918 | } |
| 919 | |
| 920 | func TestUint16(t *testing.T) { |
| 921 | b := NewBuffer(32) |
nothing calls this directly
no test coverage detected
searching dependent graphs…