diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:42 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:42 +0000 |
commit | da4c7e7ed675c3bf405668739c3012d140856109 (patch) | |
tree | cdd868dba063fecba609a1d819de271f0d51b23e /toolkit/components/uniffi-bindgen-gecko-js/fixtures/tests/xpcshell/test_type_checking.js | |
parent | Adding upstream version 125.0.3. (diff) | |
download | firefox-da4c7e7ed675c3bf405668739c3012d140856109.tar.xz firefox-da4c7e7ed675c3bf405668739c3012d140856109.zip |
Adding upstream version 126.0.upstream/126.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'toolkit/components/uniffi-bindgen-gecko-js/fixtures/tests/xpcshell/test_type_checking.js')
-rw-r--r-- | toolkit/components/uniffi-bindgen-gecko-js/fixtures/tests/xpcshell/test_type_checking.js | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/toolkit/components/uniffi-bindgen-gecko-js/fixtures/tests/xpcshell/test_type_checking.js b/toolkit/components/uniffi-bindgen-gecko-js/fixtures/tests/xpcshell/test_type_checking.js index bfeb07c82b..7a5e04cea1 100644 --- a/toolkit/components/uniffi-bindgen-gecko-js/fixtures/tests/xpcshell/test_type_checking.js +++ b/toolkit/components/uniffi-bindgen-gecko-js/fixtures/tests/xpcshell/test_type_checking.js @@ -42,6 +42,12 @@ add_task(async function testObjectPointers() { /Bad pointer type/, "getEntries() with wrong pointer type" ); + + await Assert.rejects( + TodoList.setDefaultList(1), // expecting an object + /Object is not a 'TodoList' instance/, + "attempting to lift the wrong object type" + ); }); add_task(async function testEnumTypeCheck() { @@ -68,18 +74,6 @@ add_task(async function testRecordTypeCheck() { UniFFITypeError, "gradient with non-Line object should throw" ); - - await Assert.rejects( - Geometry.gradient({ - start: { - coordX: 0.0, - coordY: 0.0, - }, - // missing the end field - }), - /ln.end/, // Ensure exception message includes the argument name - "gradient with Line object with missing end field should throw" - ); }); add_task(async function testOptionTypeCheck() { |