From f1eda43ac0c116122f873ffa60bd393f672cc4d5 Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Sat, 22 Jun 2019 13:48:47 +0800 Subject: [PATCH] add test case --- test/matrix/test_m_cumulate.scad | 19 +++++++++++++++++++ test/test_all.scad | 5 ++++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 test/matrix/test_m_cumulate.scad diff --git a/test/matrix/test_m_cumulate.scad b/test/matrix/test_m_cumulate.scad new file mode 100644 index 00000000..52ffbd3d --- /dev/null +++ b/test/matrix/test_m_cumulate.scad @@ -0,0 +1,19 @@ + +module test_m_cumulate() { + echo("==== test_m_cumulate ===="); + + include ; + include ; + include ; + include ; + include ; + + expected = [[1, -1.73205, 0, 10], [1.73205, 1, 0, 20], [0, 0, 2, 10], [0, 0, 0, 1]]; + actual = m_cumulate([ + m_translation([10, 20, 10]), m_scaling(2), m_rotation(60)] + ); + + assertEqualPoints(expected, actual); +} + +test_m_cumulate(); \ No newline at end of file diff --git a/test/test_all.scad b/test/test_all.scad index 9435c942..1d6c4103 100644 --- a/test/test_all.scad +++ b/test/test_all.scad @@ -71,4 +71,7 @@ include ; include ; include ; include ; -include ; \ No newline at end of file +include ; + +// Matrix +include ; \ No newline at end of file