local test = require('minunit').test local geom = require 'geometry' test( 'create point object', function() local pt = geom.point(1, 5.5) assert(pt.x == 1) assert(pt.y == 5.5) local mt = getmetatable(pt) assert(mt.__index == geom.point) end ) test( 'point distances', function() local a = geom.point(1, 3) local b = geom.point(4, 7) assert(a:distance_to(b) == 5) assert(a:distance_to(a) == 0) end )