Skip to content

Commit

Permalink
Test stringification of negative zeros in Complex
Browse files Browse the repository at this point in the history
  • Loading branch information
zoffixznet committed Dec 12, 2016
1 parent 15c0978 commit 967a64b
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion S32-num/negative-zero.t
Expand Up @@ -2,7 +2,7 @@ use v6;
use lib <t/spec/packages>;
use Test;
use Test::Util;
plan 10;
plan 11;

=begin pod
Expand Down Expand Up @@ -107,3 +107,21 @@ subtest 'infix:<===> on complex zeros' => {
is-deeply <+0+0i> === <-0+0i>, False, '+0+0i === -0+0i';
is-deeply <+0+0i> === <+0+0i>, True, '+0+0i === +0+0i';
}

subtest 'Stringification of Complex handles signed zeros' => {
plan 12;
is-deeply <-0-0i>.perl, '<-0-0i>', '<-0-0i>.perl';
is-deeply <-0+0i>.perl, '<-0+0i>', '<-0+0i>.perl';
is-deeply <+0-0i>.perl, '<0-0i>', '<+0-0i>.perl';
is-deeply <+0+0i>.perl, '<0+0i>', '<+0+0i>.perl';

is-deeply <-0-0i>.gist, '-0-0i', '<-0-0i>.gist';
is-deeply <-0+0i>.gist, '-0+0i', '<-0+0i>.gist';
is-deeply <+0-0i>.gist, '0-0i', '<+0-0i>.gist';
is-deeply <+0+0i>.gist, '0+0i', '<+0+0i>.gist';

is-deeply <-0-0i>.Str, '-0-0i', '<-0-0i>.Str';
is-deeply <-0+0i>.Str, '-0+0i', '<-0+0i>.Str';
is-deeply <+0-0i>.Str, '0-0i', '<+0-0i>.Str';
is-deeply <+0+0i>.Str, '0+0i', '<+0+0i>.Str';
}

0 comments on commit 967a64b

Please sign in to comment.