Exemple #1
0
static int test_packing_unpacking(BIO *out) {
  uint32_t a[3] = {0x1, 0x2, 0x3};

  uint32_t b[4] = {0x01000000, 0x02000000, 0x03000000, 0x04000000};

  uint32_t c[5] = {0x01600000, 0x02700000, 0x03800000, 0x04900000, 0x05A00000};

  if (!test_pack_unpack(out, a, 3, 32) || !test_pack_unpack(out, b, 4, 8) ||
      !test_pack_unpack(out, c, 5, 9))
    return 0;

  return 1;
}
void test_binary_seq_functions()
{
  test_binary_seq_rev_cmp();
  test_binary_seq_str();
  test_binary_seq_cpy();
  test_pack_unpack();
  test_pack_cpy_unpack();
}