From 84e5fb4c7bffd93c97bb65c753df4fc7dffb6452 Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Fri, 11 Mar 2022 20:54:49 +0800 Subject: [PATCH] add test --- test/test_all.scad | 1 + test/util/test_find_index.scad | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 test/util/test_find_index.scad diff --git a/test/test_all.scad b/test/test_all.scad index 4e6f742b..3e3a9400 100644 --- a/test/test_all.scad +++ b/test/test_all.scad @@ -73,6 +73,7 @@ include ; include ; include ; include ; +include ; include ; include ; include ; diff --git a/test/util/test_find_index.scad b/test/util/test_find_index.scad new file mode 100644 index 00000000..2a83d875 --- /dev/null +++ b/test/util/test_find_index.scad @@ -0,0 +1,10 @@ +use ; +use ; + +module test_find_index() { + echo("==== test_find_index ===="); + + assert(find_index([10, 20, 30, 40], function(e) e > 10) == 1); +} + +test_find_index(); \ No newline at end of file