Rolling back accidental trunk mods committed in r284.
git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@285 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/user/super/com/google/gwt/emul/java/util/Arrays.java b/user/super/com/google/gwt/emul/java/util/Arrays.java
index e3532ff..9e7511a 100644
--- a/user/super/com/google/gwt/emul/java/util/Arrays.java
+++ b/user/super/com/google/gwt/emul/java/util/Arrays.java
@@ -70,12 +70,12 @@
}
var v = new Array();
- for (var i = 0; i < size; ++i) {
+ for(var i = 0; i < size; ++i){
v[i] = array[i];
}
- if (compare != null) {
- var f = function (a,b) {
+ if(compare != null) {
+ var f = function(a,b) {
var c = compare.@java.util.Comparator::compare(Ljava/lang/Object;Ljava/lang/Object;)(a,b);
return c;
}
@@ -84,7 +84,7 @@
v.sort();
}
- for (i = 0; i < size; ++i) {
+ for(i = 0; i < size; ++i){
array[i] = v[i];
}
diff --git a/user/test/com/google/gwt/emultest/java/util/StackTest.java b/user/test/com/google/gwt/emultest/java/util/StackTest.java
index 1466630..824d081 100644
--- a/user/test/com/google/gwt/emultest/java/util/StackTest.java
+++ b/user/test/com/google/gwt/emultest/java/util/StackTest.java
@@ -1,19 +1,4 @@
-/*
- * Copyright 2006 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-
+// Copyright 2006 Google Inc. All Rights Reserved.
package com.google.gwt.emultest.java.util;
import com.google.gwt.junit.client.GWTTestCase;
@@ -21,24 +6,13 @@
import java.util.EmptyStackException;
import java.util.Stack;
-/**
- * Unit tests for java.util.Stack.
- */
public class StackTest extends GWTTestCase {
public static final int TEST_SEARCH_SIZE = 10;
public static final int TEST_SIZE = 10;
public static Stack testStack = new Stack();
- static {
- testStack.push("1");
- testStack.push("2");
- testStack.push("3");
- }
-
- /**
- * Checks for emptiness of stack by peeking and popping.
- */
+ /** Checks for emptiness of stack by peeking and popping */
public void checkEmptiness(Stack s) {
assertTrue(s.empty());
try {
@@ -54,16 +28,12 @@
}
}
- /**
- * Sets module name so that javascript compiler can operate.
- */
+ /** Sets module name so that javascript compiler can operate */
public String getModuleName() {
return "com.google.gwt.emultest.EmulSuite";
}
- /**
- * Tests clone on Stacks.
- */
+ /** Tests clone on Stacks */
public void testClone() {
Stack large = createLargeStack();
Stack cloned = (Stack) large.clone();
@@ -90,9 +60,7 @@
checkLargeStack(large, TEST_SIZE);
}
- /**
- * tests empty and tries to get emptyStackException as desired.
- */
+ /** tests empty and tries to get emptyStackException as desired */
public void testEmptyAndEmptyStackException() {
Stack s = new Stack();
String item = "empty1";
@@ -103,9 +71,7 @@
checkEmptiness(s);
}
- /**
- * Tests pop and peek.
- */
+ /** Tests pop and peek */
public void testPopAndPeek() {
int x = testStack.size();
Object item = testStack.peek();
@@ -113,9 +79,7 @@
assertEquals(x - 1, testStack.size());
}
- /**
- * Tests push and peek.
- */
+ /** Tests push and peek */
public void testPushAndPeek() {
int x = testStack.size();
Object item = "4";
@@ -173,4 +137,10 @@
return large;
}
+ static {
+ testStack.push("1");
+ testStack.push("2");
+ testStack.push("3");
+ }
+
}