Skip to content

Commit

Permalink
Use more specific is-deeply for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Apr 18, 2019
1 parent fae956e commit d74f775
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 13 deletions.
4 changes: 2 additions & 2 deletions S32-str/sprintf-b.t
Expand Up @@ -199,9 +199,9 @@ for @info -> $format, @tests {
plan 2 * @tests;

for @tests {
is sprintf($format, .value), .key,
is-deeply sprintf($format, .value), .key,
"sprintf('$format',{.value}) eq '{.key}'";
is sprintf($format.uc, .value), .key.uc,
is-deeply sprintf($format.uc, .value), .key.uc,
"sprintf('{$format.uc}',{.value}) eq '{.key.uc}'";
}
}, "Tested '$format'";
Expand Down
2 changes: 1 addition & 1 deletion S32-str/sprintf-c.t
Expand Up @@ -68,7 +68,7 @@ for @info -> $format, @tests {
subtest {
plan +@tests;

is sprintf($format, .value), .key,
is-deeply sprintf($format, .value), .key,
"sprintf('$format',{.value}) eq '{.key}'"
for @tests;

Expand Down
2 changes: 1 addition & 1 deletion S32-str/sprintf-d.t
Expand Up @@ -126,7 +126,7 @@ for @info -> $format, @tests {
subtest {
plan +@tests;

is sprintf($format, .value), .key,
is-deeply sprintf($format, .value), .key,
"sprintf('$format',{.value}) eq '{.key}'"
for @tests;
}, "Tested '$format'";
Expand Down
4 changes: 2 additions & 2 deletions S32-str/sprintf-e.t
Expand Up @@ -123,9 +123,9 @@ for @info -> $format, @tests {
plan 2 * @tests;

for @tests {
is sprintf($format, .value), .key,
is-deeply sprintf($format, .value), .key,
"sprintf('$format',{.value}) eq '{.key}'";
is sprintf($format.uc, .value), .key.uc,
is-deeply sprintf($format.uc, .value), .key.uc,
"sprintf('$format.uc()',{.value}) eq '{.key.uc}'";
}
}, "Tested '$format'";
Expand Down
4 changes: 2 additions & 2 deletions S32-str/sprintf-f.t
Expand Up @@ -124,9 +124,9 @@ for @info -> $format, @tests {
plan 2 * @tests;

for @tests {
is sprintf($format, .value), .key,
is-deeply sprintf($format, .value), .key,
"sprintf('$format',{.value}) eq '{.key}'";
is sprintf($format.uc, .value), .key.uc,
is-deeply sprintf($format.uc, .value), .key.uc,
"sprintf('{$format.uc}',{.value}) eq '{.key.uc}'";
}
}, "Tested '$format'";
Expand Down
4 changes: 3 additions & 1 deletion S32-str/sprintf-o.t
Expand Up @@ -137,6 +137,7 @@ my @info = ( # |-----------|-----------|-----------|-----------|
'-0 ', 8, "0 ", "1 ", "100 ", "-100 ",
'-+0 ', 8, "0 ", "1 ", "100 ", "-100 ",
'#', 8, " 0", " 01", " 0100", " 0-100",
'# ', 8, " 0", " 01", " 0100", " 0-100",
'#0', 8, "00000000", "00000001", "00000100", "0000-100",
'#0 ', 8, "00000000", "00000001", "00000100", "0000-100",
# NOTE: all the "0-100" are bogus, but provided by the current implementation
Expand Down Expand Up @@ -172,6 +173,7 @@ my @info = ( # |-----------|-----------|-----------|-----------|
'-+0 ', 8.2, "00 ", "01 ", "100 ", "-100 ",
# NOTE: all the "0-100" are bogus, but provided by the current implementation
'#', 8.2, " 00", " 01", " 0100", " 0-100",
'# ', 8.2, " 00", " 01", " 0100", " 0-100",
'#0', 8.2, " 00", " 01", " 0100", " 0-100",
'#0 ', 8.2, " 00", " 01", " 0100", " 0-100",
'#+', 8.2, " 00", " 01", " 0100", " 0-100",
Expand Down Expand Up @@ -202,7 +204,7 @@ for @info -> $format, @tests {
subtest {
plan +@tests;

is sprintf($format, .value), .key,
is-deeply sprintf($format, .value), .key,
"sprintf('$format',{.value}0) eq '{.key}'"
for @tests;
}, "Tested '$format'";
Expand Down
2 changes: 1 addition & 1 deletion S32-str/sprintf-s.t
Expand Up @@ -122,7 +122,7 @@ for @info -> $format, @tests {
subtest {
plan +@tests;

is sprintf($format, .value), .key,
is-deeply sprintf($format, .value), .key,
"sprintf('$format',{.value}) eq '{.key}'"
for @tests;
}, "Tested '$format'";
Expand Down
2 changes: 1 addition & 1 deletion S32-str/sprintf-u.t
Expand Up @@ -85,7 +85,7 @@ for @info -> $format, @tests {
subtest {
plan +@tests;

is sprintf($format, .value), .key,
is-deeply sprintf($format, .value), .key,
"sprintf('$format',{.value}) eq '{.key}'"
for @tests;
}, "Tested '$format'";
Expand Down
4 changes: 2 additions & 2 deletions S32-str/sprintf-x.t
Expand Up @@ -205,9 +205,9 @@ for @info -> $format, @tests {
plan 2 * @tests;

for @tests {
is sprintf($format, .value), .key,
is-deeply sprintf($format, .value), .key,
"sprintf('$format',{.value}) eq '{.key}'";
is sprintf($format.uc, .value), .key.uc,
is-deeply sprintf($format.uc, .value), .key.uc,
"sprintf('{$format.uc}',{.value}) eq '{.key.uc}'";
}
}, "Tested '$format'";
Expand Down

0 comments on commit d74f775

Please sign in to comment.