This commit is contained in:
Remko Tronçon 2022-05-31 21:18:35 +02:00
parent 7ffc90eca9
commit 09f342fcf3
3 changed files with 302 additions and 285 deletions

File diff suppressed because it is too large Load diff

View file

@ -151,12 +151,12 @@ T{ RO5 2 PICK -> 100 200 300 400 500 300 }T
T{ RO5 1 PICK -> RO5 OVER }T T{ RO5 1 PICK -> RO5 OVER }T
T{ RO5 0 PICK -> RO5 DUP }T T{ RO5 0 PICK -> RO5 DUP }T
\ \ ----------------------------------------------------------------------------- \ -----------------------------------------------------------------------------
\ TESTING 2>R 2R@ 2R> (contributed by James Bowman) TESTING 2>R 2R@ 2R> (contributed by James Bowman)
\ T{ : RR0 2>R 100 R> R> ; -> }T T{ : RR0 2>R 100 R> R> ; -> }T
\ T{ 300 400 RR0 -> 100 400 300 }T T{ 300 400 RR0 -> 100 400 300 }T
\ T{ 200 300 400 RR0 -> 200 100 400 300 }T T{ 200 300 400 RR0 -> 200 100 400 300 }T
\ T{ : RR1 2>R 100 2R@ R> R> ; -> }T \ T{ : RR1 2>R 100 2R@ R> R> ; -> }T
\ T{ 300 400 RR1 -> 100 300 400 400 300 }T \ T{ 300 400 RR1 -> 100 300 400 400 300 }T

View file

@ -1564,6 +1564,13 @@ function loadTests() {
}); });
}); });
describe("2>R", () => {
it("should work", () => {
run("400 300 2>R R> R>");
expect(stackValues()).to.eql([300, 400]);
});
});
describe("system", () => { describe("system", () => {
it("should run sieve", () => { it("should run sieve", () => {
run(sieve); run(sieve);