summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--installed-tests/js/testGLib.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/installed-tests/js/testGLib.js b/installed-tests/js/testGLib.js
index d25e3785..4e5d23c8 100644
--- a/installed-tests/js/testGLib.js
+++ b/installed-tests/js/testGLib.js
@@ -133,6 +133,14 @@ describe('GLib string function overrides', function () {
numExpectedWarnings = 0;
});
+ // TODO: Add Regress.func_not_nullable_untyped_gpointer_in and move to testRegress.js
+ it('GLib.str_hash errors when marshalling null to a not-nullable parameter', function () {
+ // This tests that we don't marshal null to a not-nullable untyped gpointer.
+ expect(() => GLib.str_hash(null)).toThrowError(
+ /Argument [a-z]+ may not be null/
+ );
+ });
+
it('GLib.stpcpy', function () {
expect(() => GLib.stpcpy('dest', 'src')).toThrowError(/not introspectable/);
});