github.com/segmentio/parquet-go@v0.0.0-20230712180008-5d42db8f0d47/encoding/plain/plain_test.go (about) 1 package plain_test 2 3 import ( 4 "bytes" 5 "testing" 6 7 "github.com/segmentio/parquet-go/encoding/plain" 8 ) 9 10 func TestAppendBoolean(t *testing.T) { 11 values := []byte{} 12 13 for i := 0; i < 100; i++ { 14 values = plain.AppendBoolean(values, i, (i%2) != 0) 15 } 16 17 if !bytes.Equal(values, []byte{ 18 0b10101010, 19 0b10101010, 20 0b10101010, 21 0b10101010, 22 0b10101010, 23 0b10101010, 24 0b10101010, 25 0b10101010, 26 0b10101010, 27 0b10101010, 28 0b10101010, 29 0b10101010, 30 0b00001010, 31 }) { 32 t.Errorf("%08b\n", values) 33 } 34 }