Skip to content

Commit 74dfc75

Browse files
committed
Test num to int32 and int32 to str conversions
1 parent 34d8b13 commit 74dfc75

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

t/nqp/109-coercions.t

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,14 @@ is($uint16_as_num, 100, 'uint16 to num conversion');
5656
my uint8 $uint8 := 100;
5757
my num $uint8_as_num := $uint32;
5858
is($uint8_as_num, 100, 'uint8 to num conversion');
59+
60+
my num $num_30 := 30;
61+
my int32 $int32_30 := $num_30;
62+
63+
is($int32_30, 30, 'num to int32 conversion');
64+
65+
{
66+
my int $int32 := 30;
67+
my str $str := $int32;
68+
is($str, '30', 'int32 to str conversion');
69+
}

0 commit comments

Comments
 (0)