diff options
Diffstat (limited to 'toolkit/components/uniffi-fixtures/geometry/tests/bindings/test_geometry.kts')
-rw-r--r-- | toolkit/components/uniffi-fixtures/geometry/tests/bindings/test_geometry.kts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/toolkit/components/uniffi-fixtures/geometry/tests/bindings/test_geometry.kts b/toolkit/components/uniffi-fixtures/geometry/tests/bindings/test_geometry.kts new file mode 100644 index 0000000000..77bb9932ec --- /dev/null +++ b/toolkit/components/uniffi-fixtures/geometry/tests/bindings/test_geometry.kts @@ -0,0 +1,10 @@ +import uniffi.geometry.*; + +val ln1 = Line(Point(0.0,0.0), Point(1.0,2.0)) +val ln2 = Line(Point(1.0,1.0), Point(2.0,2.0)) + +assert( gradient(ln1) == 2.0 ) +assert( gradient(ln2) == 1.0 ) + +assert( intersection(ln1, ln2) == Point(0.0, 0.0) ) +assert( intersection(ln1, ln1) == null ) |