nashorn/test/script/basic/optimistic_check_type.js
changeset 24778 2ff5d7041566
parent 24750 01ea334ab39a
child 25828 077046a5d726
--- a/nashorn/test/script/basic/optimistic_check_type.js	Wed Jun 04 13:55:21 2014 +0530
+++ b/nashorn/test/script/basic/optimistic_check_type.js	Wed Jun 04 13:08:57 2014 +0200
@@ -1,21 +1,21 @@
 /*
  * Copyright (c) 2014, 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.
@@ -23,8 +23,8 @@
 
 /**
  * @test
- * @bug 8036987, 8037572 
- * @summary Implement tests that checks static types in the compiled code 
+ * @bug 8036987, 8037572
+ * @summary Implement tests that checks static types in the compiled code
  * @run
  */
 
@@ -33,24 +33,24 @@
 var x = { a: 2, b:0, c:undefined}
 var trees = new Array("redwood", "bay", "cedar", "oak");
 
-// Testing conditional operator         
+// Testing conditional operator
 print(inspect("" ? b : x.a, "ternary operator"))
 print(inspect(x.b ? b : x.a, "ternary operator"))
-print(inspect(c ? b : a, "ternary operator"))                      
+print(inspect(c ? b : a, "ternary operator"))
 print(inspect(!c ? b : a, "ternary operator"))
 print(inspect(d ? b : x.c, "ternary operator"))
 print(inspect(x.c ? a : c, "ternary operator"))
 print(inspect(c ? d : a, "ternary operator"))
-print(inspect(c ? +a : b, "ternary operator"))  
+print(inspect(c ? +a : b, "ternary operator"))
 
-// Testing format methods                    
+// Testing format methods
 print(inspect(b.toFixed(2), "global double toFixed()"))
 print(inspect(b.toPrecision(2)/1, "global double toPrecision() divided by 1"))
 print(inspect(b.toExponential(2), "global double toExponential()"))
 
 // Testing arrays
 print(inspect(trees[1], "member object"))
-trees[1] = undefined; 
+trees[1] = undefined;
 print(inspect(trees[1], "member undefined"))
 print(inspect(1 in trees ? b : a, "conditional on array member"))
 delete trees[2]
@@ -58,7 +58,7 @@
 print(inspect(3 in trees ? trees[2]="bay" : a, "conditional on array member"))
 print(inspect("oak" in trees ? b : a, "conditional on array member"))
 
-// Testing nested functions and return value 
+// Testing nested functions and return value
 function f1() {
     var x = 2, y = 1;
     function g() {
@@ -96,4 +96,4 @@
     }
     g()
 }
-f4()
\ No newline at end of file
+f4()