fune/third_party/rust/uniffi-example-geometry/tests/bindings/test_geometry.py
Ben Dean-Kawamura 760c603bcb Bug 1766045 - Vendoring in Rust code for uniffi-bindgen-gecko-js r=glandium,supply-chain-reviewers
- Added `--enable-uniffi-fixtures` flag.  When set, we will compile in
  the UniFFI test fixtures into our shared Rust crate and eventually
  into `libxul`.
- Vendoring in the Rust crates needed for `uniffi-bindgen-gecko-js`

Differential Revision: https://phabricator.services.mozilla.com/D144467
2022-08-03 13:48:27 +00:00

10 lines
231 B
Python

from geometry import *
ln1 = Line(Point(0,0), Point(1,2))
ln2 = Line(Point(1,1), Point(2,2))
assert gradient(ln1) == 2
assert gradient(ln2) == 1
assert intersection(ln1, ln2) == Point(0, 0)
assert intersection(ln1, ln1) is None