aboutsummaryrefslogtreecommitdiff
path: root/test/script/currently-failing/clone_ir.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/script/currently-failing/clone_ir.js')
-rw-r--r--test/script/currently-failing/clone_ir.js38
1 files changed, 19 insertions, 19 deletions
diff --git a/test/script/currently-failing/clone_ir.js b/test/script/currently-failing/clone_ir.js
index 3c1eccf2..14009506 100644
--- a/test/script/currently-failing/clone_ir.js
+++ b/test/script/currently-failing/clone_ir.js
@@ -1,21 +1,21 @@
/*
* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
- *
+ *
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
- *
+ *
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
+ *
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
@@ -41,12 +41,12 @@ var ThrowErrorManager = Java.type("jdk.nashorn.internal.runtime.Context$ThrowErr
var System = Java.type("java.lang.System");
var toArrayMethod = ASTWriter.class.getMethod("toArray");
-var parseMethod = Parser.class.getMethod("parse");
+var parseMethod = Parser.class.getMethod("parse");
function toString(obj) {
var output = "{ ";
for (property in obj) {
- output += property + ': ' + obj[property]+'; ';
+ output += property + ': ' + obj[property]+'; ';
}
return output + '}'
}
@@ -54,11 +54,11 @@ function toString(obj) {
function flatten(func) {
var writer = new ASTWriter(func);
var funcList = toArrayMethod.invoke(writer);
-
+
var res = [];
for each (x in funcList) {
- res.push({ name: x.getClass().getName(), id: System.identityHashCode(x) });
- }
+ res.push({ name: x.getClass().getName(), id: System.identityHashCode(x) });
+ }
return res;
}
@@ -80,20 +80,20 @@ function check_src(src) {
print(f2.map(toString));
if (f1.length != f2.length) {
- print("length difference between original and clone " + f1.length + " != " + f2.length);
- return false;
+ print("length difference between original and clone " + f1.length + " != " + f2.length);
+ return false;
}
for (var i = 0; i < f1.length; i++) {
- if (f1[i].name !== f2[i].name) {
- print("name conflict at " + i + " " + f1[i].name + " != " + f2[i].name);
- return false;
- } else if (f1[i].id === f2[i].id) {
- print("id problem at " + i + " " + toString(f1[i]) + " was not deep copied to " + toString(f2[i]) + " became " + f1[i].id + " != " + f2[i].id);
- return false;
- }
+ if (f1[i].name !== f2[i].name) {
+ print("name conflict at " + i + " " + f1[i].name + " != " + f2[i].name);
+ return false;
+ } else if (f1[i].id === f2[i].id) {
+ print("id problem at " + i + " " + toString(f1[i]) + " was not deep copied to " + toString(f2[i]) + " became " + f1[i].id + " != " + f2[i].id);
+ return false;
}
-
+ }
+
return true;
}