diff options
Diffstat (limited to 'toolkit/components/uniffi-bindgen-gecko-js/fixtures/tests/xpcshell/test_geometry.js')
-rw-r--r-- | toolkit/components/uniffi-bindgen-gecko-js/fixtures/tests/xpcshell/test_geometry.js | 32 |
1 files changed, 12 insertions, 20 deletions
diff --git a/toolkit/components/uniffi-bindgen-gecko-js/fixtures/tests/xpcshell/test_geometry.js b/toolkit/components/uniffi-bindgen-gecko-js/fixtures/tests/xpcshell/test_geometry.js index cdb552e4ef..1028cd37c2 100644 --- a/toolkit/components/uniffi-bindgen-gecko-js/fixtures/tests/xpcshell/test_geometry.js +++ b/toolkit/components/uniffi-bindgen-gecko-js/fixtures/tests/xpcshell/test_geometry.js @@ -6,24 +6,16 @@ const Geometry = ChromeUtils.importESModule( ); add_task(async function () { - const ln1 = new Geometry.Line( - new Geometry.Point({ coord_x: 0, coord_y: 0 }), - new Geometry.Point({ coord_x: 1, coord_y: 2 }) - ); - const ln2 = new Geometry.Line( - new Geometry.Point({ coord_x: 1, coord_y: 1 }), - new Geometry.Point({ coord_x: 2, coord_y: 2 }) - ); - const origin = new Geometry.Point({ coord_x: 0, coord_y: 0 }); - Assert.ok( - (await Geometry.intersection({ start: ln1, end: ln2 })).equals(origin) - ); - Assert.deepEqual( - await Geometry.intersection({ start: ln1, end: ln2 }), - origin - ); - Assert.strictEqual( - await Geometry.intersection({ start: ln1, end: ln1 }), - null - ); + const ln1 = new Geometry.Line({ + start: new Geometry.Point({ coordX: 0, coordY: 0 }), + end: new Geometry.Point({ coordX: 1, coordY: 2 }), + }); + const ln2 = new Geometry.Line({ + start: new Geometry.Point({ coordX: 1, coordY: 1 }), + end: new Geometry.Point({ coordX: 2, coordY: 2 }), + }); + const origin = new Geometry.Point({ coordX: 0, coordY: 0 }); + Assert.ok((await Geometry.intersection(ln1, ln2)).equals(origin)); + Assert.deepEqual(await Geometry.intersection(ln1, ln2), origin); + Assert.strictEqual(await Geometry.intersection(ln1, ln1), null); }); |