summaryrefslogtreecommitdiffstats
path: root/toolkit/components/uniffi-bindgen-gecko-js/fixtures/tests/xpcshell/test_type_checking.js
diff options
context:
space:
mode:
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.js18
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() {