mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-02-24 09:33:26 +01:00
15 lines
330 B
OpenSCAD
15 lines
330 B
OpenSCAD
|
module test_slice() {
|
||
|
echo("==== test_slice ====");
|
||
|
|
||
|
include <unittest.scad>;
|
||
|
include <util/slice.scad>;
|
||
|
|
||
|
lt = [for(c = "helloworld") c];
|
||
|
expected1 = [for(c = "hello") c];
|
||
|
expected2 = [for(c = "world") c];
|
||
|
|
||
|
assert(expected1 == slice(lt, 0, 5));
|
||
|
assert(expected2 == slice(lt, 5));
|
||
|
}
|
||
|
|
||
|
test_slice();
|