From 5327db120772912768151ad1bd3a7fa87ffa5d07 Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Fri, 26 May 2017 10:13:58 +0800 Subject: [PATCH] added assertTrue --- src/unittest.scad | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/unittest.scad b/src/unittest.scad index 38efbe11..8f469020 100644 --- a/src/unittest.scad +++ b/src/unittest.scad @@ -88,5 +88,13 @@ module assertEqual(expected, actual) { ", but: ", actual) ); } - +} + +module assertTrue(truth) { + if(!truth) { + fail( + "Truth", + "expected: true, but: false" + ); + } } \ No newline at end of file