[gjs/ewlsh/fix-fundamental-parameters: 2/2] Add regression test for fundamental parameters.
- From: Evan Welsh <ewlsh src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs/ewlsh/fix-fundamental-parameters: 2/2] Add regression test for fundamental parameters.
- Date: Wed, 7 Oct 2020 04:05:13 +0000 (UTC)
commit 3c8bd000fe75dbe9d6964830b65aed033294b579
Author: Evan Welsh <noreply evanwelsh com>
Date: Tue Oct 6 23:04:02 2020 -0500
Add regression test for fundamental parameters.
Depends on gobject-introspection!245
installed-tests/js/testFundamental.js | 7 +++++++
1 file changed, 7 insertions(+)
---
diff --git a/installed-tests/js/testFundamental.js b/installed-tests/js/testFundamental.js
index 17fb2d27..92e2c229 100644
--- a/installed-tests/js/testFundamental.js
+++ b/installed-tests/js/testFundamental.js
@@ -7,4 +7,11 @@ describe('Fundamental type support', function () {
const fund = new Regress.TestFundamentalSubObject('plop');
expect(() => GObject.strdup_value_contents(fund)).not.toThrow();
});
+
+ it('can pass a fundamental object as a function parameter', function () {
+ const fundamental_sub_object = new Regress.TestFundamentalSubObject('bee');
+
+ expect(() => Regress.test_get_fundamental_sub_object_data(fundamental_sub_object)).not.toThrow();
+ expect(Regress.test_get_fundamental_sub_object_data(fundamental_sub_object)).toEqual('bee');
+ });
});
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]