summaryrefslogtreecommitdiff
path: root/city/geometry-test.lua
diff options
context:
space:
mode:
Diffstat (limited to 'city/geometry-test.lua')
-rw-r--r--city/geometry-test.lua22
1 files changed, 22 insertions, 0 deletions
diff --git a/city/geometry-test.lua b/city/geometry-test.lua
index 74ddb3a..3227cd1 100644
--- a/city/geometry-test.lua
+++ b/city/geometry-test.lua
@@ -130,3 +130,25 @@ test(
assert(bb.span == 2)
end
)
+
+
+-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+--
+-- geom.qt_node
+--
+-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+test(
+ 'create qt_node',
+ function()
+ local center = geom.point(2, 2)
+ local node = geom.qt_node(center, 4)
+
+ assert(node.square.center.x == 2)
+ assert(node.square.center.y == 2)
+ assert(node.square.span == 4)
+
+ assert(not node:is_leaf())
+ assert(not node.point)
+ end
+)