[gjs: 2/3] Add regression test for STRV conversion.
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs: 2/3] Add regression test for STRV conversion.
- Date: Mon, 20 Apr 2020 21:47:30 +0000 (UTC)
commit c4dc6c3ded04a11ca2cc017100875d03496f5ec9
Author: Evan Welsh <noreply evanwelsh com>
Date: Mon Apr 20 16:16:28 2020 -0500
Add regression test for STRV conversion.
installed-tests/js/testRegress.js | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/installed-tests/js/testRegress.js b/installed-tests/js/testRegress.js
index 654a419b..32ca5bba 100644
--- a/installed-tests/js/testRegress.js
+++ b/installed-tests/js/testRegress.js
@@ -226,6 +226,10 @@ describe('Life, the Universe and Everything', function () {
it('marshalling in', function () {
expect(Regress.test_strv_in(['1', '2', '3'])).toBeTruthy();
expect(Regress.test_strv_in(['4', '5', '6'])).toBeFalsy();
+ // Ensure that primitives throw without SEGFAULT
+ expect(() => Regress.test_strv_in(1)).toThrow();
+ expect(() => Regress.test_strv_in('')).toThrow();
+ expect(() => Regress.test_strv_in(false)).toThrow();
// Second two are deliberately not strings
expect(() => Regress.test_strv_in(['1', 2, 3])).toThrow();
});
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]