mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2024-12-29 16:29:40 +00:00
Added stack_rotate() regressions.
This commit is contained in:
parent
ba4a35229c
commit
94359dbf8c
2 changed files with 18 additions and 8 deletions
|
@ -55,15 +55,25 @@ test_stack_push();
|
|||
|
||||
|
||||
module test_stack_pop() {
|
||||
q = ["Foo", "Bar", "Baz", "Qux"];
|
||||
q1 = stack_pop(q);
|
||||
assert(q1 == ["Foo", "Bar", "Baz"]);
|
||||
q2 = stack_pop(q,2);
|
||||
assert(q2 == ["Foo", "Bar"]);
|
||||
q3 = stack_pop(q,3);
|
||||
assert(q3 == ["Foo"]);
|
||||
s = ["Foo", "Bar", "Baz", "Qux"];
|
||||
s1 = stack_pop(s);
|
||||
assert(s1 == ["Foo", "Bar", "Baz"]);
|
||||
s2 = stack_pop(s,2);
|
||||
assert(s2 == ["Foo", "Bar"]);
|
||||
s3 = stack_pop(s,3);
|
||||
assert(s3 == ["Foo"]);
|
||||
}
|
||||
test_stack_pop();
|
||||
|
||||
|
||||
module test_stack_rotate() {
|
||||
s = ["Foo", "Bar", "Baz", "Qux", "Quux"];
|
||||
s1 = stack_rotate(s,4);
|
||||
assert(s1 == ["Foo", "Baz", "Qux", "Quux", "Bar"]);
|
||||
s2 = stack_rotate(s,-4);
|
||||
assert(s2 == ["Foo", "Quux", "Bar", "Baz", "Qux"]);
|
||||
}
|
||||
test_stack_rotate();
|
||||
|
||||
|
||||
// vim: noexpandtab tabstop=4 shiftwidth=4 softtabstop=4 nowrap
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
BOSL_VERSION = [2,0,16];
|
||||
BOSL_VERSION = [2,0,17];
|
||||
|
||||
|
||||
// Section: BOSL Library Version Functions
|
||||
|
|
Loading…
Reference in a new issue