[gjs] testJS1_8.js: Fix destructuring bind test
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs] testJS1_8.js: Fix destructuring bind test
- Date: Tue, 14 Jun 2011 18:49:13 +0000 (UTC)
commit 19dcf5d9b4f15070a1c8a2d3074fc0eb1be3c0d3
Author: Colin Walters <walters verbum org>
Date: Tue Jun 14 14:49:21 2011 -0400
testJS1_8.js: Fix destructuring bind test
test/js/testJS1_8.js | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/test/js/testJS1_8.js b/test/js/testJS1_8.js
index 29c83c7..5847665 100644
--- a/test/js/testJS1_8.js
+++ b/test/js/testJS1_8.js
@@ -4,7 +4,7 @@
// https://developer.mozilla.org/en/JavaScript/New_in_JavaScript/1.8
// "const"
-const GLib = imports.gi.GLib;
+const Everything = imports.gi.Regress;
function testLet() {
// "let"
@@ -15,11 +15,9 @@ function testLet() {
}
function testMultiReturn() {
- const GLib = imports.gi.GLib;
-
// "destructuring bind"
- let [success, content, len] = GLib.file_get_contents('/etc/passwd')
- assertEquals(success, true);
+ let [y, z, q] = Everything.test_torture_signature_0(42, 'foo', 7);
+ assertEquals(z, 84);
}
function testYield() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]