changeset 2497 | 2813495dcedb |
parent 2493 | 1ad4f76256d0 |
child 2499 | cdd2a98147b9 |
2496:568e830146a8 | 2497:2813495dcedb |
---|---|
5626 "Modified: / 19-09-2017 / 16:27:56 / stefan" |
5626 "Modified: / 19-09-2017 / 16:27:56 / stefan" |
5627 "Modified: / 17-12-2019 / 14:39:03 / Stefan Reise" |
5627 "Modified: / 17-12-2019 / 14:39:03 / Stefan Reise" |
5628 ! |
5628 ! |
5629 |
5629 |
5630 testReading2 |
5630 testReading2 |
5631 self assert:(Integer readFrom:'1000000001010' radix:2) = 4106. |
|
5632 self assert:(Integer readFrom:'-1000000001010' radix:2) = -4106. |
|
5633 |
|
5631 #( |
5634 #( |
5632 0 |
5635 0 |
5633 -0 |
5636 -0 |
5634 00 |
5637 00 |
5635 000 |
5638 000 |
5636 0x0 |
5639 0x0 |
5637 0b0 |
5640 0b0 |
5638 16r0 |
5641 16r0 |
5639 305419896 |
5642 305419896 |
5643 0x100A |
|
5644 -0x100A |
|
5645 16r100A |
|
5646 16r-100A |
|
5647 -16r100A |
|
5640 16r1FFFFFFF |
5648 16r1FFFFFFF |
5641 16r3FFFFFFF |
5649 16r3FFFFFFF |
5642 16r7FFFFFFF |
5650 16r7FFFFFFF |
5643 16rFFFFFFFF |
5651 16rFFFFFFFF |
5644 16r1FFFFFFFFFFFFFFF |
5652 16r1FFFFFFFFFFFFFFF |
5655 16rFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF |
5663 16rFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF |
5656 ) do:[:each | |
5664 ) do:[:each | |
5657 |s| |
5665 |s| |
5658 |
5666 |
5659 2 to:35 do:[:radix | |
5667 2 to:35 do:[:radix | |
5668 |got| |
|
5660 s := each printStringRadix:radix. |
5669 s := each printStringRadix:radix. |
5661 self assert:(Integer readFrom:s radix:radix) = each |
5670 self assert:(got := Integer readFrom:s radix:radix) = each |
5662 ] |
5671 ] |
5663 ]. |
5672 ]. |
5664 |
5673 |
5665 " |
5674 " |
5666 self basicNew testReading2 |
5675 self basicNew testReading2 |