use strict;
use warnings;

use Test::More tests => 8;

use Test::BinaryData;
is_binary
    "\x00 A",
    "\x00 B",
    'binary data';
is_binary
    "\x00 A",
    [ qw( 00 20 42 ) ],
    'binary data (ref)';
is_binary
    'AA' x 512,
    'AB' x 512,
    'binary data (attr)',
    {
        columns   => 79,
        max_diffs => 2,
    };

use Test::Bits;
bits_is
    "\x01\x02",
    [ 0b1, 0b11 ],
    'bits';

use Test::HexString;
is_hexstr
    "\x01ABC",
    "\x01\x41\x42\x43\x44",
    'hex string';

use Test::HexDifferences;
eq_or_dump_diff
    "\x01ABC",
    "\x01ABCD",
    'diff';
dumped_eq_dump_or_diff
    "\x01ABC",
    <<'EOT',
0000 : 01 41 42 43 : .ABC
0004 : 44          : D
EOT
    'diff dump';
eq_or_dump_diff
    "\x01\x23\x45\x67\x89\xAB\xCD\xEF"
    . "\x01\x23\x45\x67"
    . "\x89\xAB\xCD\xEF",
    "\x01\x23\x45\x67\x89\xAB\xCD\xEF"
    . "\x01\x23\x45\x67"
    . "\x89\xAB\xCD\xEF"
    . "\xFF",
    {
        address => 0x4000,
        format  => <<"EOT",
%a : %N %4C : %d\n%1x%
%a : %n %2C : %d\n%*x
EOT
    },
    'diff format';
