Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[base.t] test Real.base (well, Int.base for now)
  • Loading branch information
moritz committed May 7, 2011
1 parent c2c9573 commit 03eb0be
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions S32-num/base.t
@@ -0,0 +1,14 @@
use v6;
use Test;

plan 7;

is 0.base(8), '0', '0.base(something)';
is 42.base(10), '42', '42.base(10)';
is 42.base(16), '2A', '42.base(16)';
is 42.base(2) , '101010', '42.base(2)';
is 35.base(36), 'Z', '35.base(36)';
is 36.base(36), '10', '36.base(36)';
is (-12).base(16), '-C', '(-12).base(16)';

# TODO: tests for .base on non-integers

0 comments on commit 03eb0be

Please sign in to comment.