File: assert-tests.scad

package info (click to toggle)
openscad 2021.01-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 36,096 kB
  • sloc: cpp: 53,199; sh: 4,384; ansic: 4,382; python: 1,813; yacc: 853; javascript: 762; lex: 417; lisp: 163; xml: 127; makefile: 118
file content (24 lines) | stat: -rw-r--r-- 336 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
a = 3;
b = 6;

assert(true);

assert("t1");

assert(a*b);

assert(condition = a*b);

assert(true) cube(8, center = true);

c = 2;
translate([0, 20, 0])
assert(condition = 2)
sphere(5);

d = c + 9;
assert(condition = d + 5 > 15, message = str("value: ", d + 5))
translate([15, 0, 0])
cylinder(8, 5, center = true);

echo("assert-tests");