sequences: Fix tests that broke when nth could only be integers. Undo integer>fixnum in iota nth. See bug #582.
parent
68f8d5bc17
commit
2996ef41ff
|
@ -357,13 +357,13 @@ cell-bits 32 = [
|
||||||
[ f ] [
|
[ f ] [
|
||||||
[
|
[
|
||||||
{ integer } declare iota [ ] map
|
{ integer } declare iota [ ] map
|
||||||
] \ >fixnum inlined?
|
] \ integer>fixnum inlined?
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
[ f ] [
|
[ f ] [
|
||||||
[
|
[
|
||||||
{ integer } declare { } set-nth-unsafe
|
{ integer } declare { } set-nth-unsafe
|
||||||
] \ >fixnum inlined?
|
] \ integer>fixnum inlined?
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
[ f ] [
|
[ f ] [
|
||||||
|
|
|
@ -20,7 +20,7 @@ must-fail
|
||||||
[ most-positive-fixnum 2 * 2 + V{ } clone set-length ]
|
[ most-positive-fixnum 2 * 2 + V{ } clone set-length ]
|
||||||
must-fail
|
must-fail
|
||||||
|
|
||||||
[ ] [
|
[
|
||||||
10 V{ } [ set-length ] keep
|
10 V{ } [ set-length ] keep
|
||||||
0.5 swap set-length
|
0.5 swap set-length
|
||||||
] unit-test
|
] must-fail
|
||||||
|
|
|
@ -214,7 +214,6 @@ unit-test
|
||||||
|
|
||||||
[ V{ "a" "b" } V{ } ] [ { "X" "a" "b" } { "X" } drop-prefix [ >vector ] bi@ ] unit-test
|
[ V{ "a" "b" } V{ } ] [ { "X" "a" "b" } { "X" } drop-prefix [ >vector ] bi@ ] unit-test
|
||||||
|
|
||||||
[ 0.5 10 iota nth ] [ no-method? ] must-fail-with
|
|
||||||
[ 0.5 { 1 2 3 } nth ] [ no-method? ] must-fail-with
|
[ 0.5 { 1 2 3 } nth ] [ no-method? ] must-fail-with
|
||||||
[ 0.5 "asdfasdf" nth ] [ no-method? ] must-fail-with
|
[ 0.5 "asdfasdf" nth ] [ no-method? ] must-fail-with
|
||||||
|
|
||||||
|
|
|
@ -106,7 +106,7 @@ TUPLE: iota { n integer read-only } ;
|
||||||
: iota ( n -- iota ) \ iota boa ; inline
|
: iota ( n -- iota ) \ iota boa ; inline
|
||||||
|
|
||||||
M: iota length n>> ; inline
|
M: iota length n>> ; inline
|
||||||
M: iota nth-unsafe drop integer>fixnum ; inline
|
M: iota nth-unsafe drop ; inline
|
||||||
|
|
||||||
INSTANCE: iota immutable-sequence
|
INSTANCE: iota immutable-sequence
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue