4
use Sereal::Encoder qw(encode_sereal);
8
# IMPORTANT: If you add new types of cases here please update the
9
# "CANONICAL REPRESENTATION" documentation.
10
utf8_flag_on_ascii_string => [
31
require Test::Deep::NoTest;
32
die "PANIC: We expect at least Test::Deep 0.110 (and Test::Deep::NoTest doesn't support ->VERSION(...)"
33
unless version->new(Test::Deep->VERSION) >= version->new('0.110');
36
my $error = $@ // "Zombie Error";
37
plan skip_all => "We are skipping all our tests because we don't have a suitable Test::Deep here, got error: $error";
39
plan tests => keys(%tests) * 2;
41
for my $test (keys %tests) {
42
my ($x, $y) = @{$tests{$test}};
46
my $x_value_sereal = encode_sereal($x_value, {canonical => 1});
47
my $y_value_sereal = encode_sereal($y_value, {canonical => 1});
49
cmp_ok($x_value_sereal, 'ne', $y_value_sereal, "The $test values are not the same under Sereal");
50
ok(Test::Deep::eq_deeply($x_value, $y_value), "The $test values are the same under Test::Deep though");