(use-modules
 (srfi srfi-64)
 ((bit-vector-operations) #:prefix bvo:)
 ((bit-operations) #:prefix bo:))


(test-begin "bit-vector-operations-test")


(test-group
 "binary-bit-vector-operation"
 (test-equal
     (bvo:binary-bit-vector-operation #*10110100
                                      #*01101110
                                      (λ (b1 b2) (and b1 b2)))
   #*00100100)
 (test-equal
     (bvo:binary-bit-vector-operation #*10011010
                                      #*10101010
                                      (λ (b1 b2) (or b1 b2)))
   #*10111010)
 (test-equal
     (bvo:binary-bit-vector-operation #*10011010
                                      #*10101010
                                      (λ (b1 b2) (bo:xor b1 b2)))
   #*00110000))


(test-group
 "string->bit-vector"
 (test-equal #*10011100 (bvo:string->bit-vector "10011100")))


(test-end "bit-vector-operations-test")
