1) Adds a new checkstyle config intended to be used with unit tests. 2) Updates the checkstyle settings for gwt-user to use two sets of rules: one for production gwt-user code and another for unit tests. 3) Updates everything under /user to pass the new checkstyle rules; note that there's a whole lot of "TODO: document me" comments that the test owners need to eventually fill in with meaningful comments. 4) In some cases, I had to turn off checkstyle completely for that compilation unit, particularly for the compiler stuff, which is actually trying to test weird code. Review by: ecc git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@586 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/eclipse/settings/code-style/gwt-checkstyle-tests.xml b/eclipse/settings/code-style/gwt-checkstyle-tests.xml new file mode 100644 index 0000000..e7c9376 --- /dev/null +++ b/eclipse/settings/code-style/gwt-checkstyle-tests.xml
@@ -0,0 +1,219 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + This configuration file was written by the eclipse-cs plugin configuration editor +--> +<!-- +Checkstyle-Configuration: GWT Checks for Tests +Description: +A more lenient set of style checks for test cases, needed because test often need to do funkier stuff. +--> +<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN" "http://www.puppycrawl.com/dtds/configuration_1_2.dtd"> +<module name="Checker"> + <property name="severity" value="warning"/> + <module name="TreeWalker"> + <module name="FileContentsHolder"/> + <module name="InterfaceIsType"> + <metadata name="com.atlassw.tools.eclipse.checkstyle.lastEnabledSeverity" value="error"/> + <property name="severity" value="ignore"/> + </module> + <module name="RedundantImport"> + <property name="severity" value="error"/> + </module> + <module name="UnusedImports"> + <property name="severity" value="error"/> + </module> + <module name="JavadocType"> + <property name="severity" value="error"/> + <property name="scope" value="protected"/> + </module> + <module name="PackageName"> + <property name="severity" value="error"/> + <property name="format" value="^[a-z]+(\.[a-z][a-z0-9]{1,})*$"/> + </module> + <module name="ParameterName"> + <metadata name="com.atlassw.tools.eclipse.checkstyle.lastEnabledSeverity" value="error"/> + <property name="severity" value="ignore"/> + </module> + <module name="LocalFinalVariableName"> + <metadata name="com.atlassw.tools.eclipse.checkstyle.lastEnabledSeverity" value="error"/> + <property name="severity" value="ignore"/> + </module> + <module name="LocalVariableName"> + <metadata name="com.atlassw.tools.eclipse.checkstyle.lastEnabledSeverity" value="error"/> + <property name="severity" value="ignore"/> + <property name="tokens" value="PARAMETER_DEF,VARIABLE_DEF"/> + </module> + <module name="LeftCurly"/> + <module name="RightCurly"/> + <module name="CovariantEquals"> + <metadata name="com.atlassw.tools.eclipse.checkstyle.lastEnabledSeverity" value="error"/> + <property name="severity" value="ignore"/> + </module> + <module name="HiddenField"> + <metadata name="com.atlassw.tools.eclipse.checkstyle.lastEnabledSeverity" value="error"/> + <property name="severity" value="ignore"/> + <property name="tokens" value="VARIABLE_DEF"/> + <property name="ignoreConstructorParameter" value="true"/> + <property name="ignoreSetter" value="true"/> + </module> + <module name="IllegalInstantiation"> + <metadata name="com.atlassw.tools.eclipse.checkstyle.lastEnabledSeverity" value="error"/> + <property name="severity" value="ignore"/> + <property name="classes" value="java.lang.Boolean"/> + </module> + <module name="UpperEll"> + <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="checking for 4l rather than 4L"/> + <property name="severity" value="error"/> + </module> + <module name="JavadocStyle"> + <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Well formed java docs"/> + <property name="severity" value="info"/> + <property name="checkHtml" value="false"/> + <property name="tokens" value="CLASS_DEF,CTOR_DEF,INTERFACE_DEF,METHOD_DEF,VARIABLE_DEF"/> + </module> + <module name="NeedBraces"> + <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="make sure if has braces"/> + </module> + <module name="JavadocMethod"> + <metadata name="com.atlassw.tools.eclipse.checkstyle.lastEnabledSeverity" value="info"/> + <property name="severity" value="info"/> + <property name="scope" value="protected"/> + <property name="allowUndeclaredRTE" value="true"/> + <property name="allowMissingParamTags" value="true"/> + <property name="allowMissingThrowsTags" value="true"/> + <property name="allowMissingReturnTag" value="true"/> + <property name="allowMissingJavadoc" value="true"/> + <property name="allowMissingPropertyJavadoc" value="true"/> + <property name="logLoadErrors" value="true"/> + <property name="tokens" value="METHOD_DEF"/> + </module> + <module name="RegexpHeader"> + <property name="severity" value="error"/> + <property name="header" value="/\*\n \* Copyright 200[67] .+\n \*[ ]*\n \* Licensed under the Apache License, Version 2\.0 \(the "License"\); you may not\n \* use this file except in compliance with the License\. You may obtain a copy of\n \* the License at\n \*[ ]*\n \* http://www\.apache\.org/licenses/LICENSE-2\.0\n \*[ ]*\n \* Unless required by applicable law or agreed to in writing, software\n \* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT\n \* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\. See the\n \* License for the specific language governing permissions and limitations under\n \* the License\.\n \*/"/> + </module> + <module name="ImportOrder"> + <property name="severity" value="error"/> + <property name="groups" value="com.google, com, junit, net,org, java,javax"/> + <property name="ordered" value="false"/> + <property name="separated" value="true"/> + </module> + <module name="TabCharacter"> + <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="no tabs"/> + <property name="severity" value="error"/> + </module> + <module name="DefaultComesLast"> + <metadata name="com.atlassw.tools.eclipse.checkstyle.lastEnabledSeverity" value="error"/> + <property name="severity" value="ignore"/> + </module> + <module name="MultipleStringLiterals"> + <metadata name="com.atlassw.tools.eclipse.checkstyle.lastEnabledSeverity" value="info"/> + <property name="severity" value="ignore"/> + <property name="ignoreStringsRegexp" value=".{0,3}"/> + </module> + <module name="FallThrough"> + <metadata name="com.atlassw.tools.eclipse.checkstyle.lastEnabledSeverity" value="error"/> + <property name="severity" value="ignore"/> + </module> + <module name="IllegalInstantiation"> + <metadata name="com.atlassw.tools.eclipse.checkstyle.lastEnabledSeverity" value="error"/> + <property name="severity" value="ignore"/> + <property name="classes" value="Boolean"/> + </module> + <module name="Regexp"> + <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="check that a space is left after a colon with an assembled error message"/> + <property name="severity" value="info"/> + <property name="format" value="[^:^"]:" .*+"/> + <property name="message" value="check that a space is left after a colon on an assembled error message"/> + <property name="illegalPattern" value="true"/> + </module> + <module name="Regexp"> + <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="more than one blank line"/> + <property name="severity" value="info"/> + <property name="format" value="[\r]?[\n][ \t]*[\r]?[\n][ \t]*[\r]?[\n][ \t]*"/> + <property name="message" value="more than one blank line"/> + <property name="illegalPattern" value="true"/> + </module> + <module name="WhitespaceAround"> + <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Must have spaces"/> + <property name="severity" value="error"/> + <property name="tokens" value="COLON,NOT_EQUAL,QUESTION,DIV,DIV_ASSIGN,BXOR,BXOR_ASSIGN,MINUS,LCURLY,STAR,STAR_ASSIGN,TYPE_EXTENSION_AND,BAND,LAND,BAND_ASSIGN,MOD,MOD_ASSIGN,PLUS,PLUS_ASSIGN,LT,SL,SL_ASSIGN,LE,ASSIGN,MINUS_ASSIGN,EQUAL,GT,GE,SR,SR_ASSIGN,BSR,BSR_ASSIGN,BOR,BOR_ASSIGN,LOR,LITERAL_ASSERT,LITERAL_ASSERT,LITERAL_CATCH,LITERAL_DO,LITERAL_ELSE,LITERAL_FINALLY,LITERAL_FOR,LITERAL_IF,LITERAL_RETURN,SLIST,LITERAL_SYNCHRONIZED,LITERAL_TRY,WILDCARD_TYPE,LITERAL_WHILE"/> + </module> + <module name="Regexp"> + <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="newline before }"/> + <property name="severity" value="error"/> + <property name="format" value="[\r]?[\n][ \t]*[\r]?[\n][ \t]+[}][ ]*[\n]"/> + <property name="message" value="newline before }"/> + <property name="illegalPattern" value="true"/> + </module> + <module name="ModifierOrder"> + <metadata name="com.atlassw.tools.eclipse.checkstyle.lastEnabledSeverity" value="error"/> + <property name="severity" value="ignore"/> + </module> + <module name="AvoidStarImport"> + <property name="severity" value="error"/> + </module> + <module name="com.google.gwt.checkstyle.OrderCheck"> + <metadata name="com.atlassw.tools.eclipse.checkstyle.lastEnabledSeverity" value="error"/> + <property name="severity" value="ignore"/> + </module> + <module name="com.google.gwt.checkstyle.FieldCheck"> + <metadata name="com.atlassw.tools.eclipse.checkstyle.lastEnabledSeverity" value="error"/> + <property name="severity" value="ignore"/> + </module> + <module name="GenericIllegalRegexp"> + <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="bad // comment"/> + <property name="severity" value="error"/> + <property name="format" value=" [/][/][A-z]"/> + <property name="message" value="// comments must be followed by a space and be on their own line"/> + </module> + <module name="DoubleCheckedLocking"> + <metadata name="com.atlassw.tools.eclipse.checkstyle.lastEnabledSeverity" value="error"/> + <property name="severity" value="ignore"/> + </module> + <module name="EmptyStatement"> + <metadata name="com.atlassw.tools.eclipse.checkstyle.lastEnabledSeverity" value="error"/> + <property name="severity" value="ignore"/> + </module> + <module name="MethodName"> + <metadata name="com.atlassw.tools.eclipse.checkstyle.lastEnabledSeverity" value="error"/> + <property name="severity" value="ignore"/> + <property name="format" value="^[a-z_][a-zA-Z0-9_]*$"/> + </module> + <module name="MemberName"> + <metadata name="com.atlassw.tools.eclipse.checkstyle.lastEnabledSeverity" value="error"/> + <property name="severity" value="ignore"/> + <property name="format" value="[a-z]|[a-z][a-z_0-9][A-Za-z0-9_]*|[a-z](?<!f)[A-Z0-9]*"/> + </module> + <module name="TodoComment"> + <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Author tags"/> + <property name="severity" value="error"/> + <property name="format" value="@author"/> + </module> + <module name="Regexp"> + <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="No one line javadoc comments"/> + <metadata name="com.atlassw.tools.eclipse.checkstyle.lastEnabledSeverity" value="error"/> + <property name="severity" value="ignore"/> + <property name="format" value="[/][*][*][^\n]*[*][/]"/> + <property name="message" value="No one line javadoc comments"/> + <property name="illegalPattern" value="true"/> + </module> + <module name="MemberName"> + <property name="severity" value="ignore"/> + <property name="format" value="^[a-z_][a-zA-Z0-9_]*$"/> + </module> + </module> + <module name="PackageHtml"> + <property name="severity" value="ignore"/> + </module> + <module name="SuppressionCommentFilter"> + <property name="offCommentFormat" value="CHECKSTYLE_OFF"/> + <property name="onCommentFormat" value="CHECKSTYLE_ON"/> + </module> + <module name="SuppressionCommentFilter"> + <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Avoid name checking"/> + <property name="offCommentFormat" value="CHECKSTYLE_NAMING_OFF"/> + <property name="onCommentFormat" value="CHECKSTYLE_NAMING_ON"/> + <property name="checkFormat" value=".*Name.*"/> + <property name="messageFormat" value=".*name.*"/> + </module> +</module>
diff --git a/eclipse/user/.checkstyle b/eclipse/user/.checkstyle index 348c47f..b705c56 100644 --- a/eclipse/user/.checkstyle +++ b/eclipse/user/.checkstyle
@@ -1,7 +1,11 @@ <?xml version="1.0" encoding="UTF-8"?> <fileset-config file-format-version="1.2.0" simple-config="false"> - <fileset name="all" enabled="true" check-config-name="GWT Checks" local="false"> - <file-match-pattern match-pattern=".*src.*java" include-pattern="true"/> + <fileset name="Java source for production code" enabled="true" check-config-name="GWT Checks" local="false"> + <file-match-pattern match-pattern=".*src.*\.java" include-pattern="true"/> + </fileset> + <fileset name="Java source for test cases" enabled="true" check-config-name="GWT Checks for Tests" local="false"> + <file-match-pattern match-pattern=".*test.*com[/\\]google[/\\].*\.java$" include-pattern="true"/> + <file-match-pattern match-pattern=".*test.*test[/\\].*\.java$" include-pattern="true"/> </fileset> <filter name="NonSrcDirs" enabled="true"/> </fileset-config>
diff --git a/user/test/com/google/gwt/dev/cfg/PublicTagTest.java b/user/test/com/google/gwt/dev/cfg/PublicTagTest.java index 1b67988..471525d 100644 --- a/user/test/com/google/gwt/dev/cfg/PublicTagTest.java +++ b/user/test/com/google/gwt/dev/cfg/PublicTagTest.java
@@ -1,4 +1,18 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.dev.cfg; import com.google.gwt.dev.GWTCompiler;
diff --git a/user/test/com/google/gwt/dev/cfg/client/Dummy.java b/user/test/com/google/gwt/dev/cfg/client/Dummy.java index 729d544..9ca37de 100644 --- a/user/test/com/google/gwt/dev/cfg/client/Dummy.java +++ b/user/test/com/google/gwt/dev/cfg/client/Dummy.java
@@ -1,4 +1,18 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.dev.cfg.client; /**
diff --git a/user/test/com/google/gwt/dev/jjs/CompilerSuite.java b/user/test/com/google/gwt/dev/jjs/CompilerSuite.java index b893286..486faf6 100644 --- a/user/test/com/google/gwt/dev/jjs/CompilerSuite.java +++ b/user/test/com/google/gwt/dev/jjs/CompilerSuite.java
@@ -1,4 +1,18 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.dev.jjs; import com.google.gwt.dev.jjs.test.ClassCastTestCase; @@ -17,6 +31,9 @@ import junit.framework.Test; import junit.framework.TestSuite; +/** + * The complete compiler suite. + */ public class CompilerSuite { public static Test suite() {
diff --git a/user/test/com/google/gwt/dev/jjs/test/ClassCastTestCase.java b/user/test/com/google/gwt/dev/jjs/test/ClassCastTestCase.java index 9438b8c..528f1b6 100644 --- a/user/test/com/google/gwt/dev/jjs/test/ClassCastTestCase.java +++ b/user/test/com/google/gwt/dev/jjs/test/ClassCastTestCase.java
@@ -17,6 +17,9 @@ import com.google.gwt.junit.client.GWTTestCase; +/** + * TODO: document me. + */ public class ClassCastTestCase extends GWTTestCase { static class Apple extends Food implements CanEatRaw {
diff --git a/user/test/com/google/gwt/dev/jjs/test/CompilerTest.java b/user/test/com/google/gwt/dev/jjs/test/CompilerTest.java index 479a315..7b00117 100644 --- a/user/test/com/google/gwt/dev/jjs/test/CompilerTest.java +++ b/user/test/com/google/gwt/dev/jjs/test/CompilerTest.java
@@ -1,4 +1,18 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.dev.jjs.test; import com.google.gwt.core.client.GWT; @@ -7,9 +21,14 @@ import junit.framework.Assert; +//CHECKSTYLE_OFF + +/** + * TODO: doc me + */ public class CompilerTest extends GWTTestCase { - private static abstract class Apple implements Fruit { + private abstract static class Apple implements Fruit { } private static interface Fruit { @@ -213,7 +232,6 @@ if (b) { } else { } - } public native void testEmptyBlockStatementsNative() /*-{
diff --git a/user/test/com/google/gwt/dev/jjs/test/Coverage.java b/user/test/com/google/gwt/dev/jjs/test/Coverage.java index 21dc286..a39d75b 100644 --- a/user/test/com/google/gwt/dev/jjs/test/Coverage.java +++ b/user/test/com/google/gwt/dev/jjs/test/Coverage.java
@@ -1,4 +1,18 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.dev.jjs.test; import com.google.gwt.junit.client.GWTTestCase; @@ -10,6 +24,9 @@ */ public class Coverage extends CoverageSuper { + /** + * TODO: document me. + */ public class Inner extends Super { public int x = 3; @@ -448,7 +465,6 @@ super.sfoo(); Inner.super.sfoo(); Coverage.super.sfoo(); - } private Inner testReferences() { @@ -523,7 +539,6 @@ i = 7; } assertEquals(7, i); - } private void testUnaryExpression() { @@ -545,9 +560,11 @@ fail(); } } - } + /** + * TODO: document me. + */ public static class Super { public static int i = 2; public static final int j = 2; @@ -591,7 +608,6 @@ public String toString() { return String.valueOf(x); } - } private static class InnerSub extends Inner {
diff --git a/user/test/com/google/gwt/dev/jjs/test/HostedTest.java b/user/test/com/google/gwt/dev/jjs/test/HostedTest.java index a13c636..5a74bc6 100644 --- a/user/test/com/google/gwt/dev/jjs/test/HostedTest.java +++ b/user/test/com/google/gwt/dev/jjs/test/HostedTest.java
@@ -24,6 +24,11 @@ import com.google.gwt.core.client.GWT; import com.google.gwt.junit.client.GWTTestCase; +//CHECKSTYLE_NAMING_OFF + +/** + * TODO: document me. + */ public class HostedTest extends GWTTestCase { static String sFoo(String s) { @@ -224,6 +229,10 @@ * binary name. */ protected static class A { + + /** + * TODO: document me. + */ public static class B { int b = 1; public native int getUsingSourceRef() /*-{ @@ -258,7 +267,7 @@ // should have thrown an exception in hosted mode, // so fail unless we are in web mode assertTrue(GWT.isScript()); - } catch(IllegalArgumentException e) { + } catch (IllegalArgumentException e) { // expected exception } } @@ -379,8 +388,8 @@ jsniK() /*-{ }-*/; - + /*-{ try to mess with compiler }-*/ - private native void jsniL()/*-{}-*/; + private native void jsniL()/*-{}-*/ ; }
diff --git a/user/test/com/google/gwt/dev/jjs/test/InnerClassTest.java b/user/test/com/google/gwt/dev/jjs/test/InnerClassTest.java index f95cf7f..753c6f2 100644 --- a/user/test/com/google/gwt/dev/jjs/test/InnerClassTest.java +++ b/user/test/com/google/gwt/dev/jjs/test/InnerClassTest.java
@@ -1,4 +1,18 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.dev.jjs.test; import com.google.gwt.junit.client.GWTTestCase; @@ -7,8 +21,14 @@ import java.util.Iterator; import java.util.List; +/** + * TODO: document me. + */ public class InnerClassTest extends GWTTestCase { + /** + * TODO: document me. + */ public class InnerClass { void callInner() { testAppend.append("a");
diff --git a/user/test/com/google/gwt/dev/jjs/test/InnerOuterSuperTest.java b/user/test/com/google/gwt/dev/jjs/test/InnerOuterSuperTest.java index 95734c3..906471a 100644 --- a/user/test/com/google/gwt/dev/jjs/test/InnerOuterSuperTest.java +++ b/user/test/com/google/gwt/dev/jjs/test/InnerOuterSuperTest.java
@@ -1,20 +1,45 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.dev.jjs.test; import com.google.gwt.junit.client.GWTTestCase; +/** + * TODO: document me. + */ public class InnerOuterSuperTest extends GWTTestCase { + /** + * TODO: document me. + */ public static class Outer { + /** + * TODO: document me. + */ public class OuterIsNotSuper { public int getValue() { return value; } - } + /** + * TODO: document me. + */ public class OuterIsSuper extends Outer { public OuterIsSuper(int i) { @@ -24,15 +49,20 @@ public OuterIsNotSuper unqualifiedAlloc() { return new OuterIsNotSuper(); } - } + /** + * TODO: document me. + */ public static class TestQualifiedSuperCall extends OuterIsNotSuper { public TestQualifiedSuperCall() { new Outer(1).new OuterIsSuper(2).super(); } } + /** + * TODO: document me. + */ public class TestUnqualifiedSuperCall extends OuterIsNotSuper { public TestUnqualifiedSuperCall() { super();
diff --git a/user/test/com/google/gwt/dev/jjs/test/MemberShadowingTest.java b/user/test/com/google/gwt/dev/jjs/test/MemberShadowingTest.java index 914e58f..60adcde 100644 --- a/user/test/com/google/gwt/dev/jjs/test/MemberShadowingTest.java +++ b/user/test/com/google/gwt/dev/jjs/test/MemberShadowingTest.java
@@ -1,3 +1,18 @@ +/* + * Copyright 2007 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. + */ package com.google.gwt.dev.jjs.test; import com.google.gwt.junit.client.GWTTestCase; @@ -7,10 +22,13 @@ * modes. * * NOTE: Also tests that the {@link CompilingClassLoader} can resolve binary and - * source level class names inside of JSNI Java member references. Where - * should this really go? + * source level class names inside of JSNI Java member references. Where should + * this really go? */ public class MemberShadowingTest extends GWTTestCase { + /** + * TODO: document me. + */ public class Subclass extends Superclass { public int getSubclassA() { return a; @@ -31,6 +49,9 @@ public int a; } + /** + * TODO: document me. + */ public class Superclass { public native int getSuperclassA() /*-{ return this.@com.google.gwt.dev.jjs.test.MemberShadowingTest.Superclass::a; @@ -42,7 +63,7 @@ private void foo() { /* - * if the method that this one shadows is called the test will fail + * if the method that this one shadows is called the test will fail * otherwise if we get here we are good */ } @@ -50,6 +71,10 @@ public int a; } + + /** + * TODO: document me. + */ public static interface Foo { void f(); }
diff --git a/user/test/com/google/gwt/dev/jjs/test/MethodBindTest.java b/user/test/com/google/gwt/dev/jjs/test/MethodBindTest.java index baf9f4e..45f2e83 100644 --- a/user/test/com/google/gwt/dev/jjs/test/MethodBindTest.java +++ b/user/test/com/google/gwt/dev/jjs/test/MethodBindTest.java
@@ -1,10 +1,30 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.dev.jjs.test; import com.google.gwt.junit.client.GWTTestCase; +/** + * TODO: document me. + */ public class MethodBindTest extends GWTTestCase { + /** + * TODO: document me. + */ private static abstract class Abstract implements Go { private final class Nested implements Go { public void go() {
diff --git a/user/test/com/google/gwt/dev/jjs/test/MethodCallTest.java b/user/test/com/google/gwt/dev/jjs/test/MethodCallTest.java index 0a0685e..f4529f5 100644 --- a/user/test/com/google/gwt/dev/jjs/test/MethodCallTest.java +++ b/user/test/com/google/gwt/dev/jjs/test/MethodCallTest.java
@@ -1,8 +1,25 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.dev.jjs.test; import com.google.gwt.junit.client.GWTTestCase; +/** + * TODO: document me. + */ public class MethodCallTest extends GWTTestCase { private static int manyArgs(int i0, int i1, int i2, int i3, int i4, int i5,
diff --git a/user/test/com/google/gwt/dev/jjs/test/MethodInterfaceTest.java b/user/test/com/google/gwt/dev/jjs/test/MethodInterfaceTest.java index 40f316d..9304c82 100644 --- a/user/test/com/google/gwt/dev/jjs/test/MethodInterfaceTest.java +++ b/user/test/com/google/gwt/dev/jjs/test/MethodInterfaceTest.java
@@ -1,8 +1,25 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.dev.jjs.test; import com.google.gwt.junit.client.GWTTestCase; +/** + * TODO: document me. + */ public class MethodInterfaceTest extends GWTTestCase implements MethodsOnly { public void f() {
diff --git a/user/test/com/google/gwt/dev/jjs/test/MethodsAndFields.java b/user/test/com/google/gwt/dev/jjs/test/MethodsAndFields.java index c76c97a..3d7d4af 100644 --- a/user/test/com/google/gwt/dev/jjs/test/MethodsAndFields.java +++ b/user/test/com/google/gwt/dev/jjs/test/MethodsAndFields.java
@@ -1,6 +1,23 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.dev.jjs.test; +/** + * TODO: document me. + */ public interface MethodsAndFields extends MethodsOnly, NoMethods, NoMethodsOrFields { public static int x = 7;
diff --git a/user/test/com/google/gwt/dev/jjs/test/MethodsOnly.java b/user/test/com/google/gwt/dev/jjs/test/MethodsOnly.java index 780bdc8..95235e0 100644 --- a/user/test/com/google/gwt/dev/jjs/test/MethodsOnly.java +++ b/user/test/com/google/gwt/dev/jjs/test/MethodsOnly.java
@@ -1,6 +1,23 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.dev.jjs.test; +/** + * TODO: document me. + */ public interface MethodsOnly { public void f();
diff --git a/user/test/com/google/gwt/dev/jjs/test/MiscellaneousTest.java b/user/test/com/google/gwt/dev/jjs/test/MiscellaneousTest.java index b86f760..c4ee177 100644 --- a/user/test/com/google/gwt/dev/jjs/test/MiscellaneousTest.java +++ b/user/test/com/google/gwt/dev/jjs/test/MiscellaneousTest.java
@@ -1,4 +1,18 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.dev.jjs.test; import com.google.gwt.core.client.GWT;
diff --git a/user/test/com/google/gwt/dev/jjs/test/NativeLongTest.java b/user/test/com/google/gwt/dev/jjs/test/NativeLongTest.java index f706cc4..3c3b692 100644 --- a/user/test/com/google/gwt/dev/jjs/test/NativeLongTest.java +++ b/user/test/com/google/gwt/dev/jjs/test/NativeLongTest.java
@@ -1,8 +1,25 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.dev.jjs.test; import com.google.gwt.junit.client.GWTTestCase; +/** + * TODO: document me. + */ public class NativeLongTest extends GWTTestCase { public String getModuleName() {
diff --git a/user/test/com/google/gwt/dev/jjs/test/NoMethods.java b/user/test/com/google/gwt/dev/jjs/test/NoMethods.java index 68a05f5..072947a 100644 --- a/user/test/com/google/gwt/dev/jjs/test/NoMethods.java +++ b/user/test/com/google/gwt/dev/jjs/test/NoMethods.java
@@ -1,6 +1,23 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.dev.jjs.test; +/** + * TODO: document me. + */ public interface NoMethods { public static final String const1 = "Spam"; public static final int const2 = 4;
diff --git a/user/test/com/google/gwt/dev/jjs/test/NoMethodsOrFields.java b/user/test/com/google/gwt/dev/jjs/test/NoMethodsOrFields.java index 1642c49..060afa7 100644 --- a/user/test/com/google/gwt/dev/jjs/test/NoMethodsOrFields.java +++ b/user/test/com/google/gwt/dev/jjs/test/NoMethodsOrFields.java
@@ -1,6 +1,23 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.dev.jjs.test; +/** + * TODO: document me. + */ public interface NoMethodsOrFields { }
diff --git a/user/test/com/google/gwt/dev/jjs/test/TestBlankInterface.java b/user/test/com/google/gwt/dev/jjs/test/TestBlankInterface.java index 4bad7ca..7c85f3d 100644 --- a/user/test/com/google/gwt/dev/jjs/test/TestBlankInterface.java +++ b/user/test/com/google/gwt/dev/jjs/test/TestBlankInterface.java
@@ -1,8 +1,25 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.dev.jjs.test; import com.google.gwt.junit.client.GWTTestCase; +/** + * TODO: document me. + */ public class TestBlankInterface extends GWTTestCase implements NoMethodsOrFields {
diff --git a/user/test/com/google/gwt/emultest/EmulSuite.java b/user/test/com/google/gwt/emultest/EmulSuite.java index 88cc94c..4f641c0 100644 --- a/user/test/com/google/gwt/emultest/EmulSuite.java +++ b/user/test/com/google/gwt/emultest/EmulSuite.java
@@ -1,4 +1,18 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.emultest; import com.google.gwt.emultest.java.lang.CharacterTest; @@ -15,6 +29,9 @@ import junit.framework.Test; import junit.framework.TestSuite; +/** + * TODO: document me. + */ public class EmulSuite { /** Note: due to compiler error, only can use one Test Case at a time */
diff --git a/user/test/com/google/gwt/emultest/java/lang/C.java b/user/test/com/google/gwt/emultest/java/lang/C.java index 9a773ae..ac4fb14 100644 --- a/user/test/com/google/gwt/emultest/java/lang/C.java +++ b/user/test/com/google/gwt/emultest/java/lang/C.java
@@ -1,26 +1,40 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.emultest.java.lang; -/** - *Interface to contain constants shared between StringTest.java and String.java +/** + * Interface to contain constants shared between StringTest.java and String.java */ public class C { public static String FLOAT_STRING = "123.4599"; public static String DOUBLE_STRING = "123.4599"; public static float FLOAT_VALUE = 123.459980f; - public static double DOUBLE_VALUE=123.459980d; + public static double DOUBLE_VALUE = 123.459980d; public static char CHAR_VALUE = 'd'; public static String CHAR_STRING = "d"; public static String CHAR_ARRAY_STRING = "abcdef"; public static String CHAR_ARRAY_STRING_SUB = "bcde"; - public static char [] CHAR_ARRAY_VALUE = - new char [] {'a','b','c','d','e','f'}; + public static char[] CHAR_ARRAY_VALUE = new char[] { + 'a', 'b', 'c', 'd', 'e', 'f'}; public static String FALSE_STRING = "false"; public static boolean FALSE_VALUE = false; public static boolean TRUE_VALUE = true; public static String TRUE_STRING = "true"; - public static final String INT_STRING = "123456789"; + public static final String INT_STRING = "123456789"; public static final String LONG_STRING = "1234567890123456"; public static final int INT_VALUE = 123456789; - public static final long LONG_VALUE = 1234567890123456l; + public static final long LONG_VALUE = 1234567890123456L; }
diff --git a/user/test/com/google/gwt/emultest/java/lang/CharacterTest.java b/user/test/com/google/gwt/emultest/java/lang/CharacterTest.java index f25e74b..86a7813 100644 --- a/user/test/com/google/gwt/emultest/java/lang/CharacterTest.java +++ b/user/test/com/google/gwt/emultest/java/lang/CharacterTest.java
@@ -1,8 +1,25 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.emultest.java.lang; import com.google.gwt.junit.client.GWTTestCase; +/** + * TODO: document me. + */ public class CharacterTest extends GWTTestCase { public static final int NUM_CHARS_HANDLED = 127; @@ -21,6 +38,9 @@ allChars = b.toString(); } + /** + * TODO: document me. + */ public abstract class Judge { String original; @@ -102,6 +122,9 @@ assertEquals('9', Character.forDigit(9, 10)); } + /** + * TODO: document me. + */ public abstract class Changer { String original;
diff --git a/user/test/com/google/gwt/emultest/java/lang/DoubleTest.java b/user/test/com/google/gwt/emultest/java/lang/DoubleTest.java index 304ccfb..88756c5 100644 --- a/user/test/com/google/gwt/emultest/java/lang/DoubleTest.java +++ b/user/test/com/google/gwt/emultest/java/lang/DoubleTest.java
@@ -1,5 +1,5 @@ /* - * Copyright 2006 Google Inc. + * Copyright 2007 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 @@ -18,6 +18,9 @@ import com.google.gwt.junit.client.GWTTestCase; +/** + * TODO: document me. + */ public class DoubleTest extends GWTTestCase { public String getModuleName() {
diff --git a/user/test/com/google/gwt/emultest/java/lang/FloatTest.java b/user/test/com/google/gwt/emultest/java/lang/FloatTest.java index 7e456a2..1d7faa6 100644 --- a/user/test/com/google/gwt/emultest/java/lang/FloatTest.java +++ b/user/test/com/google/gwt/emultest/java/lang/FloatTest.java
@@ -1,5 +1,5 @@ /* - * Copyright 2006 Google Inc. + * Copyright 2007 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 @@ -18,21 +18,21 @@ import com.google.gwt.junit.client.GWTTestCase; +/** + * TODO: document me. + */ public class FloatTest extends GWTTestCase { public String getModuleName() { return "com.google.gwt.emultest.EmulSuite"; } - public void testFloatConstants(){ - assertTrue(Float.isNaN(Float.NaN)); - assertTrue(Float.isInfinite(Float.NEGATIVE_INFINITY)); - assertTrue(Float.isInfinite(Float.POSITIVE_INFINITY)); - assertTrue(Float.NEGATIVE_INFINITY < Float.POSITIVE_INFINITY); - assertFalse(Float.NaN == Float.NaN); - + public void testFloatConstants() { + assertTrue(Float.isNaN(Float.NaN)); + assertTrue(Float.isInfinite(Float.NEGATIVE_INFINITY)); + assertTrue(Float.isInfinite(Float.POSITIVE_INFINITY)); + assertTrue(Float.NEGATIVE_INFINITY < Float.POSITIVE_INFINITY); + assertFalse(Float.NaN == Float.NaN); } - - }
diff --git a/user/test/com/google/gwt/emultest/java/lang/IntegerTest.java b/user/test/com/google/gwt/emultest/java/lang/IntegerTest.java index 19a2fc5..a16f6dc 100644 --- a/user/test/com/google/gwt/emultest/java/lang/IntegerTest.java +++ b/user/test/com/google/gwt/emultest/java/lang/IntegerTest.java
@@ -1,8 +1,25 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.emultest.java.lang; import com.google.gwt.junit.client.GWTTestCase; +/** + * TODO: document me. + */ public class IntegerTest extends GWTTestCase { public String getModuleName() { @@ -65,7 +82,7 @@ public void testXValue() { assertEquals("short",(short) 12345, new Integer(12345).shortValue()); - assertEquals("long", 1234567890l, new Integer(1234567890).longValue()); + assertEquals("long", 1234567890L, new Integer(1234567890).longValue()); assertEquals("double", 12345d, new Integer(12345).doubleValue(),0.001); assertEquals("float",12345f, new Integer(12345).floatValue(),0.01); assertEquals("byte", (byte) 123, new Integer(123).byteValue());
diff --git a/user/test/com/google/gwt/emultest/java/lang/ObjectTest.java b/user/test/com/google/gwt/emultest/java/lang/ObjectTest.java index 24ea5c2..4925954 100644 --- a/user/test/com/google/gwt/emultest/java/lang/ObjectTest.java +++ b/user/test/com/google/gwt/emultest/java/lang/ObjectTest.java
@@ -1,8 +1,25 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.emultest.java.lang; import com.google.gwt.junit.client.GWTTestCase; +/** + * TODO: document me. + */ public class ObjectTest extends GWTTestCase { /* * Test method for 'java.lang.Object.hashCode()'
diff --git a/user/test/com/google/gwt/emultest/java/lang/StringBufferTest.java b/user/test/com/google/gwt/emultest/java/lang/StringBufferTest.java index 42b980b..e5c26c0 100644 --- a/user/test/com/google/gwt/emultest/java/lang/StringBufferTest.java +++ b/user/test/com/google/gwt/emultest/java/lang/StringBufferTest.java
@@ -1,4 +1,18 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.emultest.java.lang; import com.google.gwt.junit.client.GWTTestCase; @@ -130,7 +144,6 @@ assertEquals(haystack.indexOf('a', 1), -1); assertEquals(haystack.indexOf("bc"), 1); assertEquals(haystack.indexOf(""), 0); - } /**
diff --git a/user/test/com/google/gwt/emultest/java/lang/StringTest.java b/user/test/com/google/gwt/emultest/java/lang/StringTest.java index d1b046b..7088a74 100644 --- a/user/test/com/google/gwt/emultest/java/lang/StringTest.java +++ b/user/test/com/google/gwt/emultest/java/lang/StringTest.java
@@ -1,8 +1,25 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.emultest.java.lang; import com.google.gwt.junit.client.GWTTestCase; +/** + * TODO: document me. + */ public class StringTest extends GWTTestCase { public String getModuleName() { @@ -39,7 +56,7 @@ assertEquals(new String(chars, 2, 3), shortString); assertEquals(new String(""), ""); assertEquals(new String(new String(new String(new String("")))), ""); - assertEquals(new String(new char[]{}), ""); + assertEquals(new String(new char[] {}), ""); } /** tests endsWith */ @@ -137,7 +154,7 @@ public void testReplaceAll() { assertEquals("abcdef", "xxxxabcxxdexf".replaceAll("x*", "")); assertEquals("1\\1abc123\\123de1234\\1234f", "1abc123de1234f".replaceAll( - "([1234]+)", "$1\\\\$1")); + "([1234]+)", "$1\\\\$1")); assertEquals("\n \n", "x x".replaceAll("x", "\n")); assertEquals("x x", "\n \n".replaceAll("\\\n", "x")); assertEquals("x\"\\", "x".replaceAll("x", "\\x\\\"\\\\")); @@ -146,26 +163,25 @@ /** tests split */ public void testSplit() { - compareList("fullSplit", new String[]{"abc", "", "", "de", "f"}, - "abcxxxdexfxx".split("x")); - compareList("emptyRegexSplit", new String[]{ - "", "a", "b", "c", "x", "x", "d", "e", "x", "f", "x"}, - "abcxxdexfx".split("")); - compareList("2:", "boo:and:foo".split(":", 2), new String[]{ - "boo", "and:foo"}); - compareList("5:", "boo:and:foo".split(":", 5), new String[]{ - "boo", "and", "foo"}); - compareList("-2:", "boo:and:foo".split(":", -2), new String[]{ - "boo", "and", "foo"}); - compareList("5o", "boo:and:foo".split("o", 5), new String[]{ - "b", "", ":and:f", "", ""}); - compareList("-2o", "boo:and:foo".split("o", -2), new String[]{ - "b", "", ":and:f", "", ""}); - compareList("0o", "boo:and:foo".split("o", 0), new String[]{ - "b", "", ":and:f"}); - compareList("0:", "boo:and:foo".split(":", 0), new String[]{ - "boo", "and", "foo"}); - + compareList("fullSplit", new String[] {"abc", "", "", "de", "f"}, + "abcxxxdexfxx".split("x")); + compareList("emptyRegexSplit", new String[] { + "", "a", "b", "c", "x", "x", "d", "e", "x", "f", "x"}, + "abcxxdexfx".split("")); + compareList("2:", "boo:and:foo".split(":", 2), new String[] { + "boo", "and:foo"}); + compareList("5:", "boo:and:foo".split(":", 5), new String[] { + "boo", "and", "foo"}); + compareList("-2:", "boo:and:foo".split(":", -2), new String[] { + "boo", "and", "foo"}); + compareList("5o", "boo:and:foo".split("o", 5), new String[] { + "b", "", ":and:f", "", ""}); + compareList("-2o", "boo:and:foo".split("o", -2), new String[] { + "b", "", ":and:f", "", ""}); + compareList("0o", "boo:and:foo".split("o", 0), new String[] { + "b", "", ":and:f"}); + compareList("0:", "boo:and:foo".split(":", 0), new String[] { + "boo", "and", "foo"}); } /** tests startsWith */ @@ -187,7 +203,7 @@ /** tests toCharArray */ public void testToCharArray() { char[] a1 = "abc".toCharArray(); - char[] a2 = new char[]{'a', 'b', 'c'}; + char[] a2 = new char[] {'a', 'b', 'c'}; for (int i = 0; i < a1.length; i++) { assertEquals(a1[i], a2[i]); } @@ -216,7 +232,7 @@ assertEquals(C.CHAR_STRING, String.valueOf(C.CHAR_VALUE)); assertEquals(C.CHAR_ARRAY_STRING, String.valueOf(C.CHAR_ARRAY_VALUE)); assertEquals(C.CHAR_ARRAY_STRING_SUB, String.valueOf(C.CHAR_ARRAY_VALUE, 1, - 4)); + 4)); assertEquals(C.FALSE_STRING, String.valueOf(C.FALSE_VALUE)); assertEquals(C.TRUE_STRING, String.valueOf(C.TRUE_VALUE)); }
diff --git a/user/test/com/google/gwt/emultest/java/util/ApacheMapTest.java b/user/test/com/google/gwt/emultest/java/util/ApacheMapTest.java index f8cb1b9..7b48b89 100644 --- a/user/test/com/google/gwt/emultest/java/util/ApacheMapTest.java +++ b/user/test/com/google/gwt/emultest/java/util/ApacheMapTest.java
@@ -1,4 +1,18 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.emultest.java.util; import org.apache.commons.collections.TestMap; @@ -6,19 +20,19 @@ import java.util.HashMap; import java.util.Map; +/** + * TODO: document me. + */ public class ApacheMapTest extends TestMap { public ApacheMapTest() { - } - - + } public Object makeObject() { return new HashMap(); } - - protected Map makeEmptyMap() { + protected Map makeEmptyMap() { return new HashMap(); }
diff --git a/user/test/com/google/gwt/emultest/java/util/ArraysTest.java b/user/test/com/google/gwt/emultest/java/util/ArraysTest.java index bda0123..636839c 100644 --- a/user/test/com/google/gwt/emultest/java/util/ArraysTest.java +++ b/user/test/com/google/gwt/emultest/java/util/ArraysTest.java
@@ -1,16 +1,32 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.emultest.java.util; import java.util.Arrays; import java.util.Comparator; import java.util.List; +/** + * TODO: document me. + */ public class ArraysTest extends EmulTestBase { public String getModuleName() { return "com.google.gwt.emultest.EmulSuite"; } - /** testAsList */ public void testAsList() { // 0 Object[] test = {}; @@ -37,8 +53,8 @@ assertEquals(1, test2[0].intValue()); // multiple case with subclassing Number[] test3 = { - new Integer(3), new Integer(0), new Integer(2), new Integer(4), - new Integer(1)}; + new Integer(3), new Integer(0), new Integer(2), new Integer(4), + new Integer(1)}; Arrays.sort(test3); for (int i = 0; i < test3.length; i++) { assertEquals(i, test3[i].intValue()); @@ -64,5 +80,4 @@ Object[] reverseSorted = {"c", "b", "b", "a"}; assertEquals(x, reverseSorted); } - }
diff --git a/user/test/com/google/gwt/emultest/java/util/CollectionsTest.java b/user/test/com/google/gwt/emultest/java/util/CollectionsTest.java index 0b6671a..621f76b 100644 --- a/user/test/com/google/gwt/emultest/java/util/CollectionsTest.java +++ b/user/test/com/google/gwt/emultest/java/util/CollectionsTest.java
@@ -1,4 +1,18 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.emultest.java.util; import java.util.ArrayList; @@ -7,18 +21,20 @@ import java.util.Comparator; import java.util.List; -public class CollectionsTest extends EmulTestBase{ - - public static List createSortedList(){ - ArrayList l = new ArrayList(); - l.add("a"); - l.add("b"); - l.add("c"); - return l; - +/** + * TODO: document me. + */ +public class CollectionsTest extends EmulTestBase { + + public static List createSortedList() { + ArrayList l = new ArrayList(); + l.add("a"); + l.add("b"); + l.add("c"); + return l; } - - public static List createRandomList(){ + + public static List createRandomList() { ArrayList l = new ArrayList(); l.add(new Integer(5)); l.add(new Integer(2)); @@ -27,48 +43,47 @@ l.add(new Integer(4)); return l; } - - public void testReverse() { - List a =createSortedList(); - Collections.reverse(a); - Object[] x = {"c","b","a"}; - assertEquals(x,a); - - List b = createRandomList(); - Collections.reverse(b); - Collections.reverse(b); - assertEquals(b, createRandomList()); - } - public void testSort() { + public void testReverse() { + List a = createSortedList(); + Collections.reverse(a); + Object[] x = {"c", "b", "a"}; + assertEquals(x, a); + + List b = createRandomList(); + Collections.reverse(b); + Collections.reverse(b); + assertEquals(b, createRandomList()); + } + + public void testSort() { List a = createSortedList(); Collections.reverse(a); Collections.sort(a); - assertEquals(createSortedList(),a); + assertEquals(createSortedList(), a); } public static void testSortWithComparator() { - Comparator x = new Comparator(){ - + Comparator x = new Comparator() { + public int compare(Object o1, Object o2) { Object[] schema = {"b", new Integer(5), "c", new Integer(4)}; List l = Arrays.asList(schema); int first = l.indexOf(o1); int second = l.indexOf(o2); - if(first < second){ + if (first < second) { return -1; - } else if (first == second){ + } else if (first == second) { return 0; - } else{ + } else { return 1; - } + } } }; List a = createSortedList(); - Collections.sort(a,x); - Object[] expected = {"b", "c","a"}; - assertEquals(expected,a); - + Collections.sort(a, x); + Object[] expected = {"b", "c", "a"}; + assertEquals(expected, a); } - + }
diff --git a/user/test/com/google/gwt/emultest/java/util/ComparatorTest.java b/user/test/com/google/gwt/emultest/java/util/ComparatorTest.java index 489f8a3..939e75e 100644 --- a/user/test/com/google/gwt/emultest/java/util/ComparatorTest.java +++ b/user/test/com/google/gwt/emultest/java/util/ComparatorTest.java
@@ -1,11 +1,29 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.emultest.java.util; import org.apache.commons.collections.TestComparator; + import java.util.ArrayList; import java.util.Comparator; import java.util.List; +/** + * TODO: document me. + */ public class ComparatorTest extends TestComparator { public Comparator makeComparator() { return new DummyComparator(); @@ -20,9 +38,13 @@ } } -/** list comparator for testing */ +/** + * List comparator for testing. + */ class DummyComparator implements Comparator { - /** compares returns reverse hash order */ + /** + * Compares returns reverse hash order. + */ public int compare(Object arg0, Object arg1) { int a = arg0.hashCode(); int b = arg1.hashCode();
diff --git a/user/test/com/google/gwt/emultest/java/util/DateTest.java b/user/test/com/google/gwt/emultest/java/util/DateTest.java index a44a566..47bb338 100644 --- a/user/test/com/google/gwt/emultest/java/util/DateTest.java +++ b/user/test/com/google/gwt/emultest/java/util/DateTest.java
@@ -1,16 +1,34 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.emultest.java.util; import com.google.gwt.junit.client.GWTTestCase; import java.util.Date; +/** + * TODO: document me. + */ public class DateTest extends GWTTestCase { public static final String CURRENT = "CURRENT"; public static final long DAY_MILLISECONDS_SHIFT = 27; public static final String FUTURE = "FUTURE"; public static final String PAST = "PAST"; public static final long SECOND_MILLISECONDS_SHIFT = 10; + /** Sets module name so that javascript compiler can operate */ public String getModuleName() { return "com.google.gwt.emultest.EmulSuite"; @@ -95,7 +113,6 @@ Object a2 = accum2.clone(); assertFalse(a2 == accum2); assertEquals(a2, accum2); - } /** Testing for public int java.util.Date.compareTo(java.util.Date)* */ @@ -232,15 +249,14 @@ // ///////////////////////////// Date accum1 = create(PAST); long a1 = accum1.getTime(); - assertEquals(-2839795200000l, a1); + assertEquals(-2839795200000L, a1); // ///////////////////////////// // Future // ///////////////////////////// Date accum2 = create(FUTURE); long a2 = accum2.getTime(); - assertEquals(1293678245000l, a2); - + assertEquals(1293678245000L, a2); } /** Testing for public int java.util.Date.getTimezoneOffset()* */ @@ -299,7 +315,7 @@ Date accum1 = create(PAST); String arg20 = createString(PAST); long a1 = Date.parse(arg20); - assertEquals(-2840140800000l, a1); + assertEquals(-2840140800000L, a1); // ///////////////////////////// // Future @@ -307,14 +323,15 @@ Date accum2 = create(FUTURE); String arg30 = createString(FUTURE); long a2 = Date.parse(arg30); - assertEquals(1293678245000l, a2); - + assertEquals(1293678245000L, a2); } /** Testing for public void java.util.Date.setDate(int)* */ public void testSetDate() { - // We only go through dates from 0-28 here. There are some months that do not - // have 29, 30, or 31 days - so our assertion would be wrong in the cases where + // We only go through dates from 0-28 here. There are some months that do + // not + // have 29, 30, or 31 days - so our assertion would be wrong in the cases + // where // the current month did not have 29,30,or 31 days for (int i = 1; i < 29; i++) { Date accum0 = create(); @@ -323,9 +340,11 @@ } } - /** Testing to that if we set the day number to 31 for a month that only has 30 days in it, - that the date rolls over to the first day of the next month in sequence. - */ + /** + * Testing to that if we set the day number to 31 for a month that only has 30 + * days in it, that the date rolls over to the first day of the next month in + * sequence. + */ public void testInvalidDateForMonth() { int monthNum = 3; // April int numDaysInOldMonth = 30; @@ -343,7 +362,6 @@ accum0.setHours(i); assertEquals(accum0.getHours(), i); } - } /** Testing for public void java.util.Date.setMinutes(int)* */ @@ -358,21 +376,23 @@ /** Testing for public void java.util.Date.setMonth(int)* */ public void testSetMonth() { for (int i = 0; i < 12; i++) { - // We want to use a fixed date here. If we use the current date, the assertion may fail - // when the date is the 29th, 30th, or 31st, and we set the month to one which does + // We want to use a fixed date here. If we use the current date, the + // assertion may fail + // when the date is the 29th, 30th, or 31st, and we set the month to one + // which does // not have 29, 30, or 31 days in it, respectively. Date accum0 = new Date(2006, 12, 1); accum0.setMonth(i); assertEquals(accum0.getMonth(), i); } - } - /** We want to test to see that if we are currently in a month with 31 days and we - set the month to one which has less than 31 days, that the month returned by the - date class will be one higher than the month that we originally set (according to - the spec of java.util.date) - */ + /** + * We want to test to see that if we are currently in a month with 31 days and + * we set the month to one which has less than 31 days, that the month + * returned by the date class will be one higher than the month that we + * originally set (according to the spec of java.util.date) + */ public void testSetInvalidMonthForDate() { int dayNum = 31; int newMonthNum = 1; @@ -394,7 +414,7 @@ /** Testing for public void java.util.Date.setTime(long)* */ public void testSetTime() { - long[] values = new long[]{-100000000000l, -100l, 0, 100l, 1000000000l}; + long[] values = new long[] {-100000000000L, -100L, 0, 100L, 1000000000L}; for (int i = 0; i < values.length; i++) { Date accum0 = create(); accum0.setTime(values[i]); @@ -405,7 +425,8 @@ /** Testing for public void java.util.Date.setYear(int)* */ public void testSetYear() { for (int i = 1880; i < 2050; i++) { - // We want to use a fixed date here. If we use the current date, the assertion may fail + // We want to use a fixed date here. If we use the current date, the + // assertion may fail // when the date is February 29th, and we set the year to a non-leap year Date accum0 = new Date(2006, 12, 01); accum0.setYear(i); @@ -413,9 +434,11 @@ } } - /** We want to test to see that if the date is Feb 29th (in a leap year) and we set the - year to a non-leap year, that the month and day will roll over to March 1st. - */ + /** + * We want to test to see that if the date is Feb 29th (in a leap year) and we + * set the year to a non-leap year, that the month and day will roll over to + * March 1st. + */ public void testSetInvalidYearForDate() { int dayNum = 29; int monthNum = 1; // February @@ -428,12 +451,13 @@ assertEquals(leapYearDate.getDate(), dayNum - numDaysInFebInNewYear); } - /** We want to test to see that if the date is Feb 29th (in a leap year) and we set the - year to another leap year, that the month and day will be retained - */ + /** + * We want to test to see that if the date is Feb 29th (in a leap year) and we + * set the year to another leap year, that the month and day will be retained + */ public void testSetValidLeapYearForDate() { int dayNum = 29; - int monthNum = 1; //February + int monthNum = 1; // February int yearNum = 2004; int newYearNum = yearNum + 4; Date leapYearDate = new Date(yearNum, monthNum, dayNum); @@ -441,7 +465,7 @@ assertEquals(leapYearDate.getYear(), newYearNum); assertEquals(leapYearDate.getMonth(), monthNum); assertEquals(leapYearDate.getDate(), dayNum); - } + } /** Testing for public java.lang.String java.util.Date.toGMTString()* */ public void testToGMTString() {
diff --git a/user/test/com/google/gwt/emultest/java/util/EmulTestBase.java b/user/test/com/google/gwt/emultest/java/util/EmulTestBase.java index 3eba562..74616df 100644 --- a/user/test/com/google/gwt/emultest/java/util/EmulTestBase.java +++ b/user/test/com/google/gwt/emultest/java/util/EmulTestBase.java
@@ -1,10 +1,27 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.emultest.java.util; import com.google.gwt.junit.client.GWTTestCase; import java.util.List; +/** + * TODO: document me. + */ public class EmulTestBase extends GWTTestCase { public static void assertEquals(Object[] x, Object[] y) {
diff --git a/user/test/com/google/gwt/emultest/java/util/HashSetTest.java b/user/test/com/google/gwt/emultest/java/util/HashSetTest.java index 4e0e2d6..65c7e5a 100644 --- a/user/test/com/google/gwt/emultest/java/util/HashSetTest.java +++ b/user/test/com/google/gwt/emultest/java/util/HashSetTest.java
@@ -1,4 +1,18 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.emultest.java.util; import org.apache.commons.collections.TestSet; @@ -8,12 +22,16 @@ import java.util.Map; import java.util.Set; +/** + * TODO: document me. + */ public class HashSetTest extends TestSet { public HashSetTest() { super("Dummy"); } - public void testAddingKeys(){ + + public void testAddingKeys() { Map map = new HashMap(); Set keys = new HashSet(map.keySet()); keys.add(new Object()); // Throws exception in IE6 (web-mode) but not GWT @@ -33,5 +51,4 @@ return new HashSet(); } - }
diff --git a/user/test/com/google/gwt/emultest/java/util/StackProfile.java b/user/test/com/google/gwt/emultest/java/util/StackProfile.java index a1eb540..2c649e1 100644 --- a/user/test/com/google/gwt/emultest/java/util/StackProfile.java +++ b/user/test/com/google/gwt/emultest/java/util/StackProfile.java
@@ -1,42 +1,60 @@ +/* + * Copyright 2007 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. + */ package com.google.gwt.emultest.java.util; import com.google.gwt.user.client.ui.WidgetProfile; import java.util.Stack; +/** + * TODO: document me. + */ public class StackProfile extends WidgetProfile { - /** 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"; } - - public void testTiming() throws Exception { - int t = 1; - while (true) { - testTiming(t); - t = t * 2; - } - //throw new Exception("Finished profiling"); + public void testTiming() throws Exception { + int t = 1; + while (true) { + testTiming(t); + t = t * 2; } - - public void testTiming(int i) { - addTiming(i); - } - - public void addTiming(int num) { - Stack s = new Stack(); - resetTimer(); - for (int i = 0; i < num; i++) { - s.push("item" + i); - } - timing("push(" + num + ")"); - resetTimer(); - for (int i = 0; i < num; i++) { - s.pop(); - } - timing("pop(" + num + ")"); - } + // throw new Exception("Finished profiling"); } + public void testTiming(int i) { + addTiming(i); + } + + public void addTiming(int num) { + Stack s = new Stack(); + resetTimer(); + for (int i = 0; i < num; i++) { + s.push("item" + i); + } + timing("push(" + num + ")"); + resetTimer(); + for (int i = 0; i < num; i++) { + s.pop(); + } + timing("pop(" + num + ")"); + } +}
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 824d081..3d02cca 100644 --- a/user/test/com/google/gwt/emultest/java/util/StackTest.java +++ b/user/test/com/google/gwt/emultest/java/util/StackTest.java
@@ -1,4 +1,18 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.emultest.java.util; import com.google.gwt.junit.client.GWTTestCase; @@ -6,6 +20,9 @@ import java.util.EmptyStackException; import java.util.Stack; +/** + * TODO: document me. + */ public class StackTest extends GWTTestCase { public static final int TEST_SEARCH_SIZE = 10;
diff --git a/user/test/com/google/gwt/http/HTTPSuite.java b/user/test/com/google/gwt/http/HTTPSuite.java index a74a948..8ea7a61 100644 --- a/user/test/com/google/gwt/http/HTTPSuite.java +++ b/user/test/com/google/gwt/http/HTTPSuite.java
@@ -1,5 +1,18 @@ -// Copyright 2006 Google Inc. All Rights Reserved. - +/* + * Copyright 2007 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. + */ package com.google.gwt.http; import com.google.gwt.http.client.RequestBuilderTest; @@ -10,6 +23,9 @@ import junit.framework.Test; import junit.framework.TestSuite; +/** + * TODO: document me. + */ public class HTTPSuite { public static Test suite() { TestSuite suite = new TestSuite(
diff --git a/user/test/com/google/gwt/http/client/RequestBuilderTest.java b/user/test/com/google/gwt/http/client/RequestBuilderTest.java index 21462cc..b8e1ff8 100644 --- a/user/test/com/google/gwt/http/client/RequestBuilderTest.java +++ b/user/test/com/google/gwt/http/client/RequestBuilderTest.java
@@ -1,14 +1,21 @@ -// Copyright 2006 Google Inc. All Rights Reserved. - +/* + * Copyright 2007 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. + */ package com.google.gwt.http.client; import com.google.gwt.core.client.GWT; -import com.google.gwt.http.client.RequestBuilder; -import com.google.gwt.http.client.RequestException; -import com.google.gwt.http.client.RequestPermissionException; -import com.google.gwt.http.client.Request; -import com.google.gwt.http.client.Response; -import com.google.gwt.http.client.RequestCallback; import com.google.gwt.junit.client.GWTTestCase; /** @@ -29,12 +36,15 @@ * Test method for * {@link com.google.gwt.http.client.RequestBuilder#RequestBuilder(java.lang.String, java.lang.String)}. * <p> - * NOTE: When running this test against Internet Explorer, the security settings of IE affect this test. - * The assumption is that the "Access Data Sources Across Domains" setting is set to "Disabled". This is - * the standard setting for the "Internet" zone, which models the case of a user's browser sending a request - * to a foreign website. However, if you are running the unit tests against a machine running the GWT app which - * falls into your "Trusted Sites" or "Local Network" content zone, this setting's value is different. - * You will have to change the setting to "Disabled" in these zones for this test to pass. + * NOTE: When running this test against Internet Explorer, the security + * settings of IE affect this test. The assumption is that the "Access Data + * Sources Across Domains" setting is set to "Disabled". This is the standard + * setting for the "Internet" zone, which models the case of a user's browser + * sending a request to a foreign website. However, if you are running the + * unit tests against a machine running the GWT app which falls into your + * "Trusted Sites" or "Local Network" content zone, this setting's value is + * different. You will have to change the setting to "Disabled" in these zones + * for this test to pass. * <p> * Test Cases: * <ul> @@ -230,7 +240,7 @@ + "setRequestHeader"); builder.setHeader("Foo", "Bar"); builder.setHeader("Foo", "Bar1"); - + builder.sendRequest(null, new RequestCallback() { public void onError(Request request, Throwable exception) { fail("HTTPRequest timed out");
diff --git a/user/test/com/google/gwt/http/client/RequestTest.java b/user/test/com/google/gwt/http/client/RequestTest.java index f57a72e..b0c52df 100644 --- a/user/test/com/google/gwt/http/client/RequestTest.java +++ b/user/test/com/google/gwt/http/client/RequestTest.java
@@ -1,37 +1,45 @@ -// Copyright 2006 Google Inc. All Rights Reserved. - +/* + * Copyright 2007 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. + */ package com.google.gwt.http.client; import com.google.gwt.core.client.GWT; -import com.google.gwt.http.client.RequestBuilder; -import com.google.gwt.http.client.RequestException; -import com.google.gwt.http.client.Request; -import com.google.gwt.http.client.Response; -import com.google.gwt.http.client.RequestCallback; import com.google.gwt.junit.client.GWTTestCase; import com.google.gwt.user.client.impl.HTTPRequestImpl; /** - * + * TODO: document me. */ public class RequestTest extends GWTTestCase { private static final int TEST_FINISH_DELAY = 10000; - + private static String getTestBaseURL() { return GWT.getModuleBaseURL() + "testRequest/"; } - + public String getModuleName() { return "com.google.gwt.http.RequestTest"; } - + /** * Test method for {@link com.google.gwt.http.client.Request#cancel()}. */ public void testCancel() { delayTestFinish(TEST_FINISH_DELAY); - - RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, + + RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, getTestBaseURL() + "/cancel"); try { Request request = builder.sendRequest(null, new RequestCallback() { @@ -43,11 +51,11 @@ fail("Request was canceled - no timeout should occur"); } }); - + assertTrue(request.isPending()); request.cancel(); assertFalse(request.isPending()); - + finishTest(); } catch (RequestException e) { fail(e.getMessage()); @@ -71,7 +79,7 @@ Request request = new Request(null, 0, callback); fail(); } catch (NullPointerException ex) { - + // Success. } HTTPRequestImpl impl = (HTTPRequestImpl) GWT.create(HTTPRequestImpl.class); @@ -79,14 +87,14 @@ Request request = new Request(impl.createXmlHTTPRequest(), -1, callback); fail(); } catch (IllegalArgumentException ex) { - + // Success. } try { Request request = new Request(impl.createXmlHTTPRequest(), -1, null); fail(); } catch (NullPointerException ex) { - + // Success. } try { @@ -100,9 +108,9 @@ * Test method for {@link com.google.gwt.http.client.Request#isPending()}. */ public void testIsPending() { -// delayTestFinish(TEST_FINISH_DELAY); - - RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, + // delayTestFinish(TEST_FINISH_DELAY); + + RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, getTestBaseURL() + "isPending"); try { Request request = builder.sendRequest(null, new RequestCallback() { @@ -114,9 +122,9 @@ finishTest(); } }); - + assertTrue(request.isPending()); -// finishTest(); + // finishTest(); } catch (RequestException e) { fail(e.getMessage()); }
diff --git a/user/test/com/google/gwt/http/client/ResponseTest.java b/user/test/com/google/gwt/http/client/ResponseTest.java index d5f4641..69b5056 100644 --- a/user/test/com/google/gwt/http/client/ResponseTest.java +++ b/user/test/com/google/gwt/http/client/ResponseTest.java
@@ -1,13 +1,21 @@ -// Copyright 2006 Google Inc. All Rights Reserved. - +/* + * Copyright 2007 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. + */ package com.google.gwt.http.client; import com.google.gwt.core.client.GWT; -import com.google.gwt.http.client.RequestBuilder; -import com.google.gwt.http.client.RequestException; -import com.google.gwt.http.client.Request; -import com.google.gwt.http.client.Response; -import com.google.gwt.http.client.RequestCallback; import com.google.gwt.junit.client.GWTTestCase; /** @@ -21,14 +29,13 @@ } private static RequestBuilder getHTTPRequestBuilder(String testURL) { - return new RequestBuilder(RequestBuilder.GET, - testURL); + return new RequestBuilder(RequestBuilder.GET, testURL); } private static String getTestBaseURL() { return GWT.getModuleBaseURL() + "testResponse/"; } - + private static native boolean isSafari() /*-{ var ua = navigator.userAgent.toLowerCase(); if (ua.indexOf('safari') != -1) { @@ -40,17 +47,16 @@ private static void raiseUnexpectedException(Throwable exception) { fail("Unexpected exception: " + exception.toString()); } - + public String getModuleName() { return "com.google.gwt.http.ResponseTest"; } - + /** - * Test method for - * {@link com.google.gwt.http.client.Response#getStatusCode()}. + * Test method for {@link com.google.gwt.http.client.Response#getStatusCode()}. */ public void testGetStatusCode() { - executeTest(new RequestCallback() { + executeTest(new RequestCallback() { public void onError(Request request, Throwable exception) { fail(); } @@ -59,52 +65,51 @@ assertEquals(200, response.getStatusCode()); finishTest(); } - }); + }); } /** - * Test method for - * {@link com.google.gwt.http.client.Response#getStatusCode()}. - * DISABLED - we use a newer version of webkit in our hosted browser than Safari's; we can't reliably - * distinguish between the two so we disabled the test + * Test method for {@link com.google.gwt.http.client.Response#getStatusCode()}. + * DISABLED - we use a newer version of webkit in our hosted browser than + * Safari's; we can't reliably distinguish between the two so we disabled the + * test */ public void disabledTestGetStatusCode_Safari() { if (!isSafari()) { // Only test this on Safari return; } - - executeTest(getHTTPRequestBuilder(getTestBaseURL() + "noResponseText"), - new RequestCallback() { - public void onError(Request request, Throwable exception) { - if (exception instanceof RuntimeException) { - finishTest(); - } else { - raiseUnexpectedException(exception); - } - } - public void onResponseReceived(Request request, Response response) { - try { - int statusCode = response.getStatusCode(); - fail("Unexpected RuntimeException from getStatusCode()"); - } catch (RuntimeException ex) { - } - - finishTest(); - } - }); + executeTest(getHTTPRequestBuilder(getTestBaseURL() + "noResponseText"), + new RequestCallback() { + public void onError(Request request, Throwable exception) { + if (exception instanceof RuntimeException) { + finishTest(); + } else { + raiseUnexpectedException(exception); + } + } + + public void onResponseReceived(Request request, Response response) { + try { + int statusCode = response.getStatusCode(); + fail("Unexpected RuntimeException from getStatusCode()"); + } catch (RuntimeException ex) { + } + + finishTest(); + } + }); } /** - * Test method for - * {@link com.google.gwt.http.client.Response#getStatusText()}. + * Test method for {@link com.google.gwt.http.client.Response#getStatusText()}. */ public void testGetStatusText() { executeTest(new RequestCallback() { public void onError(Request request, Throwable exception) { if (exception instanceof RuntimeException) { - + } else { raiseUnexpectedException(exception); } @@ -114,43 +119,41 @@ assertEquals("OK", response.getStatusText()); finishTest(); } - }); + }); } /** - * Test method for - * {@link com.google.gwt.http.client.Response#getStatusText()}. + * Test method for {@link com.google.gwt.http.client.Response#getStatusText()}. */ public void disabledTestGetStatusText_Safari() { if (!isSafari()) { // Only test this on Safari return; } - - executeTest(getHTTPRequestBuilder(getTestBaseURL() + "noResponseText"), - new RequestCallback() { - public void onError(Request request, Throwable exception) { - if (exception instanceof RuntimeException) { - finishTest(); - } else { - raiseUnexpectedException(exception); - } - } - public void onResponseReceived(Request request, Response response) { - try { - String statusText = response.getStatusText(); - fail("Unexpected RuntimeException from getStatusText()"); - } catch (RuntimeException ex) { - } - - finishTest(); - } - }); + executeTest(getHTTPRequestBuilder(getTestBaseURL() + "noResponseText"), + new RequestCallback() { + public void onError(Request request, Throwable exception) { + if (exception instanceof RuntimeException) { + finishTest(); + } else { + raiseUnexpectedException(exception); + } + } + + public void onResponseReceived(Request request, Response response) { + try { + String statusText = response.getStatusText(); + fail("Unexpected RuntimeException from getStatusText()"); + } catch (RuntimeException ex) { + } + + finishTest(); + } + }); } - private void executeTest(RequestBuilder builder, - RequestCallback callback) { + private void executeTest(RequestBuilder builder, RequestCallback callback) { delayTestFinish(TEST_FINISH_DELAY); try {
diff --git a/user/test/com/google/gwt/http/client/URLTest.java b/user/test/com/google/gwt/http/client/URLTest.java index d969565..f72f40b 100644 --- a/user/test/com/google/gwt/http/client/URLTest.java +++ b/user/test/com/google/gwt/http/client/URLTest.java
@@ -1,5 +1,18 @@ -// Copyright 2006 Google Inc. All Rights Reserved. - +/* + * Copyright 2007 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. + */ package com.google.gwt.http.client; import com.google.gwt.junit.client.GWTTestCase; @@ -8,18 +21,19 @@ * Tests for the URL utility class. */ public class URLTest extends GWTTestCase { - + private final String DECODED_URL = "http://www.foo \u00E9 bar.com/1_!~*'();/?@&=+$,#"; - private final String DECODED_URL_COMPONENT = "-_.!~*'():/#?@ \u00E9 "; + private final String DECODED_URL_COMPONENT = "-_.!~*'():/#?@ \u00E9 "; private final String ENCODED_URL = "http://www.foo%20%C3%A9%20bar.com/1_!~*'();/?@&=+$,#"; private final String ENCODED_URL_COMPONENT = "-_.!~*'()%3A%2F%23%3F%40+%C3%A9+"; - + public String getModuleName() { return "com.google.gwt.http.HttpSuite"; } /** - * Test method for {@link com.google.gwt.http.client.URL#decode(java.lang.String)}. + * Test method for + * {@link com.google.gwt.http.client.URL#decode(java.lang.String)}. */ public void testDecode() { try { @@ -28,20 +42,21 @@ } catch (NullPointerException ex) { // expected exception was thrown } - + try { URL.decode(""); fail("Expected IllegalArgumentException"); } catch (IllegalArgumentException ex) { // expected exception was thrown } - + String actualURL = URL.decode(ENCODED_URL); assertEquals(DECODED_URL, actualURL); } /** - * Test method for {@link com.google.gwt.http.client.URL#decodeComponent(java.lang.String)}. + * Test method for + * {@link com.google.gwt.http.client.URL#decodeComponent(java.lang.String)}. */ public void testDecodeComponent() { try { @@ -50,20 +65,21 @@ } catch (NullPointerException ex) { // expected exception was thrown } - + try { URL.decodeComponent(""); fail("Expected IllegalArgumentException"); } catch (IllegalArgumentException ex) { // expected exception was thrown } - + String actualURLComponent = URL.decodeComponent(ENCODED_URL_COMPONENT); assertEquals(DECODED_URL_COMPONENT, actualURLComponent); } /** - * Test method for {@link com.google.gwt.http.client.URL#encode(java.lang.String)}. + * Test method for + * {@link com.google.gwt.http.client.URL#encode(java.lang.String)}. */ public void testEncode() { try { @@ -72,20 +88,21 @@ } catch (NullPointerException ex) { // expected exception was thrown } - + try { URL.encode(""); fail("Expected IllegalArgumentException"); } catch (IllegalArgumentException ex) { // expected exception was thrown } - + String actualURL = URL.encode(DECODED_URL); assertEquals(ENCODED_URL, actualURL); } /** - * Test method for {@link com.google.gwt.http.client.URL#encodeComponent(java.lang.String)}. + * Test method for + * {@link com.google.gwt.http.client.URL#encodeComponent(java.lang.String)}. */ public void testEncodeComponent() { try { @@ -94,14 +111,14 @@ } catch (NullPointerException ex) { // expected exception was thrown } - + try { URL.encodeComponent(""); fail("Expected IllegalArgumentException"); } catch (IllegalArgumentException ex) { // expected exception was thrown } - + String actualURLComponent = URL.encodeComponent(DECODED_URL_COMPONENT); assertEquals(ENCODED_URL_COMPONENT, actualURLComponent); }
diff --git a/user/test/com/google/gwt/http/server/RequestBuilderTestServlet.java b/user/test/com/google/gwt/http/server/RequestBuilderTestServlet.java index 1eccf9e..09a384a 100644 --- a/user/test/com/google/gwt/http/server/RequestBuilderTestServlet.java +++ b/user/test/com/google/gwt/http/server/RequestBuilderTestServlet.java
@@ -1,3 +1,18 @@ +/* + * Copyright 2007 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. + */ package com.google.gwt.http.server; import java.io.BufferedReader; @@ -8,16 +23,20 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +/** + * TODO: document me. + */ public class RequestBuilderTestServlet extends HttpServlet { private static String getPathInfoBase() { return "/com.google.gwt.http.RequestBuilderTest/testRequestBuilder/"; } - - protected void doDelete(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + + protected void doDelete(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { response.setStatus(HttpServletResponse.SC_OK); } - + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String method = request.getMethod(); @@ -26,7 +45,7 @@ String value = request.getHeader("Foo"); response.getWriter().print("Hello"); if (value.equals("Bar1")) { - response.setStatus(HttpServletResponse.SC_OK); + response.setStatus(HttpServletResponse.SC_OK); } else { response.setStatus(HttpServletResponse.SC_BAD_REQUEST); } @@ -56,12 +75,14 @@ response.setStatus(HttpServletResponse.SC_BAD_REQUEST); } } - - protected void doHead(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + + protected void doHead(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { response.setStatus(HttpServletResponse.SC_OK); } - - protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { BufferedReader reader = request.getReader(); String content = reader.readLine(); response.getWriter().print("POST"); @@ -72,7 +93,8 @@ } } - protected void doPut(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + protected void doPut(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { BufferedReader reader = request.getReader(); String content = reader.readLine(); if (content.equals("<html><body>Put Me</body></html>")) {
diff --git a/user/test/com/google/gwt/http/server/RequestTestServlet.java b/user/test/com/google/gwt/http/server/RequestTestServlet.java index 0c08851..ec631b4 100644 --- a/user/test/com/google/gwt/http/server/RequestTestServlet.java +++ b/user/test/com/google/gwt/http/server/RequestTestServlet.java
@@ -1,3 +1,18 @@ +/* + * Copyright 2007 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. + */ package com.google.gwt.http.server; import java.io.IOException; @@ -7,6 +22,9 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +/** + * TODO: document me. + */ public class RequestTestServlet extends HttpServlet { protected void doGet(HttpServletRequest request, HttpServletResponse response)
diff --git a/user/test/com/google/gwt/http/server/ResponseTestServlet.java b/user/test/com/google/gwt/http/server/ResponseTestServlet.java index 30747c7..c888f74 100644 --- a/user/test/com/google/gwt/http/server/ResponseTestServlet.java +++ b/user/test/com/google/gwt/http/server/ResponseTestServlet.java
@@ -1,3 +1,18 @@ +/* + * Copyright 2007 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. + */ package com.google.gwt.http.server; import java.io.IOException; @@ -7,18 +22,20 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +/** + * TODO: document me. + */ public class ResponseTestServlet extends HttpServlet { - protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.addHeader("header1", "value1"); response.addHeader("header2", "value2"); response.addHeader("header3", "value3"); - - /* - * If the ends with noResponseText then do not send it. This is used to - * test some Safari specific anomalies. + + /* + * If the ends with noResponseText then do not send it. This is used to test + * some Safari specific anomalies. */ if (!request.getPathInfo().endsWith("noResponseText")) { response.getWriter().print("Hello World!");
diff --git a/user/test/com/google/gwt/i18n/ConstantMapTest.java b/user/test/com/google/gwt/i18n/ConstantMapTest.java index 3769576..0f2cac3 100644 --- a/user/test/com/google/gwt/i18n/ConstantMapTest.java +++ b/user/test/com/google/gwt/i18n/ConstantMapTest.java
@@ -13,15 +13,16 @@ * License for the specific language governing permissions and limitations under * the License. */ - - package com.google.gwt.i18n; import com.google.gwt.i18n.client.impl.ConstantMap; import java.util.Map; -public class ConstantMapTest extends TestMap{ +/** + * TODO: document me. + */ +public class ConstantMapTest extends TestMap { protected Map makeEmptyMap() { return new ConstantMap();
diff --git a/user/test/com/google/gwt/i18n/TestMap.java b/user/test/com/google/gwt/i18n/TestMap.java index 690e164..045961b 100644 --- a/user/test/com/google/gwt/i18n/TestMap.java +++ b/user/test/com/google/gwt/i18n/TestMap.java
@@ -1,3 +1,4 @@ +//CHECKSTYLE_OFF /* * Copyright 1999-2004 The Apache Software Foundation *
diff --git a/user/test/com/google/gwt/i18n/client/ColorsAndShapes.java b/user/test/com/google/gwt/i18n/client/ColorsAndShapes.java index 5d389ef..8520b5a 100644 --- a/user/test/com/google/gwt/i18n/client/ColorsAndShapes.java +++ b/user/test/com/google/gwt/i18n/client/ColorsAndShapes.java
@@ -1,10 +1,26 @@ -// Copyright 2006 Google Inc. All Rights Reserved. - +/* + * Copyright 2007 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. + */ package com.google.gwt.i18n.client; import com.google.gwt.i18n.client.gen.Colors; import com.google.gwt.i18n.client.gen.Shapes; +/** + * TODO: document me. + */ public interface ColorsAndShapes extends Colors, Shapes { public String[] myFavorites();
diff --git a/user/test/com/google/gwt/i18n/client/ColorsAndShapesAndConcepts.java b/user/test/com/google/gwt/i18n/client/ColorsAndShapesAndConcepts.java index e9c28a8..8f1a2b9 100644 --- a/user/test/com/google/gwt/i18n/client/ColorsAndShapesAndConcepts.java +++ b/user/test/com/google/gwt/i18n/client/ColorsAndShapesAndConcepts.java
@@ -1,7 +1,23 @@ -// Copyright 2006 Google Inc. All Rights Reserved. - +/* + * Copyright 2007 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. + */ package com.google.gwt.i18n.client; +/** + * TODO: document me. + */ public interface ColorsAndShapesAndConcepts extends ColorsAndShapes { /** circle overload */ public String circle();
diff --git a/user/test/com/google/gwt/i18n/client/I18N2Test.java b/user/test/com/google/gwt/i18n/client/I18N2Test.java index 05bdb6b..e2bdf1d 100644 --- a/user/test/com/google/gwt/i18n/client/I18N2Test.java +++ b/user/test/com/google/gwt/i18n/client/I18N2Test.java
@@ -1,5 +1,5 @@ /* - * Copyright 2006 Google Inc. + * Copyright 2007 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 @@ -21,6 +21,9 @@ import com.google.gwt.i18n.client.gen.TestBadKeys; import com.google.gwt.junit.client.GWTTestCase; +/** + * TODO: document me. + */ public class I18N2Test extends GWTTestCase { public String getModuleName() { return "com.google.gwt.i18n.I18N2Test";
diff --git a/user/test/com/google/gwt/i18n/client/I18NTest.java b/user/test/com/google/gwt/i18n/client/I18NTest.java index 35a6394..bf20925 100644 --- a/user/test/com/google/gwt/i18n/client/I18NTest.java +++ b/user/test/com/google/gwt/i18n/client/I18NTest.java
@@ -1,4 +1,18 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.i18n.client; import com.google.gwt.core.client.GWT; @@ -37,12 +51,10 @@ public void testLocalizableInner() { // Check simple inner - LocalizableSimpleInner s = (LocalizableSimpleInner) GWT - .create(Inners.LocalizableSimpleInner.class); + LocalizableSimpleInner s = (LocalizableSimpleInner) GWT.create(Inners.LocalizableSimpleInner.class); assertEquals("getLocalizableInner", s.getLocalizableInner()); - LocalizableInnerInner localizableInnerInner = (LocalizableInnerInner) GWT - .create(Inners.InnerClass.LocalizableInnerInner.class); + LocalizableInnerInner localizableInnerInner = (LocalizableInnerInner) GWT.create(Inners.InnerClass.LocalizableInnerInner.class); assertEquals("localizableInnerInner", localizableInnerInner.string()); // Check success of finding embedded @@ -50,17 +62,13 @@ assertEquals("piglatin", lock.string()); assertEquals("InnerLoc", Inners.testInnerLoc()); - - - } public void testLocalizableInterfaceInner() { Inners inner = new Inners(); // Simple Inner - SimpleInner simpleInner = (SimpleInner) GWT - .create(Inners.SimpleInner.class); + SimpleInner simpleInner = (SimpleInner) GWT.create(Inners.SimpleInner.class); assertEquals(0, simpleInner.intZero()); assertEquals("Simple Inner", simpleInner.simpleInner()); assertTrue(inner.testProtectedInner()); @@ -80,14 +88,12 @@ assertEquals("outer", innerInner.outer()); // Inner Inner Message - InnerInnerMessages innerInnerMessages = (InnerInnerMessages) GWT - .create(InnerInnerMessages.class); - assertEquals("I am a person", innerInnerMessages - .innerClassMessages("person")); + InnerInnerMessages innerInnerMessages = (InnerInnerMessages) GWT.create(InnerInnerMessages.class); + assertEquals("I am a person", + innerInnerMessages.innerClassMessages("person")); // Extends Inner Inner - ExtendsInnerInner extendsInnerInner = (ExtendsInnerInner) GWT - .create(ExtendsInnerInner.class); + ExtendsInnerInner extendsInnerInner = (ExtendsInnerInner) GWT.create(ExtendsInnerInner.class); assertEquals("Extends Inner Inner", extendsInnerInner.extendsInnerInner()); // Protected InnerClass @@ -105,8 +111,7 @@ assertEquals("default", b.a()); TestLeafBundle c = (TestLeafBundle) GWT.create(TestLeafBundle.class); assertEquals("TestLeafBundle_piglatin_UK_win", c.b()); - com.google.gwt.i18n.client.Wrapper2.TestBindingImpl d = (com.google.gwt.i18n.client.Wrapper2.TestBindingImpl) GWT - .create(com.google.gwt.i18n.client.Wrapper2.TestBindingImpl.class); + com.google.gwt.i18n.client.Wrapper2.TestBindingImpl d = (com.google.gwt.i18n.client.Wrapper2.TestBindingImpl) GWT.create(com.google.gwt.i18n.client.Wrapper2.TestBindingImpl.class); assertEquals("default", d.a()); } @@ -319,37 +324,37 @@ String[] s; s = types.stringArrayABCDEFG(); - assertArrayEquals(new String[]{"A", "B", "C", "D", "E", "F", "G"}, s); + assertArrayEquals(new String[] {"A", "B", "C", "D", "E", "F", "G"}, s); s = types.stringArraySizeOneEmptyString(); - assertArrayEquals(new String[]{""}, s); + assertArrayEquals(new String[] {""}, s); s = types.stringArraySizeOneX(); - assertArrayEquals(new String[]{"X"}, s); + assertArrayEquals(new String[] {"X"}, s); s = types.stringArraySizeTwoBothEmpty(); - assertArrayEquals(new String[]{"", ""}, s); + assertArrayEquals(new String[] {"", ""}, s); s = types.stringArraySizeThreeAllEmpty(); - assertArrayEquals(new String[]{"", "", ""}, s); + assertArrayEquals(new String[] {"", "", ""}, s); s = types.stringArraySizeTwoWithEscapedComma(); - assertArrayEquals(new String[]{"X", ", Y"}, s); + assertArrayEquals(new String[] {"X", ", Y"}, s); s = types.stringArraySizeOneWithBackslashX(); - assertArrayEquals(new String[]{"\\X"}, s); + assertArrayEquals(new String[] {"\\X"}, s); s = types.stringArraySizeThreeWithDoubleBackslash(); - assertArrayEquals(new String[]{"X", "\\", "Y"}, s); + assertArrayEquals(new String[] {"X", "\\", "Y"}, s); } public void testConstantStrings() { TestConstants types = (TestConstants) GWT.create(TestConstants.class); assertEquals("string", types.getString()); - assertEquals("stringTrimsLeadingWhitespace", types - .stringTrimsLeadingWhitespace()); - assertEquals("stringDoesNotTrimTrailingThreeSpaces ", types - .stringDoesNotTrimTrailingThreeSpaces()); + assertEquals("stringTrimsLeadingWhitespace", + types.stringTrimsLeadingWhitespace()); + assertEquals("stringDoesNotTrimTrailingThreeSpaces ", + types.stringDoesNotTrimTrailingThreeSpaces()); assertEquals("", types.stringEmpty()); String jaBlue = types.stringJapaneseBlue(); assertEquals("あお", jaBlue); @@ -360,8 +365,7 @@ } public void testConstantsWithLookup() { - TestConstantsWithLookup l = (TestConstantsWithLookup) GWT - .create(TestConstantsWithLookup.class); + TestConstantsWithLookup l = (TestConstantsWithLookup) GWT.create(TestConstantsWithLookup.class); assertEquals(l.mapABCD(), l.getMap("mapABCD")); assertEquals(l.mapDCBA(), l.getMap("mapDCBA")); assertEquals(l.mapBACD(), l.getMap("mapBACD")); @@ -405,8 +409,8 @@ public void testDictionary() { createDummyDictionaries(); Dictionary d = Dictionary.getDictionary("testDic"); - assertEquals("3 {2},{2},{2}, one {0}, two {1} {1}", d - .get("formattedMessage")); + assertEquals("3 {2},{2},{2}, one {0}, two {1} {1}", + d.get("formattedMessage")); assertEquals("4", d.get("d")); Set s = d.keySet(); assertTrue(s.contains("a")); @@ -442,8 +446,7 @@ Shapes shapes = (Shapes) GWT.create(Shapes.class); // test overload assertEquals("aya irclecay", shapes.circle()); - ColorsAndShapesAndConcepts s = (ColorsAndShapesAndConcepts) GWT - .create(ColorsAndShapesAndConcepts.class); + ColorsAndShapesAndConcepts s = (ColorsAndShapesAndConcepts) GWT.create(ColorsAndShapesAndConcepts.class); assertEquals("aya irclecay", s.circle()); // test converge assertEquals("any primary color", s.shapeColor()); @@ -454,21 +457,20 @@ TestMessages s = (TestMessages) GWT.create(TestMessages.class); assertEquals("no args", s.args0()); assertEquals("a,b,c,d,e,f,g,h,i,j", s.args10("a", "b", "c", "d", "e", "f", - "g", "h", "i", "j")); + "g", "h", "i", "j")); String shouldHave = "x,y, \"a\",\"b\", \"x\", \"y\", \'a\', b, {0}, \'y\'"; assertEquals(shouldHave, s.argsWithQuotes("x", "y")); - assertEquals("repeatedArgs: a, b, a, b, a, b, a, b", s - .testLotsOfUsageOfArgs("a", "b")); + assertEquals("repeatedArgs: a, b, a, b, a, b, a, b", + s.testLotsOfUsageOfArgs("a", "b")); assertEquals("\"~\" ~~ \"~~~~ \"\"", s.testWithXs()); assertEquals("お好你好好", s.unicode("好", "好")); } public void testTypedMessages() { - TestTypedMessages typed = (TestTypedMessages) GWT - .create(TestTypedMessages.class); + TestTypedMessages typed = (TestTypedMessages) GWT.create(TestTypedMessages.class); String expected = "int(0) float(1.2), long(0), boolean(true), Object([], char(a), byte(127), short(-32768);"; assertEquals(expected, typed.testAllTypes(0, (float) 1.2, 0, true, - new ArrayList(), 'a', Byte.MAX_VALUE, Short.MIN_VALUE)); + new ArrayList(), 'a', Byte.MAX_VALUE, Short.MIN_VALUE)); String lotsOfInts = typed.testLotsOfInts(1, 2, 3, 4); assertEquals("1, 2,3,4 ", lotsOfInts); String oneFloat = typed.simpleMessageTest((float) 2.3); @@ -476,10 +478,10 @@ String singleQuotes = typed.testSingleQuotes("arg"); assertEquals("'A', 'arg', ','", singleQuotes); String testSomeObjectTypes = typed.testSomeObjectTypes(new I18NTest(), - new StringBuffer("hello"), new Integer("34"), null); + new StringBuffer("hello"), new Integer("34"), null); assertEquals( - "this(null(com.google.gwt.i18n.client.I18NTest)), StringBuffer(hello), Integer(34), null(null);", - testSomeObjectTypes); + "this(null(com.google.gwt.i18n.client.I18NTest)), StringBuffer(hello), Integer(34), null(null);", + testSomeObjectTypes); } private void assertArrayEquals(String[] shouldBe, String[] test) {
diff --git a/user/test/com/google/gwt/i18n/client/Moods.java b/user/test/com/google/gwt/i18n/client/Moods.java index 4f0272a..5b6a2c6 100644 --- a/user/test/com/google/gwt/i18n/client/Moods.java +++ b/user/test/com/google/gwt/i18n/client/Moods.java
@@ -1,9 +1,25 @@ -//Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.i18n.client; import java.util.Map; -/** Testing class to represent Moods. */ +/** + * Testing class to represent Moods. + */ public interface Moods extends Constants { /** * The word for 'Happy'.
diff --git a/user/test/com/google/gwt/i18n/client/TestBinding.java b/user/test/com/google/gwt/i18n/client/TestBinding.java index 9107666..bd07fc9 100644 --- a/user/test/com/google/gwt/i18n/client/TestBinding.java +++ b/user/test/com/google/gwt/i18n/client/TestBinding.java
@@ -16,7 +16,9 @@ package com.google.gwt.i18n.client; - +/** + * TODO: document me. + */ public interface TestBinding extends Localizable { String a(); @@ -46,7 +48,6 @@ public String b() { return "b"; } - } static class TestBinding_ implements TestBinding { @@ -61,13 +62,13 @@ } } -class Wrapper2{ - public abstract static class TestBindingImpl implements Localizable{ +class Wrapper2 { + public abstract static class TestBindingImpl implements Localizable { abstract String a(); abstract String b(); } - + static class TestBindingImpl_a extends TestBindingImpl_b_C_d { public String a() { return "a"; @@ -78,12 +79,13 @@ public String a() { return "b_c_d"; } - public String b(){ + + public String b() { return "b_c_d"; } } - static class TestBinding extends TestBindingImpl { + static class TestBinding extends TestBindingImpl { public String a() { return "never should be here"; @@ -92,7 +94,6 @@ public String b() { return "never should be here"; } - } static class TestBindingImpl_ extends TestBindingImpl { @@ -106,4 +107,3 @@ } } } -
diff --git a/user/test/com/google/gwt/i18n/client/TestConstants.java b/user/test/com/google/gwt/i18n/client/TestConstants.java index 33051ae..6c28611 100644 --- a/user/test/com/google/gwt/i18n/client/TestConstants.java +++ b/user/test/com/google/gwt/i18n/client/TestConstants.java
@@ -1,4 +1,18 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.i18n.client; import java.util.Map; @@ -13,58 +27,94 @@ * @gwt.key string */ String getString(); + String stringTrimsLeadingWhitespace(); + String stringDoesNotTrimTrailingThreeSpaces(); + String stringEmpty(); + String stringJapaneseRed(); + String stringJapaneseGreen(); - String stringJapaneseBlue(); + + String stringJapaneseBlue(); int intZero(); + int intOne(); + int intNegOne(); + int intMax(); + int intMin(); float floatPi(); + float floatZero(); + float floatOne(); + float floatNegOne(); + float floatPosMax(); + float floatPosMin(); + float floatNegMax(); + float floatNegMin(); double doublePi(); + double doubleZero(); + double doubleOne(); + double doubleNegOne(); + double doublePosMax(); + double doublePosMin(); + double doubleNegMax(); + double doubleNegMin(); - String[] stringArrayABCDEFG(); + String[] stringArrayABCDEFG(); + String[] stringArraySizeOneEmptyString(); + String[] stringArraySizeOneX(); + String[] stringArraySizeTwoBothEmpty(); - String[] stringArraySizeThreeAllEmpty(); - String[] stringArraySizeTwoWithEscapedComma(); + + String[] stringArraySizeThreeAllEmpty(); + + String[] stringArraySizeTwoWithEscapedComma(); + String[] stringArraySizeOneWithBackslashX(); + String[] stringArraySizeThreeWithDoubleBackslash(); boolean booleanFalse(); + boolean booleanTrue(); - + Map mapABCD(); + Map mapDCBA(); + Map mapBACD(); + Map mapBBB(); + Map mapXYZ(); - + // uncomment for desk tests - //Map mapWithMissingKey(); - + // Map mapWithMissingKey(); + // uncomment for desk tests - //Map mapEmpty(); + // Map mapEmpty(); }
diff --git a/user/test/com/google/gwt/i18n/client/TestConstantsWithLookup.java b/user/test/com/google/gwt/i18n/client/TestConstantsWithLookup.java index 2cad918..037cdc8 100644 --- a/user/test/com/google/gwt/i18n/client/TestConstantsWithLookup.java +++ b/user/test/com/google/gwt/i18n/client/TestConstantsWithLookup.java
@@ -1,6 +1,23 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.i18n.client; +/** + * TODO: document me. + */ public interface TestConstantsWithLookup extends TestConstants, ConstantsWithLookup { }
diff --git a/user/test/com/google/gwt/i18n/client/TestLeafBundle.java b/user/test/com/google/gwt/i18n/client/TestLeafBundle.java index af5a990..4dd101d 100644 --- a/user/test/com/google/gwt/i18n/client/TestLeafBundle.java +++ b/user/test/com/google/gwt/i18n/client/TestLeafBundle.java
@@ -1,5 +1,5 @@ /* - * Copyright 2006 Google Inc. + * Copyright 2007 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 @@ -13,41 +13,41 @@ * License for the specific language governing permissions and limitations under * the License. */ - package com.google.gwt.i18n.client; -public abstract class TestLeafBundle implements TestBinding{ +/** + * TODO: document me. + */ +public abstract class TestLeafBundle implements TestBinding { abstract public String b(); } - class TestLeafBundleImpl extends TestLeafBundle{ +class TestLeafBundleImpl extends TestLeafBundle { public String b() { return "TestLeafBundleImpl"; } public String a() { - throw new IllegalStateException("bad"); + throw new IllegalStateException("bad"); } } - - class TestLeafBundle_piglatin extends TestLeafBundleImpl{ - public String b(){ - return "TestLeafBundle_piglatin"; - } - } - - class TestLeafBundle_piglatin_UK extends TestLeafBundle_piglatin{ - public String b(){ - return "TestLeafBundle_piglatin_UK"; - } - } - - - class TestLeafBundle_piglatin_UK_win extends TestLeafBundleImpl{ - public String b(){ - return "TestLeafBundle_piglatin_UK_win"; - } - } +class TestLeafBundle_piglatin extends TestLeafBundleImpl { + public String b() { + return "TestLeafBundle_piglatin"; + } +} + +class TestLeafBundle_piglatin_UK extends TestLeafBundle_piglatin { + public String b() { + return "TestLeafBundle_piglatin_UK"; + } +} + +class TestLeafBundle_piglatin_UK_win extends TestLeafBundleImpl { + public String b() { + return "TestLeafBundle_piglatin_UK_win"; + } +}
diff --git a/user/test/com/google/gwt/i18n/client/TestTypedMessages.java b/user/test/com/google/gwt/i18n/client/TestTypedMessages.java index d4baa82..8152dfb 100644 --- a/user/test/com/google/gwt/i18n/client/TestTypedMessages.java +++ b/user/test/com/google/gwt/i18n/client/TestTypedMessages.java
@@ -16,6 +16,9 @@ package com.google.gwt.i18n.client; +/** + * TODO: document me. + */ public interface TestTypedMessages extends Messages { /** @@ -25,20 +28,19 @@ public String testAllTypes(int a, float f, long l, boolean bool, Object obj, char c, byte b, short s); - /* testLotsOfInts = {0}, {1},{2},{3} * */ + // testLotsOfInts = {0}, {1},{2},{3} public String testLotsOfInts(int a, int b, int c, int d); - /** testSomeObjectTypes = this({0}), StringBuffer({1}), Integer({2}), null{3}); */ + // testSomeObjectTypes = this({0}), StringBuffer({1}), Integer({2}), null{3}); public String testSomeObjectTypes(I18NTest test, StringBuffer buf, Integer i, Object giveMeANull); - /** testSingleQuotes = ''A'', ''{0}'', '',''' */ + // testSingleQuotes = ''A'', ''{0}'', '',''' public String testSingleQuotes(String someArg); - /** simpleMessageTest={0}( */ + // simpleMessageTest={0} String simpleMessageTest(float arg); - /** stringEscaping= "'\ \\ \\\ & \t \n\r\"\' \ end */ + // stringEscaping= "'\ \\ \\\ & \t \n\r\"\' \ end String stringEscaping(int a); - }
diff --git a/user/test/com/google/gwt/i18n/client/gen/Colors.java b/user/test/com/google/gwt/i18n/client/gen/Colors.java index 1be55e4..2da193e 100644 --- a/user/test/com/google/gwt/i18n/client/gen/Colors.java +++ b/user/test/com/google/gwt/i18n/client/gen/Colors.java
@@ -1,12 +1,26 @@ +/* + * Copyright 2007 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. + */ package com.google.gwt.i18n.client.gen; - /** - * Interface to represent the constants contained in resource bundle: - * 'C:/src-gwt/gwt-user/src/test/resources/com/google/gwt/i18n/client/gen/Colors.properties'. + * Interface to represent the constants contained in resource bundle: + * com/google/gwt/i18n/client/gen/Colors.properties. */ public interface Colors extends com.google.gwt.i18n.client.Constants { - + /** * Translated "ĝrééñ". *
diff --git a/user/test/com/google/gwt/i18n/client/gen/Shapes.java b/user/test/com/google/gwt/i18n/client/gen/Shapes.java index a98085e..089cd74 100644 --- a/user/test/com/google/gwt/i18n/client/gen/Shapes.java +++ b/user/test/com/google/gwt/i18n/client/gen/Shapes.java
@@ -1,12 +1,26 @@ +/* + * Copyright 2007 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. + */ package com.google.gwt.i18n.client.gen; - /** - * Interface to represent the constants contained in resource bundle: - * 'C:/src-gwt/gwt-user/src/test/resources/com/google/gwt/i18n/client/gen/Shapes.properties'. + * Interface to represent the constants contained in resource bundle: + * com/google/gwt/i18n/client/gen/Shapes.properties. */ public interface Shapes extends com.google.gwt.i18n.client.Constants { - + /** * Translated "a triangle". * @@ -16,9 +30,9 @@ String triangle(); /** - * Translated "a square ". + * Translated "a square ". * - * @return translated "a square " + * @return translated "a square " * @gwt.key square */ String square();
diff --git a/user/test/com/google/gwt/i18n/client/gen/SingleConstant.java b/user/test/com/google/gwt/i18n/client/gen/SingleConstant.java index d0910f1..57648d9 100644 --- a/user/test/com/google/gwt/i18n/client/gen/SingleConstant.java +++ b/user/test/com/google/gwt/i18n/client/gen/SingleConstant.java
@@ -1,12 +1,26 @@ +/* + * Copyright 2007 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. + */ package com.google.gwt.i18n.client.gen; - /** - * Interface to represent the constants contained in resource bundle: - * 'C:/src-gwt/gwt-user/src/test/resources/com/google/gwt/i18n/client/gen/SingleConstant.properties'. + * Interface to represent the constants contained in resource bundle: + * com/google/gwt/i18n/client/gen/SingleConstant.properties. */ public interface SingleConstant extends com.google.gwt.i18n.client.Constants { - + /** * Translated "me". *
diff --git a/user/test/com/google/gwt/i18n/client/gen/SingleMessages.java b/user/test/com/google/gwt/i18n/client/gen/SingleMessages.java index 6e5f1f0..a97c277 100644 --- a/user/test/com/google/gwt/i18n/client/gen/SingleMessages.java +++ b/user/test/com/google/gwt/i18n/client/gen/SingleMessages.java
@@ -1,12 +1,26 @@ +/* + * Copyright 2007 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. + */ package com.google.gwt.i18n.client.gen; - /** - * Interface to represent the messages contained in resource bundle: - * C:/src-gwt/gwt-user/src/test/resources/com/google/gwt/i18n/client/gen/SingleMessages.properties'. + * Interface to represent the messages contained in resource bundle: + * com/google/gwt/i18n/client/gen/SingleMessages.properties. */ public interface SingleMessages extends com.google.gwt.i18n.client.Messages { - + /** * Translated "me". *
diff --git a/user/test/com/google/gwt/i18n/client/gen/TestBadKeys.java b/user/test/com/google/gwt/i18n/client/gen/TestBadKeys.java index 2c6d524..08ca867 100644 --- a/user/test/com/google/gwt/i18n/client/gen/TestBadKeys.java +++ b/user/test/com/google/gwt/i18n/client/gen/TestBadKeys.java
@@ -1,51 +1,34 @@ +/* + * Copyright 2007 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. + */ package com.google.gwt.i18n.client.gen; /** * Interface to represent the constants contained in resource bundle: - * 'C:/src-gwt/gwt-user/src/test/resources/com/google/gwt/i18n/client/gen/TestBadKeys.properties'. + * com/google/gwt/i18n/client/gen/TestBadKeys.properties. */ public interface TestBadKeys extends com.google.gwt.i18n.client.ConstantsWithLookup { /** - * Translated "zh_spacer". + * Translated "_". * - * @return translated "zh_spacer" - * @gwt.key zh.spacer + * @return translated "_" + * @gwt.key - */ - String zh_spacer(); - - /** - * Translated "logger_org_hibernate_jdbc". - * - * @return translated "logger_org_hibernate_jdbc" - * @gwt.key logger.org.hibernate.jdbc - */ - String logger_org_hibernate_jdbc(); - - /** - * Translated "cell_2_5". - * - * @return translated "cell_2_5" - * @gwt.key cell.2.5 - */ - String cell_2_5(); - - /** - * Translated "_level". - * - * @return translated "_level" - * @gwt.key .level - */ - String _level(); - - /** - * Translated "__s". - * - * @return translated "__s" - * @gwt.key --s - */ - String __s(); + String _(); /** * Translated @@ -58,6 +41,22 @@ String ________________________________________________________________(); /** + * Translated "__dup". + * + * @return translated "__dup" + * @gwt.key . + */ + String __dup(); + + /** + * Translated "__s". + * + * @return translated "__s" + * @gwt.key --s + */ + String __s(); + + /** * Translated "__s_dup". * * @return translated "__s_dup" @@ -66,78 +65,6 @@ String __s_dup(); /** - * Translated "_". - * - * @return translated "_" - * @gwt.key - - */ - String _(); - - /** - * Translated "maven_jdiff_old_tag". - * - * @return translated "maven_jdiff_old_tag" - * @gwt.key maven.jdiff.old.tag - */ - String maven_jdiff_old_tag(); - - /** - * Translated "maven_checkstyle_properties". - * - * @return translated "maven_checkstyle_properties" - * @gwt.key maven.checkstyle.properties - */ - String maven_checkstyle_properties(); - - /** - * Translated "_1_2_3_4". - * - * @return translated "_1_2_3_4" - * @gwt.key _1.2.3.4 - */ - String _1_2_3_4(); - - /** - * Translated "entity_160". - * - * @return translated "entity_160" - * @gwt.key entity.160 - */ - String entity_160(); - - /** - * Translated "a__b". - * - * @return translated "a__b" - * @gwt.key a-.b - */ - String a__b(); - - /** - * Translated "AWT_f5". - * - * @return translated "AWT_f5" - * @gwt.key AWT.f5 - */ - String AWT_f5(); - - /** - * Translated "Cursor_MoveDrop_32x32_File". - * - * @return translated "Cursor_MoveDrop_32x32_File" - * @gwt.key Cursor.MoveDrop.32x32.File - */ - String Cursor_MoveDrop_32x32_File(); - - /** - * Translated "_c_____". - * - * @return translated "_c_____" - * @gwt.key -c..-.- - */ - String _c_____(); - - /** * Translated "__s_dup_dup". * * @return translated "__s_dup_dup" @@ -146,12 +73,44 @@ String __s_dup_dup(); /** - * Translated "__dup". + * Translated "_1_2_3_4". * - * @return translated "__dup" - * @gwt.key . + * @return translated "_1_2_3_4" + * @gwt.key _1.2.3.4 */ - String __dup(); + String _1_2_3_4(); + + /** + * Translated "_c_____". + * + * @return translated "_c_____" + * @gwt.key -c..-.- + */ + String _c_____(); + + /** + * Translated "_level". + * + * @return translated "_level" + * @gwt.key .level + */ + String _level(); + + /** + * Translated "a__b". + * + * @return translated "a__b" + * @gwt.key a-.b + */ + String a__b(); + + /** + * Translated "a_b_c". + * + * @return translated "a_b_c" + * @gwt.key a-b-c + */ + String a_b_c(); /** * Translated "AWT_end". @@ -162,6 +121,62 @@ String AWT_end(); /** + * Translated "AWT_f5". + * + * @return translated "AWT_f5" + * @gwt.key AWT.f5 + */ + String AWT_f5(); + + /** + * Translated "cell_2_5". + * + * @return translated "cell_2_5" + * @gwt.key cell.2.5 + */ + String cell_2_5(); + + /** + * Translated "Cursor_MoveDrop_32x32_File". + * + * @return translated "Cursor_MoveDrop_32x32_File" + * @gwt.key Cursor.MoveDrop.32x32.File + */ + String Cursor_MoveDrop_32x32_File(); + + /** + * Translated "entity_160". + * + * @return translated "entity_160" + * @gwt.key entity.160 + */ + String entity_160(); + + /** + * Translated "logger_org_hibernate_jdbc". + * + * @return translated "logger_org_hibernate_jdbc" + * @gwt.key logger.org.hibernate.jdbc + */ + String logger_org_hibernate_jdbc(); + + /** + * Translated "maven_checkstyle_properties". + * + * @return translated "maven_checkstyle_properties" + * @gwt.key maven.checkstyle.properties + */ + String maven_checkstyle_properties(); + + /** + * Translated "maven_jdiff_old_tag". + * + * @return translated "maven_jdiff_old_tag" + * @gwt.key maven.jdiff.old.tag + */ + String maven_jdiff_old_tag(); + + /** * Translated "permissions_755". * * @return translated "permissions_755" @@ -170,10 +185,10 @@ String permissions_755(); /** - * Translated "a_b_c". + * Translated "zh_spacer". * - * @return translated "a_b_c" - * @gwt.key a-b-c + * @return translated "zh_spacer" + * @gwt.key zh.spacer */ - String a_b_c(); + String zh_spacer(); }
diff --git a/user/test/com/google/gwt/i18n/client/gen/TestMessages.java b/user/test/com/google/gwt/i18n/client/gen/TestMessages.java index dc89572..204b45b 100644 --- a/user/test/com/google/gwt/i18n/client/gen/TestMessages.java +++ b/user/test/com/google/gwt/i18n/client/gen/TestMessages.java
@@ -1,19 +1,34 @@ +/* + * Copyright 2007 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. + */ package com.google.gwt.i18n.client.gen; - /** - * Interface to represent the messages contained in resource bundle: - * C:/src-gwt/gwt-user/src/test/resources/com/google/gwt/i18n/client/gen/TestMessages.properties'. + * Interface to represent the messages contained in resource bundle + * com/google/gwt/i18n/client/gen/TestMessages.properties. */ public interface TestMessages extends com.google.gwt.i18n.client.Messages { - + /** * Translated "{0},{1}, "a","b", "{0}", "{1}", ''a'', 'b', '{0}', ''{1}''". * - * @return translated "{0},{1}, "a","b", "{0}", "{1}", ''a'', 'b', '{0}', ''{1}''" + * @return translated "{0},{1}, "a","b", "{0}", "{1}", ''a'', 'b', '{0}', + * ''{1}''" * @gwt.key argsWithQuotes */ - String argsWithQuotes(String arg0, String arg1); + String argsWithQuotes(String arg0, String arg1); /** * Translated "{1} is the second arg, {0} is the first". @@ -21,7 +36,7 @@ * @return translated "{1} is the second arg, {0} is the first" * @gwt.key args2 */ - String args2(String arg0, String arg1); + String args2(String arg0, String arg1); /** * Translated "no args". @@ -61,7 +76,7 @@ * @return translated "repeatedArgs: {0}, {1}, {0}, {1}, {0}, {1}, {0}, {1}" * @gwt.key testLotsOfUsageOfArgs */ - String testLotsOfUsageOfArgs(String arg0, String arg1); + String testLotsOfUsageOfArgs(String arg0, String arg1); /** * Translated "{0},{1},{2},{3},{4},{5},{6},{7},{8},{9}". @@ -69,7 +84,9 @@ * @return translated "{0},{1},{2},{3},{4},{5},{6},{7},{8},{9}" * @gwt.key args10 */ - String args10(String arg0, String arg1, String arg2, String arg3, String arg4, String arg5, String arg6, String arg7, String arg8, String arg9); + String args10(String arg0, String arg1, String arg2, String arg3, + String arg4, String arg5, String arg6, String arg7, String arg8, + String arg9); /** * Translated "お{0}你{1}好". @@ -77,7 +94,7 @@ * @return translated "お{0}你{1}好" * @gwt.key unicode */ - String unicode(String arg0, String arg1); + String unicode(String arg0, String arg1); /** * Translated "{0} is a arg".
diff --git a/user/test/com/google/gwt/i18n/client/resolutiontest/Inners.java b/user/test/com/google/gwt/i18n/client/resolutiontest/Inners.java index 4091ee6..5dc4436 100644 --- a/user/test/com/google/gwt/i18n/client/resolutiontest/Inners.java +++ b/user/test/com/google/gwt/i18n/client/resolutiontest/Inners.java
@@ -63,7 +63,6 @@ } } - /** * Test Extension of Inner Inner. */ @@ -138,21 +137,18 @@ public String string() { return "piglatin"; } - } /** Tests Protected Inner Class. */ public String testExtendsAnotherInner() { - ExtendsAnotherInner clazz = (ExtendsAnotherInner) GWT - .create(ExtendsAnotherInner.class); + ExtendsAnotherInner clazz = (ExtendsAnotherInner) GWT.create(ExtendsAnotherInner.class); Map answer = clazz.extendsAnotherInner(); return answer.toString(); } /** Test for ExtendProtectedInner. */ public String testExtendsProtectedInner() { - ExtendProtectedInner inner = (ExtendsAnotherInner.ExtendProtectedInner) GWT - .create(ExtendProtectedInner.class); + ExtendProtectedInner inner = (ExtendsAnotherInner.ExtendProtectedInner) GWT.create(ExtendProtectedInner.class); return inner.extendProtectedInner(); }
diff --git a/user/test/com/google/gwt/i18n/rebind/util/AbstractResourceTest.java b/user/test/com/google/gwt/i18n/rebind/util/AbstractResourceTest.java index 2e49b6c..928e96d 100644 --- a/user/test/com/google/gwt/i18n/rebind/util/AbstractResourceTest.java +++ b/user/test/com/google/gwt/i18n/rebind/util/AbstractResourceTest.java
@@ -1,4 +1,18 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.i18n.rebind.util; import com.google.gwt.i18n.client.ColorsAndShapes; @@ -14,6 +28,9 @@ import java.io.UnsupportedEncodingException; import java.util.Locale; +/** + * TODO: document me. + */ public class AbstractResourceTest extends TestCase { static Locale pigLatin = new Locale("piglatin"); public static final String UNICODE = "Îñţérñåţîöñåļîžåţîöñ";
diff --git a/user/test/com/google/gwt/i18n/tools/I18NSyncTest_.java b/user/test/com/google/gwt/i18n/tools/I18NSyncTest_.java index 9ce2f2b..ebd0d9f 100644 --- a/user/test/com/google/gwt/i18n/tools/I18NSyncTest_.java +++ b/user/test/com/google/gwt/i18n/tools/I18NSyncTest_.java
@@ -1,4 +1,18 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.i18n.tools; import junit.framework.TestCase; @@ -7,7 +21,8 @@ import java.io.IOException; /** - * Testing <code>I18NSync</code>.Cannot be currently run as part of automated junit tests due to it's code generation. + * Testing <code>I18NSync</code>.Cannot be currently run as part of automated + * junit tests due to it's code generation. */ public class I18NSyncTest_ extends TestCase { static final File CLIENT_SOURCE_DIR = new File("../../gwt-user/src/test/java"); @@ -38,8 +53,7 @@ public void testFileIsDirCase() { try { - I18NSync - .createMessagesInterfaceFromClassName(CLIENT_SOURCE_PACKAGE, null); + I18NSync.createMessagesInterfaceFromClassName(CLIENT_SOURCE_PACKAGE, null); fail("Should have thrown IOException"); } catch (IOException e) { assertEquals(-1, e.getMessage().indexOf("directory")); @@ -49,12 +63,12 @@ public void testMainAccess() { // Cannot check bad ones due to System.exit(1); String[] constants = { - CLIENT_SOURCE_PACKAGE + "Shapes", "-out", CLIENT_SOURCE_DIR.getPath()}; + CLIENT_SOURCE_PACKAGE + "Shapes", "-out", CLIENT_SOURCE_DIR.getPath()}; I18NSync.main(constants); String[] messages = { - "-createMessages", CLIENT_SOURCE_PACKAGE + "SingleMessages", "-out", - CLIENT_SOURCE_DIR.getPath()}; + "-createMessages", CLIENT_SOURCE_PACKAGE + "SingleMessages", "-out", + CLIENT_SOURCE_DIR.getPath()}; I18NSync.main(messages); } @@ -66,10 +80,9 @@ public void testMethodRenaming() throws IOException { String className = CLIENT_SOURCE_PACKAGE + "TestBadKeys"; I18NSync.createConstantsWithLookupInterfaceFromClassName(className, - CLIENT_SOURCE_DIR); + CLIENT_SOURCE_DIR); } - public void testWarning() throws IOException { String className = CLIENT_SOURCE_PACKAGE + "TestReallyBadKeys"; I18NSync.createConstantsWithLookupInterfaceFromClassName(className);
diff --git a/user/test/com/google/gwt/json/client/JSONTest.java b/user/test/com/google/gwt/json/client/JSONTest.java index 97f1dfe..0da0d49 100644 --- a/user/test/com/google/gwt/json/client/JSONTest.java +++ b/user/test/com/google/gwt/json/client/JSONTest.java
@@ -1,31 +1,47 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.json.client; import com.google.gwt.junit.client.GWTTestCase; +/** + * TODO: document me. + */ public class JSONTest extends GWTTestCase { - static final String menuTest = - "{\"menu\": {\n" + " \"id\": \"file\",\n" + " \"value\": \"File:\",\n" - + " \"popup\": {\n" + " \"menuitem\": [\n" - + " {\"value\": \"New\", \"onclick\": \"CreateNewDoc()\"},\n" - + " {\"value\": \"Open\", \"onclick\": \"OpenDoc()\"},\n" - + " {\"value\": \"Close\", \"onclick\": \"CloseDoc()\"}\n" - + " ]\n" + " }\n" + "}}\n" + ""; + static final String menuTest = "{\"menu\": {\n" + " \"id\": \"file\",\n" + + " \"value\": \"File:\",\n" + " \"popup\": {\n" + + " \"menuitem\": [\n" + + " {\"value\": \"New\", \"onclick\": \"CreateNewDoc()\"},\n" + + " {\"value\": \"Open\", \"onclick\": \"OpenDoc()\"},\n" + + " {\"value\": \"Close\", \"onclick\": \"CloseDoc()\"}\n" + + " ]\n" + " }\n" + "}}\n" + ""; - static final String widgetTest = - "{\"widget\": {\n" - + " \"debug\": \"on\",\n" - + " \"window\": {\n" - + " \"title\": \"Sample Konfabulator Widget\", \"name\": \"main_window\", \"width\": 500, \"height\": 500\n" - + " }, \"image\": { \n" - + " \"src\": \"Images/Sun.png\",\n" - + " \"name\": \"sun1\", \"hOffset\": 250, \"vOffset\": 250, \"alignment\": \"center\"\n" - + " }, \"text\": {\n" - + " \"data\": \"Click Here\",\n" - + " \"size\": 36,\n" - + " \"style\": \"bold\", \"name\": \"text1\", \"hOffset\": 250, \"vOffset\": 100, \"alignment\": \"center\",\n" - + " \"onMouseUp\": \"sun1.opacity = (sun1.opacity / 100) * 90;\"\n" - + " }\n" + "}} \n" + ""; + static final String widgetTest = "{\"widget\": {\n" + + " \"debug\": \"on\",\n" + + " \"window\": {\n" + + " \"title\": \"Sample Konfabulator Widget\", \"name\": \"main_window\", \"width\": 500, \"height\": 500\n" + + " }, \"image\": { \n" + + " \"src\": \"Images/Sun.png\",\n" + + " \"name\": \"sun1\", \"hOffset\": 250, \"vOffset\": 250, \"alignment\": \"center\"\n" + + " }, \"text\": {\n" + + " \"data\": \"Click Here\",\n" + + " \"size\": 36,\n" + + " \"style\": \"bold\", \"name\": \"text1\", \"hOffset\": 250, \"vOffset\": 100, \"alignment\": \"center\",\n" + + " \"onMouseUp\": \"sun1.opacity = (sun1.opacity / 100) * 90;\"\n" + + " }\n" + "}} \n" + ""; /** * Returns the module name for GWT unit test running. @@ -51,17 +67,18 @@ assertEquals(n, a.get(1)); } - /** Test deep recursion of arrays */ + /** + * Test deep recursion of arrays. + */ public void testArrayOfArraysOfArrays() { JSONArray array = populateRecursiveArray(3, 5); assertEquals( - "[[[[[[],[],[]],[[],[],[]],[[],[],[]]],[[[],[],[]],[[],[],[]],[[],[],[]]],[[[],[],[]],[[],[],[]],[[],[],[]]]],[[[[],[],[]],[[],[],[]],[[],[],[]]],[[[],[],[]],[[],[],[]],[[],[],[]]],[[[],[],[]],[[],[],[]],[[],[],[]]]],[[[[],[],[]],[[],[],[]],[[],[],[]]],[[[],[],[]],[[],[],[]],[[],[],[]]],[[[],[],[]],[[],[],[]],[[],[],[]]]]],[[[[[],[],[]],[[],[],[]],[[],[],[]]],[[[],[],[]],[[],[],[]],[[],[],[]]],[[[],[],[]],[[],[],[]],[[],[],[]]]],[[[[],[],[]],[[],[],[]],[[],[],[]]],[[[],[],[]],[[],[],[]],[[],[],[]]],[[[],[],[]],[[],[],[]],[[],[],[]]]],[[[[],[],[]],[[],[],[]],[[],[],[]]],[[[],[],[]],[[],[],[]],[[],[],[]]],[[[],[],[]],[[],[],[]],[[],[],[]]]]],[[[[[],[],[]],[[],[],[]],[[],[],[]]],[[[],[],[]],[[],[],[]],[[],[],[]]],[[[],[],[]],[[],[],[]],[[],[],[]]]],[[[[],[],[]],[[],[],[]],[[],[],[]]],[[[],[],[]],[[],[],[]],[[],[],[]]],[[[],[],[]],[[],[],[]],[[],[],[]]]],[[[[],[],[]],[[],[],[]],[[],[],[]]],[[[],[],[]],[[],[],[]],[[],[],[]]],[[[],[],[]],[[],[],[]],[[],[],[]]]]]]", - array.toString()); + "[[[[[[],[],[]],[[],[],[]],[[],[],[]]],[[[],[],[]],[[],[],[]],[[],[],[]]],[[[],[],[]],[[],[],[]],[[],[],[]]]],[[[[],[],[]],[[],[],[]],[[],[],[]]],[[[],[],[]],[[],[],[]],[[],[],[]]],[[[],[],[]],[[],[],[]],[[],[],[]]]],[[[[],[],[]],[[],[],[]],[[],[],[]]],[[[],[],[]],[[],[],[]],[[],[],[]]],[[[],[],[]],[[],[],[]],[[],[],[]]]]],[[[[[],[],[]],[[],[],[]],[[],[],[]]],[[[],[],[]],[[],[],[]],[[],[],[]]],[[[],[],[]],[[],[],[]],[[],[],[]]]],[[[[],[],[]],[[],[],[]],[[],[],[]]],[[[],[],[]],[[],[],[]],[[],[],[]]],[[[],[],[]],[[],[],[]],[[],[],[]]]],[[[[],[],[]],[[],[],[]],[[],[],[]]],[[[],[],[]],[[],[],[]],[[],[],[]]],[[[],[],[]],[[],[],[]],[[],[],[]]]]],[[[[[],[],[]],[[],[],[]],[[],[],[]]],[[[],[],[]],[[],[],[]],[[],[],[]]],[[[],[],[]],[[],[],[]],[[],[],[]]]],[[[[],[],[]],[[],[],[]],[[],[],[]]],[[[],[],[]],[[],[],[]],[[],[],[]]],[[[],[],[]],[[],[],[]],[[],[],[]]]],[[[[],[],[]],[[],[],[]],[[],[],[]]],[[[],[],[]],[[],[],[]],[[],[],[]]],[[[],[],[]],[[],[],[]],[[],[],[]]]]]]", + array.toString()); // now to access for (int i = 0; i < 5; i++) { array = (JSONArray) array.get(0); } - } /** @@ -78,8 +95,8 @@ assertTrue("v must be an array", array != null); assertEquals("Array size must be 10", 10, array.size()); for (int i = 0; i < 10; i++) { - assertEquals("Array value at " + i + " must be " + i, array.get(i) - .isNumber().getValue(), i, 0.001); + assertEquals("Array value at " + i + " must be " + i, + array.get(i).isNumber().getValue(), i, 0.001); } } @@ -112,11 +129,9 @@ charsToEscape[38] = '\t'; charsToEscape[39] = '/'; for (int i = 1; i < 40; i++) { - o.put("c" + i, - new JSONString(new Character(charsToEscape[i]).toString())); + o.put("c" + i, new JSONString(new Character(charsToEscape[i]).toString())); } - assertEquals( - "{\"c1\":\"\\u0001\", \"c2\":\"\\u0002\", " + assertEquals("{\"c1\":\"\\u0001\", \"c2\":\"\\u0002\", " + "\"c3\":\"\\u0003\", \"c4\":\"\\u0004\", \"c5\":\"\\u0005\", " + "\"c6\":\"\\u0006\", \"c7\":\"\\u0007\", \"c8\":\"\\b\", " + "\"c9\":\"\\t\", \"c10\":\"\\n\", \"c11\":\"\\u000B\", " @@ -153,41 +168,42 @@ String s1 = obj.toString(); String s2 = JSONParser.parse(s1).toString(); assertEquals(s1, s2); - assertEquals("{\"string3\":\"s3\", \"Number3\":3.1, \"Boolean3\":false, " - + "\"Null3\":null, \"object3\":{\"string2\":\"s2\", \"Number2\":2.1, " - + "\"Boolean2\":true, \"Null2\":null, \"object2\":{\"string1\":\"s1\"," - + " \"Number1\":1.1, \"Boolean1\":false, \"Null1\":null, \"object1\":{" - + "\"string0\":\"s0\", \"Number0\":0.1, \"Boolean0\":true, " - + "\"Null0\":null, \"object0\":{}, " - + "\"Array0\":[\"s0\",0.1,true,null,{}]}, " - + "\"Array1\":[\"s1\",1.1,false,null,{\"string0\":\"s0\", " - + "\"Number0\":0.1, \"Boolean0\":true, \"Null0\":null, \"object0\":{}, " - + "\"Array0\":[\"s0\",0.1,true,null,{}]}]}, " - + "\"Array2\":[\"s2\",2.1,true,null,{\"string1\":\"s1\", " - + "\"Number1\":1.1, \"Boolean1\":false, \"Null1\":null, " - + "\"object1\":{\"string0\":\"s0\", \"Number0\":0.1, " - + "\"Boolean0\":true, \"Null0\":null, \"object0\":{}, " - + "\"Array0\":[\"s0\",0.1,true,null,{}]}, " - + "\"Array1\":[\"s1\",1.1,false,null,{\"string0\":\"s0\", " - + "\"Number0\":0.1, \"Boolean0\":true, \"Null0\":null, " - + "\"object0\":{}, \"Array0\":[\"s0\",0.1,true,null,{}]}]}]}, " - + "\"Array3\":[\"s3\",3.1,false,null,{\"string2\":\"s2\", " - + "\"Number2\":2.1, \"Boolean2\":true, \"Null2\":null, " - + "\"object2\":{\"string1\":\"s1\", \"Number1\":1.1, " - + "\"Boolean1\":false, \"Null1\":null, \"object1\":{\"string0\":\"s0\"," - + " \"Number0\":0.1, \"Boolean0\":true, \"Null0\":null, \"object0\":{}, " - + "\"Array0\":[\"s0\",0.1,true,null,{}]}, " - + "\"Array1\":[\"s1\",1.1,false,null,{\"string0\":\"s0\", " - + "\"Number0\":0.1, \"Boolean0\":true, \"Null0\":null, " - + "\"object0\":{}, \"Array0\":[\"s0\",0.1,true,null,{}]}]}, " - + "\"Array2\":[\"s2\",2.1,true,null,{\"string1\":\"s1\", " - + "\"Number1\":1.1, \"Boolean1\":false, \"Null1\":null, " - + "\"object1\":{\"string0\":\"s0\", \"Number0\":0.1, " - + "\"Boolean0\":true, \"Null0\":null, \"object0\":{}, " - + "\"Array0\":[\"s0\",0.1,true,null,{}]}, " - + "\"Array1\":[\"s1\",1.1,false,null,{\"string0\":\"s0\", " - + "\"Number0\":0.1, \"Boolean0\":true, \"Null0\":null, \"object0\":{}," - + " \"Array0\":[\"s0\",0.1,true,null,{}]}]}]}]}", obj.toString()); + assertEquals( + "{\"string3\":\"s3\", \"Number3\":3.1, \"Boolean3\":false, " + + "\"Null3\":null, \"object3\":{\"string2\":\"s2\", \"Number2\":2.1, " + + "\"Boolean2\":true, \"Null2\":null, \"object2\":{\"string1\":\"s1\"," + + " \"Number1\":1.1, \"Boolean1\":false, \"Null1\":null, \"object1\":{" + + "\"string0\":\"s0\", \"Number0\":0.1, \"Boolean0\":true, " + + "\"Null0\":null, \"object0\":{}, " + + "\"Array0\":[\"s0\",0.1,true,null,{}]}, " + + "\"Array1\":[\"s1\",1.1,false,null,{\"string0\":\"s0\", " + + "\"Number0\":0.1, \"Boolean0\":true, \"Null0\":null, \"object0\":{}, " + + "\"Array0\":[\"s0\",0.1,true,null,{}]}]}, " + + "\"Array2\":[\"s2\",2.1,true,null,{\"string1\":\"s1\", " + + "\"Number1\":1.1, \"Boolean1\":false, \"Null1\":null, " + + "\"object1\":{\"string0\":\"s0\", \"Number0\":0.1, " + + "\"Boolean0\":true, \"Null0\":null, \"object0\":{}, " + + "\"Array0\":[\"s0\",0.1,true,null,{}]}, " + + "\"Array1\":[\"s1\",1.1,false,null,{\"string0\":\"s0\", " + + "\"Number0\":0.1, \"Boolean0\":true, \"Null0\":null, " + + "\"object0\":{}, \"Array0\":[\"s0\",0.1,true,null,{}]}]}]}, " + + "\"Array3\":[\"s3\",3.1,false,null,{\"string2\":\"s2\", " + + "\"Number2\":2.1, \"Boolean2\":true, \"Null2\":null, " + + "\"object2\":{\"string1\":\"s1\", \"Number1\":1.1, " + + "\"Boolean1\":false, \"Null1\":null, \"object1\":{\"string0\":\"s0\"," + + " \"Number0\":0.1, \"Boolean0\":true, \"Null0\":null, \"object0\":{}, " + + "\"Array0\":[\"s0\",0.1,true,null,{}]}, " + + "\"Array1\":[\"s1\",1.1,false,null,{\"string0\":\"s0\", " + + "\"Number0\":0.1, \"Boolean0\":true, \"Null0\":null, " + + "\"object0\":{}, \"Array0\":[\"s0\",0.1,true,null,{}]}]}, " + + "\"Array2\":[\"s2\",2.1,true,null,{\"string1\":\"s1\", " + + "\"Number1\":1.1, \"Boolean1\":false, \"Null1\":null, " + + "\"object1\":{\"string0\":\"s0\", \"Number0\":0.1, " + + "\"Boolean0\":true, \"Null0\":null, \"object0\":{}, " + + "\"Array0\":[\"s0\",0.1,true,null,{}]}, " + + "\"Array1\":[\"s1\",1.1,false,null,{\"string0\":\"s0\", " + + "\"Number0\":0.1, \"Boolean0\":true, \"Null0\":null, \"object0\":{}," + + " \"Array0\":[\"s0\",0.1,true,null,{}]}]}]}]}", obj.toString()); } public void testNumberBasics() { @@ -216,7 +232,7 @@ } /** - * Tests an object whose keys are filled out with numbers, like {"a": + * Tests an object whose keys are filled out with numbers, like {"a":1}. */ public void testObjectOfNumbers() { JSONObject obj = new JSONObject(); @@ -229,8 +245,8 @@ assertTrue("v must be an object", objIn != null); assertEquals("Object size must be 10", 10, objIn.keySet().size()); for (int i = 0; i < 10; i++) { - assertEquals("Object value at 'Object " + i + "' must be " + i, objIn - .get("Object " + i).isNumber().getValue(), i, 0.001); + assertEquals("Object value at 'Object " + i + "' must be " + i, + objIn.get("Object " + i).isNumber().getValue(), i, 0.001); } } @@ -259,23 +275,23 @@ } catch (JSONException e) { } assertEquals("\"null\" should be null JSONValue", JSONNull.getInstance(), - JSONParser.parse("null")); - assertEquals("5 should be JSONNumber 5", 5d, JSONParser.parse("5") - .isNumber().getValue(), 0.001); + JSONParser.parse("null")); + assertEquals("5 should be JSONNumber 5", 5d, + JSONParser.parse("5").isNumber().getValue(), 0.001); assertEquals("\"null\" should be null JSONValue", JSONNull.getInstance(), - JSONParser.parse("null")); + JSONParser.parse("null")); JSONValue somethingHello = JSONParser.parse("[{\"something\":\"hello\"}]"); JSONArray somethingHelloArray = somethingHello.isArray(); assertTrue("somethingHello must be a JSONArray", - somethingHelloArray != null); + somethingHelloArray != null); assertTrue("somethingHello size must be one", - somethingHelloArray.size() == 1); + somethingHelloArray.size() == 1); JSONObject somethingHelloObject = somethingHelloArray.get(0).isObject(); assertTrue("somethingHello element 0 must be a JSONObject", - somethingHelloObject != null); + somethingHelloObject != null); assertTrue("somethingHello element 0 must have hello for key something", - somethingHelloObject.get("something").isString().stringValue().equals( - "hello")); + somethingHelloObject.get("something").isString().stringValue().equals( + "hello")); } public void testSimpleNested() { @@ -294,9 +310,8 @@ j3.put("j2", j2); assertEquals( - "{\"j1\":{\"test1\":\"\"}, \"j2\":{\"test1\":\"\", \"j2_2\":{\"test1_2\":\"\"}}}", - j3.toString()); - + "{\"j1\":{\"test1\":\"\"}, \"j2\":{\"test1\":\"\", \"j2_2\":{\"test1_2\":\"\"}}}", + j3.toString()); } public void testStringBasics() { @@ -371,7 +386,6 @@ newArray.set(i, childArray); } return newArray; - } }
diff --git a/user/test/com/google/gwt/junit/client/GWTTestCaseTest.java b/user/test/com/google/gwt/junit/client/GWTTestCaseTest.java index 08e4f20..34f320a 100644 --- a/user/test/com/google/gwt/junit/client/GWTTestCaseTest.java +++ b/user/test/com/google/gwt/junit/client/GWTTestCaseTest.java
@@ -1,4 +1,19 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ + /* * Portions copyright 2006 Mat Gessel <mat.gessel@gmail.com>; licensed under * Apache 2.0 @@ -14,32 +29,32 @@ public class GWTTestCaseTest extends GWTTestCase { private static void assertNotEquals(double a, double b, double delta) { - boolean failed = false; + boolean failed = false; try { assertEquals(a, b, delta); } catch (AssertionFailedError e) { // EXPECTED failed = true; } - + if (!failed) { fail("Expected failure for assertEquals(" + a + ", " + b + ", " + delta - + ")"); + + ")"); } } private static void assertNotEquals(float a, float b, float delta) { - boolean failed = false; + boolean failed = false; try { assertEquals(a, b, delta); } catch (AssertionFailedError e) { // EXPECTED failed = true; } - + if (!failed) { fail("Expected failure for assertEquals(" + a + ", " + b + ", " + delta - + ")"); + + ")"); } }
diff --git a/user/test/com/google/gwt/junit/client/TestManualAsync.java b/user/test/com/google/gwt/junit/client/TestManualAsync.java index 53e22d9..514da85 100644 --- a/user/test/com/google/gwt/junit/client/TestManualAsync.java +++ b/user/test/com/google/gwt/junit/client/TestManualAsync.java
@@ -1,4 +1,18 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.junit.client; import com.google.gwt.user.client.Timer;
diff --git a/user/test/com/google/gwt/module/client/DoubleScriptInjectionApp.java b/user/test/com/google/gwt/module/client/DoubleScriptInjectionApp.java index 7b4ff4d..2dbc46f 100644 --- a/user/test/com/google/gwt/module/client/DoubleScriptInjectionApp.java +++ b/user/test/com/google/gwt/module/client/DoubleScriptInjectionApp.java
@@ -1,8 +1,26 @@ +/* + * Copyright 2007 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. + */ package com.google.gwt.module.client; import com.google.gwt.core.client.EntryPoint; import com.google.gwt.user.client.Window; +/** + * TODO: document me. + */ public class DoubleScriptInjectionApp implements EntryPoint { public void onModuleLoad() {
diff --git a/user/test/com/google/gwt/module/client/DoubleScriptInjectionTest.java b/user/test/com/google/gwt/module/client/DoubleScriptInjectionTest.java index 8873ae3..2aac82d 100644 --- a/user/test/com/google/gwt/module/client/DoubleScriptInjectionTest.java +++ b/user/test/com/google/gwt/module/client/DoubleScriptInjectionTest.java
@@ -1,3 +1,18 @@ +/* + * Copyright 2007 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. + */ package com.google.gwt.module.client; import com.google.gwt.junit.client.GWTTestCase;
diff --git a/user/test/com/google/gwt/module/client/SingleScriptInjectionTest.java b/user/test/com/google/gwt/module/client/SingleScriptInjectionTest.java index 3db9404..b395187 100644 --- a/user/test/com/google/gwt/module/client/SingleScriptInjectionTest.java +++ b/user/test/com/google/gwt/module/client/SingleScriptInjectionTest.java
@@ -1,9 +1,25 @@ +/* + * Copyright 2007 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. + */ package com.google.gwt.module.client; import com.google.gwt.junit.client.GWTTestCase; /** * Tests waiting on a single external script. + * * @see com.google.gwt.module.client.DoubleScriptInjectionTest */ public class SingleScriptInjectionTest extends GWTTestCase {
diff --git a/user/test/com/google/gwt/user/RPCSuite.java b/user/test/com/google/gwt/user/RPCSuite.java index c07c4e7..3dcc3eb 100644 --- a/user/test/com/google/gwt/user/RPCSuite.java +++ b/user/test/com/google/gwt/user/RPCSuite.java
@@ -1,3 +1,18 @@ +/* + * Copyright 2007 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. + */ package com.google.gwt.user; import com.google.gwt.user.client.rpc.CollectionsTest; @@ -9,16 +24,19 @@ import junit.framework.Test; import junit.framework.TestSuite; +/** + * TODO: document me. + */ public class RPCSuite { public static Test suite() { TestSuite suite = new TestSuite("Test for com.google.gwt.user.client.rpc"); - + suite.addTestSuite(ValueTypesTest.class); suite.addTestSuite(InheritanceTest.class); suite.addTestSuite(CollectionsTest.class); suite.addTestSuite(CustomFieldSerializerTest.class); suite.addTestSuite(ObjectGraphTest.class); - + return suite; } }
diff --git a/user/test/com/google/gwt/user/client/CookieTest.java b/user/test/com/google/gwt/user/client/CookieTest.java index bb39bfd..d48169e 100644 --- a/user/test/com/google/gwt/user/client/CookieTest.java +++ b/user/test/com/google/gwt/user/client/CookieTest.java
@@ -1,9 +1,27 @@ +/* + * Copyright 2007 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. + */ package com.google.gwt.user.client; import com.google.gwt.junit.client.GWTTestCase; import java.util.Date; +/** + * TODO: document me. + */ public class CookieTest extends GWTTestCase { public String getModuleName() {
diff --git a/user/test/com/google/gwt/user/client/Profile.java b/user/test/com/google/gwt/user/client/Profile.java index f0b7309..abbbacb 100644 --- a/user/test/com/google/gwt/user/client/Profile.java +++ b/user/test/com/google/gwt/user/client/Profile.java
@@ -1,5 +1,5 @@ /* - * Copyright 2006 Google Inc. + * Copyright 2007 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 @@ -13,14 +13,15 @@ * License for the specific language governing permissions and limitations under * the License. */ - - package com.google.gwt.user.client; import com.google.gwt.junit.client.GWTTestCase; import com.google.gwt.user.client.ui.Label; import com.google.gwt.user.client.ui.RootPanel; +/** + * TODO: document me. + */ public abstract class Profile extends GWTTestCase { public static String REPORT_TO_BROWSER = "Report to Browser"; @@ -37,8 +38,7 @@ private void browserTiming(String s) { long elapsed = System.currentTimeMillis() - time; RootPanel.get().add( - new Label("|" + browser + "|" + s + "|" + elapsed + " milliseconds|")); - + new Label("|" + browser + "|" + s + "|" + elapsed + " milliseconds|")); } protected void resetTimer() { @@ -54,7 +54,7 @@ browserTiming(s); } else if (reportType == REPORT_TO_WIKI) { this.addCheckpoint("|" + browser + "|" + s + "|" + elapsed - + " milliseconds|"); + + " milliseconds|"); } else if (reportType == REPORT_TO_EXCEL) { s = s.replace('|', '\t'); this.addCheckpoint(browser + "\t" + s + "\t" + elapsed);
diff --git a/user/test/com/google/gwt/user/client/RandomTest.java b/user/test/com/google/gwt/user/client/RandomTest.java index 2cc6ca2..7b38b8e 100644 --- a/user/test/com/google/gwt/user/client/RandomTest.java +++ b/user/test/com/google/gwt/user/client/RandomTest.java
@@ -1,8 +1,25 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.user.client; import com.google.gwt.junit.client.GWTTestCase; +/** + * TODO: document me. + */ public class RandomTest extends GWTTestCase { public String getModuleName() {
diff --git a/user/test/com/google/gwt/user/client/rpc/CollectionsTest.java b/user/test/com/google/gwt/user/client/rpc/CollectionsTest.java index 884a65e..201d1a6 100644 --- a/user/test/com/google/gwt/user/client/rpc/CollectionsTest.java +++ b/user/test/com/google/gwt/user/client/rpc/CollectionsTest.java
@@ -1,4 +1,18 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.user.client.rpc; import com.google.gwt.core.client.GWT; @@ -10,9 +24,12 @@ import java.util.HashSet; import java.util.Vector; +/** + * TODO: document me. + */ public class CollectionsTest extends GWTTestCase { private static final int TEST_DELAY = 5000; - + public String getModuleName() { return "com.google.gwt.user.RPCSuite"; } @@ -247,7 +264,7 @@ } }); } - + public void testPrimitiveCharArray() { delayTestFinish(TEST_DELAY); @@ -266,7 +283,6 @@ }); } - public void testPrimitiveDoubleArray() { delayTestFinish(TEST_DELAY); @@ -397,7 +413,7 @@ if (collectionsTestService == null) { collectionsTestService = (CollectionsTestServiceAsync) GWT.create(CollectionsTestService.class); ((ServiceDefTarget) collectionsTestService).setServiceEntryPoint(GWT.getModuleBaseURL() - + "collections"); + + "collections"); } return collectionsTestService; }
diff --git a/user/test/com/google/gwt/user/client/rpc/CollectionsTestService.java b/user/test/com/google/gwt/user/client/rpc/CollectionsTestService.java index a34849e..6717f98 100644 --- a/user/test/com/google/gwt/user/client/rpc/CollectionsTestService.java +++ b/user/test/com/google/gwt/user/client/rpc/CollectionsTestService.java
@@ -1,4 +1,18 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.user.client.rpc; import java.util.ArrayList; @@ -7,8 +21,14 @@ import java.util.HashSet; import java.util.Vector; +/** + * TODO: document me. + */ public interface CollectionsTestService extends RemoteService { + /** + * TODO: document me. + */ public static class CollectionsTestServiceException extends SerializableException { public CollectionsTestServiceException() {
diff --git a/user/test/com/google/gwt/user/client/rpc/CollectionsTestServiceAsync.java b/user/test/com/google/gwt/user/client/rpc/CollectionsTestServiceAsync.java index d296aa2..398c54a 100644 --- a/user/test/com/google/gwt/user/client/rpc/CollectionsTestServiceAsync.java +++ b/user/test/com/google/gwt/user/client/rpc/CollectionsTestServiceAsync.java
@@ -1,5 +1,18 @@ -// Copyright 2006 Google Inc. All Rights Reserved. - +/* + * Copyright 2007 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. + */ package com.google.gwt.user.client.rpc; import java.util.ArrayList; @@ -8,6 +21,9 @@ import java.util.HashSet; import java.util.Vector; +/** + * TODO: document me. + */ public interface CollectionsTestServiceAsync { void echo(ArrayList value, AsyncCallback callback);
diff --git a/user/test/com/google/gwt/user/client/rpc/CustomFieldSerializerTest.java b/user/test/com/google/gwt/user/client/rpc/CustomFieldSerializerTest.java index 9063bc4..63aed74 100644 --- a/user/test/com/google/gwt/user/client/rpc/CustomFieldSerializerTest.java +++ b/user/test/com/google/gwt/user/client/rpc/CustomFieldSerializerTest.java
@@ -1,12 +1,29 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.user.client.rpc; import com.google.gwt.core.client.GWT; import com.google.gwt.user.client.rpc.CustomFieldSerializerTestSetFactory.SerializableSubclass; +/** + * TODO: document me. + */ public class CustomFieldSerializerTest extends TypeSerializerWorkAround { private static final int TEST_DELAY = 5000; - + public String getModuleName() { return "com.google.gwt.user.RPCSuite"; } @@ -21,16 +38,16 @@ try { CustomFieldSerializerTestServiceAsync service = getServiceAsync(); service.echo( - CustomFieldSerializerTestSetFactory.createUnserializableSubclass(), - new AsyncCallback() { - public void onFailure(Throwable caught) { - finishTest(); - } + CustomFieldSerializerTestSetFactory.createUnserializableSubclass(), + new AsyncCallback() { + public void onFailure(Throwable caught) { + finishTest(); + } - public void onSuccess(Object result) { - fail("Class UnserializableSubclass should not be serializable"); - } - }); + public void onSuccess(Object result) { + fail("Class UnserializableSubclass should not be serializable"); + } + }); } catch (RuntimeException ex) { workAroundTypeSerializerBug(ex); } @@ -45,18 +62,18 @@ try { CustomFieldSerializerTestServiceAsync service = getServiceAsync(); service.echo( - CustomFieldSerializerTestSetFactory.createUnserializableClass(), - new AsyncCallback() { - public void onFailure(Throwable caught) { - fail("Class UnserializableClass should be serializable because it has a custom field serializer"); - } + CustomFieldSerializerTestSetFactory.createUnserializableClass(), + new AsyncCallback() { + public void onFailure(Throwable caught) { + fail("Class UnserializableClass should be serializable because it has a custom field serializer"); + } - public void onSuccess(Object result) { - assertNotNull(result); - assertTrue(CustomFieldSerializerTestSetValidator.isValid((UnserializableClass) result)); - finishTest(); - } - }); + public void onSuccess(Object result) { + assertNotNull(result); + assertTrue(CustomFieldSerializerTestSetValidator.isValid((UnserializableClass) result)); + finishTest(); + } + }); } catch (RuntimeException ex) { workAroundTypeSerializerBug(ex); } @@ -71,25 +88,25 @@ CustomFieldSerializerTestServiceAsync service = getServiceAsync(); service.echo( - CustomFieldSerializerTestSetFactory.createSerializableSubclass(), - new AsyncCallback() { - public void onFailure(Throwable caught) { - fail("Class UnserializableClass should be serializable because it has a custom field serializer"); - } + CustomFieldSerializerTestSetFactory.createSerializableSubclass(), + new AsyncCallback() { + public void onFailure(Throwable caught) { + fail("Class UnserializableClass should be serializable because it has a custom field serializer"); + } - public void onSuccess(Object result) { - assertNotNull(result); - assertTrue(CustomFieldSerializerTestSetValidator.isValid((SerializableSubclass) result)); - finishTest(); - } - }); + public void onSuccess(Object result) { + assertNotNull(result); + assertTrue(CustomFieldSerializerTestSetValidator.isValid((SerializableSubclass) result)); + finishTest(); + } + }); } private CustomFieldSerializerTestServiceAsync getServiceAsync() { if (customFieldSerializerTestService == null) { customFieldSerializerTestService = (CustomFieldSerializerTestServiceAsync) GWT.create(CustomFieldSerializerTestService.class); ((ServiceDefTarget) customFieldSerializerTestService).setServiceEntryPoint(GWT.getModuleBaseURL() - + "customfieldserializers"); + + "customfieldserializers"); } return customFieldSerializerTestService; }
diff --git a/user/test/com/google/gwt/user/client/rpc/CustomFieldSerializerTestService.java b/user/test/com/google/gwt/user/client/rpc/CustomFieldSerializerTestService.java index 0e336a2..c486868 100644 --- a/user/test/com/google/gwt/user/client/rpc/CustomFieldSerializerTestService.java +++ b/user/test/com/google/gwt/user/client/rpc/CustomFieldSerializerTestService.java
@@ -1,8 +1,25 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.user.client.rpc; import com.google.gwt.user.client.rpc.CustomFieldSerializerTestSetFactory.SerializableSubclass; +/** + * TODO: document me. + */ public interface CustomFieldSerializerTestService extends RemoteService { SerializableSubclass echo(SerializableSubclass serializableClass);
diff --git a/user/test/com/google/gwt/user/client/rpc/CustomFieldSerializerTestServiceAsync.java b/user/test/com/google/gwt/user/client/rpc/CustomFieldSerializerTestServiceAsync.java index 9ff7084..fa0b92d 100644 --- a/user/test/com/google/gwt/user/client/rpc/CustomFieldSerializerTestServiceAsync.java +++ b/user/test/com/google/gwt/user/client/rpc/CustomFieldSerializerTestServiceAsync.java
@@ -1,8 +1,25 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.user.client.rpc; import com.google.gwt.user.client.rpc.CustomFieldSerializerTestSetFactory.SerializableSubclass; +/** + * TODO: document me. + */ public interface CustomFieldSerializerTestServiceAsync { void echo(SerializableSubclass serializableClass, AsyncCallback callback);
diff --git a/user/test/com/google/gwt/user/client/rpc/CustomFieldSerializerTestSetFactory.java b/user/test/com/google/gwt/user/client/rpc/CustomFieldSerializerTestSetFactory.java index 24e2b4e..12613fe 100644 --- a/user/test/com/google/gwt/user/client/rpc/CustomFieldSerializerTestSetFactory.java +++ b/user/test/com/google/gwt/user/client/rpc/CustomFieldSerializerTestSetFactory.java
@@ -1,7 +1,28 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.user.client.rpc; +/** + * TODO: document me. + */ public class CustomFieldSerializerTestSetFactory { + + /** + * TODO: document me. + */ public static class SerializableSubclass extends UnserializableClass implements IsSerializable { public int getD() { @@ -15,6 +36,9 @@ private int d = 4; } + /** + * TODO: document me. + */ public static class UnserializableSubclass extends UnserializableClass { }
diff --git a/user/test/com/google/gwt/user/client/rpc/CustomFieldSerializerTestSetValidator.java b/user/test/com/google/gwt/user/client/rpc/CustomFieldSerializerTestSetValidator.java index ebb3978..21b0c3f 100644 --- a/user/test/com/google/gwt/user/client/rpc/CustomFieldSerializerTestSetValidator.java +++ b/user/test/com/google/gwt/user/client/rpc/CustomFieldSerializerTestSetValidator.java
@@ -1,8 +1,25 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.user.client.rpc; import com.google.gwt.user.client.rpc.CustomFieldSerializerTestSetFactory.SerializableSubclass; +/** + * TODO: document me. + */ public class CustomFieldSerializerTestSetValidator { public static boolean isValid(SerializableSubclass serializableSubclass) { if (serializableSubclass == null) { @@ -22,7 +39,7 @@ } return unserializableClass.getA() == 4 && unserializableClass.getB() == 5 - && unserializableClass.getC() == 6 - && unserializableClass.getObj().equals("bye"); + && unserializableClass.getC() == 6 + && unserializableClass.getObj().equals("bye"); } }
diff --git a/user/test/com/google/gwt/user/client/rpc/InheritanceTest.java b/user/test/com/google/gwt/user/client/rpc/InheritanceTest.java index 5129fa7..72c0d1a 100644 --- a/user/test/com/google/gwt/user/client/rpc/InheritanceTest.java +++ b/user/test/com/google/gwt/user/client/rpc/InheritanceTest.java
@@ -1,5 +1,18 @@ -// Copyright 2006 Google Inc. All Rights Reserved. - +/* + * Copyright 2007 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. + */ package com.google.gwt.user.client.rpc; import com.google.gwt.core.client.GWT; @@ -9,6 +22,9 @@ import com.google.gwt.user.client.rpc.InheritanceTestSetFactory.SerializableClassWithTransientField; import com.google.gwt.user.client.rpc.InheritanceTestSetFactory.SerializableSubclass; +/** + * TODO: document me. + */ public class InheritanceTest extends TypeSerializerWorkAround { // private static final int TEST_DELAY = Integer.MAX_VALUE; private static final int TEST_DELAY = 5000; @@ -69,7 +85,6 @@ } catch (RuntimeException ex) { workAroundTypeSerializerBug(ex); } - } /** @@ -125,8 +140,7 @@ public void onSuccess(Object result) { assertNotNull(result); - assertTrue(InheritanceTestSetValidator - .isValid((SerializableClass) result)); + assertTrue(InheritanceTestSetValidator.isValid((SerializableClass) result)); finishTest(); } }); @@ -147,8 +161,7 @@ public void onSuccess(Object result) { assertNotNull(result); - assertTrue(InheritanceTestSetValidator - .isValid((SerializableSubclass) result)); + assertTrue(InheritanceTestSetValidator.isValid((SerializableSubclass) result)); finishTest(); } }); @@ -159,19 +172,19 @@ delayTestFinish(TEST_DELAY); InheritanceTestServiceAsync service = getServiceAsync(); - service.echo(InheritanceTestSetFactory - .createSerializableClassWithTransientField(), new AsyncCallback() { - public void onFailure(Throwable caught) { - fail(caught.toString()); - } + service.echo( + InheritanceTestSetFactory.createSerializableClassWithTransientField(), + new AsyncCallback() { + public void onFailure(Throwable caught) { + fail(caught.toString()); + } - public void onSuccess(Object result) { - assertNotNull(result); - assertTrue(InheritanceTestSetValidator - .isValid((SerializableClassWithTransientField) result)); - finishTest(); - } - }); + public void onSuccess(Object result) { + assertNotNull(result); + assertTrue(InheritanceTestSetValidator.isValid((SerializableClassWithTransientField) result)); + finishTest(); + } + }); } /** @@ -183,8 +196,8 @@ try { InheritanceTestServiceAsync service = getServiceAsync(); - service.echo(InheritanceTestSetFactory - .createSerializableClassWithUnserializableClassField(), + service.echo( + InheritanceTestSetFactory.createSerializableClassWithUnserializableClassField(), new AsyncCallback() { public void onFailure(Throwable caught) { finishTest(); @@ -208,8 +221,8 @@ try { InheritanceTestServiceAsync service = getServiceAsync(); - service.echo(InheritanceTestSetFactory - .createSerializableClassWithUnserializableObjectField(), + service.echo( + InheritanceTestSetFactory.createSerializableClassWithUnserializableObjectField(), new AsyncCallback() { public void onFailure(Throwable caught) { finishTest(); @@ -226,10 +239,8 @@ private InheritanceTestServiceAsync getServiceAsync() { if (inheritanceTestService == null) { - inheritanceTestService = (InheritanceTestServiceAsync) GWT - .create(InheritanceTestService.class); - ((ServiceDefTarget) inheritanceTestService).setServiceEntryPoint(GWT - .getModuleBaseURL() + inheritanceTestService = (InheritanceTestServiceAsync) GWT.create(InheritanceTestService.class); + ((ServiceDefTarget) inheritanceTestService).setServiceEntryPoint(GWT.getModuleBaseURL() + "inheritance"); } return inheritanceTestService;
diff --git a/user/test/com/google/gwt/user/client/rpc/InheritanceTestService.java b/user/test/com/google/gwt/user/client/rpc/InheritanceTestService.java index b7639f0..2945827 100644 --- a/user/test/com/google/gwt/user/client/rpc/InheritanceTestService.java +++ b/user/test/com/google/gwt/user/client/rpc/InheritanceTestService.java
@@ -1,5 +1,18 @@ -// Copyright 2006 Google Inc. All Rights Reserved. - +/* + * Copyright 2007 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. + */ package com.google.gwt.user.client.rpc; import com.google.gwt.user.client.rpc.InheritanceTestSetFactory.AnonymousClassInterface; @@ -7,6 +20,9 @@ import com.google.gwt.user.client.rpc.InheritanceTestSetFactory.SerializableClassWithTransientField; import com.google.gwt.user.client.rpc.InheritanceTestSetFactory.SerializableSubclass; +/** + * TODO: document me. + */ public interface InheritanceTestService extends RemoteService { AnonymousClassInterface echo(AnonymousClassInterface serializable);
diff --git a/user/test/com/google/gwt/user/client/rpc/InheritanceTestServiceAsync.java b/user/test/com/google/gwt/user/client/rpc/InheritanceTestServiceAsync.java index 7b35ad8..635884e 100644 --- a/user/test/com/google/gwt/user/client/rpc/InheritanceTestServiceAsync.java +++ b/user/test/com/google/gwt/user/client/rpc/InheritanceTestServiceAsync.java
@@ -1,5 +1,18 @@ -// Copyright 2006 Google Inc. All Rights Reserved. - +/* + * Copyright 2007 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. + */ package com.google.gwt.user.client.rpc; import com.google.gwt.user.client.rpc.InheritanceTestSetFactory.AnonymousClassInterface; @@ -7,6 +20,9 @@ import com.google.gwt.user.client.rpc.InheritanceTestSetFactory.SerializableClassWithTransientField; import com.google.gwt.user.client.rpc.InheritanceTestSetFactory.SerializableSubclass; +/** + * TODO: document me. + */ public interface InheritanceTestServiceAsync { void echo(AnonymousClassInterface serializable, AsyncCallback callback);
diff --git a/user/test/com/google/gwt/user/client/rpc/InheritanceTestSetFactory.java b/user/test/com/google/gwt/user/client/rpc/InheritanceTestSetFactory.java index be84074..f981857 100644 --- a/user/test/com/google/gwt/user/client/rpc/InheritanceTestSetFactory.java +++ b/user/test/com/google/gwt/user/client/rpc/InheritanceTestSetFactory.java
@@ -1,39 +1,72 @@ -// Copyright 2006 Google Inc. All Rights Reserved. - +/* + * Copyright 2007 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. + */ package com.google.gwt.user.client.rpc; +/** + * TODO: document me. + */ public class InheritanceTestSetFactory { - + + /** + * TODO: document me. + */ public static class Shape implements IsSerializable { private String name; - + public String getName() { return name; } - + public void setName(String name) { this.name = name; } } - + + /** + * TODO: document me. + */ public static class Circle extends Shape { private String name; } - + + /** + * TODO: document me. + */ public static interface AnonymousClassInterface extends IsSerializable { void foo(); } - // This class is here to make the code generator think that there is atleast - // on serializable subclass of the AnonymousClassInterface + /** + * This class is here to make the code generator think that there is atleast + * on serializable subclass of the AnonymousClassInterface + */ public static class MyClass implements AnonymousClassInterface { public void foo() { } } + /** + * TODO: document me. + */ public class NonStaticInnerClass implements IsSerializable { } + /** + * TODO: document me. + */ public static class SerializableClass implements IsSerializable { public int getA() { return a; @@ -64,12 +97,15 @@ private int b = 2; private int c = 3; - + protected int d = 4; - + int e = 5; } + /** + * TODO: document me. + */ public static class SerializableClassWithTransientField extends SerializableClass { public Object getObj() { @@ -83,16 +119,25 @@ private transient Object obj; } + /** + * TODO: document me. + */ public static class SerializableClassWithUnserializableClassField extends SerializableClass { UnserializableClass cls; } + /** + * TODO: document me. + */ public static class SerializableClassWithUnserializableObjectField extends SerializableClass { Object obj; } + /** + * TODO: document me. + */ public static class SerializableSubclass extends SerializableClass { public int getD() { return d; @@ -105,6 +150,9 @@ private int d = 4; } + /** + * TODO: document me. + */ public static class UnserializableClass { } @@ -113,7 +161,7 @@ circle.setName("Circle"); return circle; } - + public static SerializableClass createSerializableClass() { return new SerializableClass(); }
diff --git a/user/test/com/google/gwt/user/client/rpc/InheritanceTestSetValidator.java b/user/test/com/google/gwt/user/client/rpc/InheritanceTestSetValidator.java index 6dbc372..0285509 100644 --- a/user/test/com/google/gwt/user/client/rpc/InheritanceTestSetValidator.java +++ b/user/test/com/google/gwt/user/client/rpc/InheritanceTestSetValidator.java
@@ -1,11 +1,27 @@ -// Copyright 2006 Google Inc. All Rights Reserved. - +/* + * Copyright 2007 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. + */ package com.google.gwt.user.client.rpc; import com.google.gwt.user.client.rpc.InheritanceTestSetFactory.SerializableClass; import com.google.gwt.user.client.rpc.InheritanceTestSetFactory.SerializableClassWithTransientField; import com.google.gwt.user.client.rpc.InheritanceTestSetFactory.SerializableSubclass; +/** + * TODO: document me. + */ public class InheritanceTestSetValidator { public static boolean isValid(SerializableClass serializableClass) { if (serializableClass == null) {
diff --git a/user/test/com/google/gwt/user/client/rpc/ObjectGraphTest.java b/user/test/com/google/gwt/user/client/rpc/ObjectGraphTest.java index d67e9f0..37a6008 100644 --- a/user/test/com/google/gwt/user/client/rpc/ObjectGraphTest.java +++ b/user/test/com/google/gwt/user/client/rpc/ObjectGraphTest.java
@@ -1,14 +1,30 @@ -// Copyright 2006 Google Inc. All Rights Reserved. - +/* + * Copyright 2007 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. + */ package com.google.gwt.user.client.rpc; import com.google.gwt.core.client.GWT; import com.google.gwt.junit.client.GWTTestCase; import com.google.gwt.user.client.rpc.TestSetFactory.SerializableDoublyLinkedNode; +/** + * TODO: document me. + */ public class ObjectGraphTest extends GWTTestCase { private static final int TEST_DELAY = 5000; - + public String getModuleName() { return "com.google.gwt.user.RPCSuite"; } @@ -18,17 +34,17 @@ ObjectGraphTestServiceAsync service = getServiceAsync(); service.echo_AcyclicGraph(TestSetFactory.createAcyclicGraph(), - new AsyncCallback() { - public void onFailure(Throwable caught) { - fail(caught.toString()); - } + new AsyncCallback() { + public void onFailure(Throwable caught) { + fail(caught.toString()); + } - public void onSuccess(Object result) { - assertNotNull(result); - assertTrue(TestSetValidator.isValidAcyclicGraph((SerializableDoublyLinkedNode) result)); - finishTest(); - } - }); + public void onSuccess(Object result) { + assertNotNull(result); + assertTrue(TestSetValidator.isValidAcyclicGraph((SerializableDoublyLinkedNode) result)); + finishTest(); + } + }); } public void testComplexCyclicGraph() { @@ -36,36 +52,35 @@ ObjectGraphTestServiceAsync service = getServiceAsync(); service.echo_ComplexCyclicGraph(TestSetFactory.createComplexCyclicGraph(), - new AsyncCallback() { - public void onFailure(Throwable caught) { - fail(caught.toString()); - } + new AsyncCallback() { + public void onFailure(Throwable caught) { + fail(caught.toString()); + } - public void onSuccess(Object result) { - assertNotNull(result); - assertTrue(TestSetValidator.isValidComplexCyclicGraph((SerializableDoublyLinkedNode) result)); - finishTest(); - } - }); + public void onSuccess(Object result) { + assertNotNull(result); + assertTrue(TestSetValidator.isValidComplexCyclicGraph((SerializableDoublyLinkedNode) result)); + finishTest(); + } + }); } public void testComplexCyclicGraph2() { delayTestFinish(TEST_DELAY); ObjectGraphTestServiceAsync service = getServiceAsync(); - final SerializableDoublyLinkedNode node = TestSetFactory.createComplexCyclicGraph(); - service.echo_ComplexCyclicGraph(node, node, - new AsyncCallback() { - public void onFailure(Throwable caught) { - fail(caught.toString()); - } + final SerializableDoublyLinkedNode node = TestSetFactory.createComplexCyclicGraph(); + service.echo_ComplexCyclicGraph(node, node, new AsyncCallback() { + public void onFailure(Throwable caught) { + fail(caught.toString()); + } - public void onSuccess(Object result) { - assertNotNull(result); - assertTrue(TestSetValidator.isValidComplexCyclicGraph((SerializableDoublyLinkedNode) result)); - finishTest(); - } - }); + public void onSuccess(Object result) { + assertNotNull(result); + assertTrue(TestSetValidator.isValidComplexCyclicGraph((SerializableDoublyLinkedNode) result)); + finishTest(); + } + }); } public void testTrivialCyclicGraph() { @@ -73,24 +88,24 @@ ObjectGraphTestServiceAsync service = getServiceAsync(); service.echo_TrivialCyclicGraph(TestSetFactory.createTrivialCyclicGraph(), - new AsyncCallback() { - public void onFailure(Throwable caught) { - fail(caught.toString()); - } + new AsyncCallback() { + public void onFailure(Throwable caught) { + fail(caught.toString()); + } - public void onSuccess(Object result) { - assertNotNull(result); - assertTrue(TestSetValidator.isValidTrivialCyclicGraph((SerializableDoublyLinkedNode) result)); - finishTest(); - } - }); + public void onSuccess(Object result) { + assertNotNull(result); + assertTrue(TestSetValidator.isValidTrivialCyclicGraph((SerializableDoublyLinkedNode) result)); + finishTest(); + } + }); } private ObjectGraphTestServiceAsync getServiceAsync() { if (objectGraphTestService == null) { objectGraphTestService = (ObjectGraphTestServiceAsync) GWT.create(ObjectGraphTestService.class); ((ServiceDefTarget) objectGraphTestService).setServiceEntryPoint(GWT.getModuleBaseURL() - + "objectgraphs"); + + "objectgraphs"); } return objectGraphTestService; }
diff --git a/user/test/com/google/gwt/user/client/rpc/ObjectGraphTestService.java b/user/test/com/google/gwt/user/client/rpc/ObjectGraphTestService.java index a7d8d59..a956168 100644 --- a/user/test/com/google/gwt/user/client/rpc/ObjectGraphTestService.java +++ b/user/test/com/google/gwt/user/client/rpc/ObjectGraphTestService.java
@@ -1,9 +1,25 @@ -// Copyright 2006 Google Inc. All Rights Reserved. - +/* + * Copyright 2007 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. + */ package com.google.gwt.user.client.rpc; import com.google.gwt.user.client.rpc.TestSetFactory.SerializableDoublyLinkedNode; +/** + * TODO: document me. + */ public interface ObjectGraphTestService extends RemoteService { SerializableDoublyLinkedNode echo_AcyclicGraph( @@ -14,7 +30,7 @@ SerializableDoublyLinkedNode echo_ComplexCyclicGraph( SerializableDoublyLinkedNode node1, SerializableDoublyLinkedNode node2); - + SerializableDoublyLinkedNode echo_TrivialCyclicGraph( SerializableDoublyLinkedNode node); }
diff --git a/user/test/com/google/gwt/user/client/rpc/ObjectGraphTestServiceAsync.java b/user/test/com/google/gwt/user/client/rpc/ObjectGraphTestServiceAsync.java index e5fc33e..db964fe 100644 --- a/user/test/com/google/gwt/user/client/rpc/ObjectGraphTestServiceAsync.java +++ b/user/test/com/google/gwt/user/client/rpc/ObjectGraphTestServiceAsync.java
@@ -1,18 +1,34 @@ -// Copyright 2006 Google Inc. All Rights Reserved. - +/* + * Copyright 2007 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. + */ package com.google.gwt.user.client.rpc; import com.google.gwt.user.client.rpc.TestSetFactory.SerializableDoublyLinkedNode; +/** + * TODO: document me. + */ public interface ObjectGraphTestServiceAsync { void echo_AcyclicGraph(SerializableDoublyLinkedNode node, AsyncCallback callback); void echo_ComplexCyclicGraph(SerializableDoublyLinkedNode node, AsyncCallback callback); - - void echo_ComplexCyclicGraph( - SerializableDoublyLinkedNode node1, SerializableDoublyLinkedNode node2, AsyncCallback callback); + + void echo_ComplexCyclicGraph(SerializableDoublyLinkedNode node1, + SerializableDoublyLinkedNode node2, AsyncCallback callback); void echo_TrivialCyclicGraph(SerializableDoublyLinkedNode node, AsyncCallback callback);
diff --git a/user/test/com/google/gwt/user/client/rpc/RemoteServiceServletTest.java b/user/test/com/google/gwt/user/client/rpc/RemoteServiceServletTest.java index 77bbaea..cb75234 100644 --- a/user/test/com/google/gwt/user/client/rpc/RemoteServiceServletTest.java +++ b/user/test/com/google/gwt/user/client/rpc/RemoteServiceServletTest.java
@@ -1,4 +1,18 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.user.client.rpc; import com.google.gwt.core.client.GWT; @@ -21,8 +35,7 @@ private static final int TEST_DELAY = Integer.MAX_VALUE; private static RemoteServiceServletTestServiceAsync getAsyncService() { - RemoteServiceServletTestServiceAsync service = (RemoteServiceServletTestServiceAsync) GWT - .create(RemoteServiceServletTestService.class); + RemoteServiceServletTestServiceAsync service = (RemoteServiceServletTestServiceAsync) GWT.create(RemoteServiceServletTestService.class); ((ServiceDefTarget) service).setServiceEntryPoint(GWT.getModuleBaseURL() + "servlettest");
diff --git a/user/test/com/google/gwt/user/client/rpc/RemoteServiceServletTestService.java b/user/test/com/google/gwt/user/client/rpc/RemoteServiceServletTestService.java index 5b2c66e..093241e 100644 --- a/user/test/com/google/gwt/user/client/rpc/RemoteServiceServletTestService.java +++ b/user/test/com/google/gwt/user/client/rpc/RemoteServiceServletTestService.java
@@ -1,6 +1,23 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.user.client.rpc; +/** + * TODO: document me. + */ public interface RemoteServiceServletTestService extends RemoteService { void test(); }
diff --git a/user/test/com/google/gwt/user/client/rpc/RemoteServiceServletTestServiceAsync.java b/user/test/com/google/gwt/user/client/rpc/RemoteServiceServletTestServiceAsync.java index 41bd246..82e166d 100644 --- a/user/test/com/google/gwt/user/client/rpc/RemoteServiceServletTestServiceAsync.java +++ b/user/test/com/google/gwt/user/client/rpc/RemoteServiceServletTestServiceAsync.java
@@ -1,6 +1,23 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.user.client.rpc; +/** + * TODO: document me. + */ public interface RemoteServiceServletTestServiceAsync { void test(AsyncCallback callback); }
diff --git a/user/test/com/google/gwt/user/client/rpc/TestSetFactory.java b/user/test/com/google/gwt/user/client/rpc/TestSetFactory.java index 6e2fa09..6350ac0 100644 --- a/user/test/com/google/gwt/user/client/rpc/TestSetFactory.java +++ b/user/test/com/google/gwt/user/client/rpc/TestSetFactory.java
@@ -1,5 +1,18 @@ -// Copyright 2006 Google Inc. All Rights Reserved. - +/* + * Copyright 2007 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. + */ package com.google.gwt.user.client.rpc; import java.util.ArrayList; @@ -8,7 +21,14 @@ import java.util.HashSet; import java.util.Vector; +/** + * TODO: document me. + */ public class TestSetFactory { + + /** + * TODO: document me. + */ public static class SerializableClass implements IsSerializable { public IsSerializable getElementRef() { return elementRef; @@ -31,6 +51,9 @@ IsSerializable[] elements; } + /** + * TODO: document me. + */ public static class SerializableDoublyLinkedNode implements IsSerializable { public String getData() { return data; @@ -61,13 +84,22 @@ protected SerializableDoublyLinkedNode rightChild; } + /** + * TODO: document me. + */ public static class SerializableList extends ArrayList implements IsSerializable { } + /** + * TODO: document me. + */ public static class SerializableMap extends HashMap implements IsSerializable { } + /** + * TODO: document me. + */ public static class SerializableNode extends UnserializableNode implements IsSerializable { @@ -134,48 +166,58 @@ protected SerializableNode next; } + /** + * TODO: document me. + */ public static class SerializableSet extends HashSet implements IsSerializable { } + /** + * TODO: document me. + */ public static class SerializableVector extends Vector implements IsSerializable { } + /** + * TODO: document me. + */ public static class UnserializableNode { } public static Boolean[] createBooleanArray() { - return new Boolean[]{ - new Boolean(true), new Boolean(false), new Boolean(true), - new Boolean(false)}; + return new Boolean[] { + Boolean.valueOf(true), Boolean.valueOf(false), Boolean.valueOf(true), + Boolean.valueOf(false)}; } public static Byte[] createByteArray() { - return new Byte[]{ - new Byte(Byte.MAX_VALUE), new Byte(Byte.MIN_VALUE), - new Byte(Byte.MAX_VALUE), new Byte(Byte.MIN_VALUE)}; + return new Byte[] { + new Byte(Byte.MAX_VALUE), new Byte(Byte.MIN_VALUE), + new Byte(Byte.MAX_VALUE), new Byte(Byte.MIN_VALUE)}; } public static Character[] createCharArray() { - return new Character[]{ - new Character(Character.MAX_VALUE), new Character(Character.MIN_VALUE), - new Character(Character.MAX_VALUE), new Character(Character.MIN_VALUE)}; + return new Character[] { + new Character(Character.MAX_VALUE), new Character(Character.MIN_VALUE), + new Character(Character.MAX_VALUE), new Character(Character.MIN_VALUE)}; } public static Date[] createDateArray() { - return new Date[]{new Date(1992 - 1900, 9, 18), new Date(1997 - 1900, 6, 6)}; + return new Date[] { + new Date(1992 - 1900, 9, 18), new Date(1997 - 1900, 6, 6)}; } public static Double[] createDoubleArray() { - return new Double[]{ - new Double(Double.MAX_VALUE), new Double(Double.MIN_VALUE), - new Double(Double.MAX_VALUE), new Double(Double.MIN_VALUE)}; + return new Double[] { + new Double(Double.MAX_VALUE), new Double(Double.MIN_VALUE), + new Double(Double.MAX_VALUE), new Double(Double.MIN_VALUE)}; } public static Float[] createFloatArray() { - return new Float[]{ - new Float(Float.MAX_VALUE), new Float(Float.MIN_VALUE), - new Float(Float.MAX_VALUE), new Float(Float.MIN_VALUE)}; + return new Float[] { + new Float(Float.MAX_VALUE), new Float(Float.MIN_VALUE), + new Float(Float.MAX_VALUE), new Float(Float.MIN_VALUE)}; } public static HashMap createHashMap() { @@ -200,66 +242,66 @@ } public static Integer[] createIntegerArray() { - return new Integer[]{ - new Integer(Integer.MAX_VALUE), new Integer(Integer.MIN_VALUE), - new Integer(Integer.MAX_VALUE), new Integer(Integer.MIN_VALUE)}; + return new Integer[] { + new Integer(Integer.MAX_VALUE), new Integer(Integer.MIN_VALUE), + new Integer(Integer.MAX_VALUE), new Integer(Integer.MIN_VALUE)}; } public static Long[] createLongArray() { - return new Long[]{ - new Long(Long.MAX_VALUE), new Long(Long.MIN_VALUE), - new Long(Long.MAX_VALUE), new Long(Long.MIN_VALUE)}; + return new Long[] { + new Long(Long.MAX_VALUE), new Long(Long.MIN_VALUE), + new Long(Long.MAX_VALUE), new Long(Long.MIN_VALUE)}; } public static boolean[] createPrimitiveBooleanArray() { - return new boolean[]{true, true, false, false, true, false}; + return new boolean[] {true, true, false, false, true, false}; } public static byte[] createPrimitiveByteArray() { - return new byte[]{ - Byte.MAX_VALUE, Byte.MIN_VALUE, Byte.MAX_VALUE, Byte.MIN_VALUE}; + return new byte[] { + Byte.MAX_VALUE, Byte.MIN_VALUE, Byte.MAX_VALUE, Byte.MIN_VALUE}; } public static char[] createPrimitiveCharArray() { - return new char[]{ - Character.MAX_VALUE, Character.MIN_VALUE, Character.MAX_VALUE, - Character.MIN_VALUE}; + return new char[] { + Character.MAX_VALUE, Character.MIN_VALUE, Character.MAX_VALUE, + Character.MIN_VALUE}; } public static double[] createPrimitiveDoubleArray() { - return new double[]{ - Double.MAX_VALUE, Double.MIN_VALUE, Double.MAX_VALUE, Double.MIN_VALUE}; + return new double[] { + Double.MAX_VALUE, Double.MIN_VALUE, Double.MAX_VALUE, Double.MIN_VALUE}; } public static float[] createPrimitiveFloatArray() { - return new float[]{ - Float.MAX_VALUE, Float.MIN_VALUE, Float.MAX_VALUE, Float.MIN_VALUE}; + return new float[] { + Float.MAX_VALUE, Float.MIN_VALUE, Float.MAX_VALUE, Float.MIN_VALUE}; } public static int[] createPrimitiveIntegerArray() { - return new int[]{ - Integer.MAX_VALUE, Integer.MIN_VALUE, Integer.MAX_VALUE, - Integer.MIN_VALUE}; + return new int[] { + Integer.MAX_VALUE, Integer.MIN_VALUE, Integer.MAX_VALUE, + Integer.MIN_VALUE}; } public static long[] createPrimitiveLongArray() { - return new long[]{ - Long.MAX_VALUE, Long.MIN_VALUE, Long.MAX_VALUE, Long.MIN_VALUE}; + return new long[] { + Long.MAX_VALUE, Long.MIN_VALUE, Long.MAX_VALUE, Long.MIN_VALUE}; } public static short[] createPrimitiveShortArray() { - return new short[]{ - Short.MAX_VALUE, Short.MIN_VALUE, Short.MAX_VALUE, Short.MIN_VALUE}; + return new short[] { + Short.MAX_VALUE, Short.MIN_VALUE, Short.MAX_VALUE, Short.MIN_VALUE}; } public static Short[] createShortArray() { - return new Short[]{ - new Short(Short.MAX_VALUE), new Short(Short.MIN_VALUE), - new Short(Short.MAX_VALUE), new Short(Short.MIN_VALUE)}; + return new Short[] { + new Short(Short.MAX_VALUE), new Short(Short.MIN_VALUE), + new Short(Short.MAX_VALUE), new Short(Short.MIN_VALUE)}; } public static String[] createStringArray() { - return new String[]{null, "", "one", "two"}; + return new String[] {null, "", "one", "two"}; } public static Vector createVector() { @@ -325,9 +367,9 @@ static SerializableClass createSerializableClass() { SerializableClass cls = new SerializableClass(); - IsSerializable[] elements = new IsSerializable[]{ - new SerializableClass(), new SerializableClass(), - new SerializableClass(), new SerializableClass(),}; + IsSerializable[] elements = new IsSerializable[] { + new SerializableClass(), new SerializableClass(), + new SerializableClass(), new SerializableClass(),}; cls.setElements(elements); cls.setElementRef(elements[3]);
diff --git a/user/test/com/google/gwt/user/client/rpc/TestSetValidator.java b/user/test/com/google/gwt/user/client/rpc/TestSetValidator.java index 6dbd27e..0c48ad8 100644 --- a/user/test/com/google/gwt/user/client/rpc/TestSetValidator.java +++ b/user/test/com/google/gwt/user/client/rpc/TestSetValidator.java
@@ -1,5 +1,18 @@ -// Copyright 2006 Google Inc. All Rights Reserved. - +/* + * Copyright 2007 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. + */ package com.google.gwt.user.client.rpc; import com.google.gwt.user.client.rpc.TestSetFactory.SerializableClass; @@ -14,6 +27,9 @@ import java.util.Vector; import java.util.Map.Entry; +/** + * TODO: document me. + */ public class TestSetValidator { public static boolean equals(boolean[] expected, boolean[] actual) {
diff --git a/user/test/com/google/gwt/user/client/rpc/TypeSerializerWorkAround.java b/user/test/com/google/gwt/user/client/rpc/TypeSerializerWorkAround.java index f5ba125..bbd85dc 100644 --- a/user/test/com/google/gwt/user/client/rpc/TypeSerializerWorkAround.java +++ b/user/test/com/google/gwt/user/client/rpc/TypeSerializerWorkAround.java
@@ -1,11 +1,26 @@ +/* + * Copyright 2007 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. + */ package com.google.gwt.user.client.rpc; import com.google.gwt.junit.client.GWTTestCase; /** - * This class is the superclass for any test case that needs to work around - * a bug where the generated, client-side type serializer throws the wrong - * type of exception. + * This class is the superclass for any test case that needs to work around a + * bug where the generated, client-side type serializer throws the wrong type of + * exception. */ abstract class TypeSerializerWorkAround extends GWTTestCase { void workAroundTypeSerializerBug(RuntimeException ex) {
diff --git a/user/test/com/google/gwt/user/client/rpc/UnserializableClass.java b/user/test/com/google/gwt/user/client/rpc/UnserializableClass.java index 718a15a..69fef97 100644 --- a/user/test/com/google/gwt/user/client/rpc/UnserializableClass.java +++ b/user/test/com/google/gwt/user/client/rpc/UnserializableClass.java
@@ -1,7 +1,21 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.user.client.rpc; -/* +/** * This class is defined outside of the CustomFieldSerializerTestSetFactory * because of a bug where custom field serializers cannot be inner classes and * custom field serializers must be in the same package as the class that they @@ -12,12 +26,15 @@ public int getA() { return a; } + public int getB() { return b; } + public int getC() { return c; } + public Object getObj() { return obj; }
diff --git a/user/test/com/google/gwt/user/client/rpc/UnserializableClass_CustomFieldSerializer.java b/user/test/com/google/gwt/user/client/rpc/UnserializableClass_CustomFieldSerializer.java index 59e892d..db24d49 100644 --- a/user/test/com/google/gwt/user/client/rpc/UnserializableClass_CustomFieldSerializer.java +++ b/user/test/com/google/gwt/user/client/rpc/UnserializableClass_CustomFieldSerializer.java
@@ -1,7 +1,21 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.user.client.rpc; -/* +/** * This class is defined outside of the CustomFieldSerializerTestSetFactory * because of a bug where custom field serializers cannot be inner classes. Once * we fix this bug we can move this class into the test set factory.
diff --git a/user/test/com/google/gwt/user/client/rpc/ValueTypesTest.java b/user/test/com/google/gwt/user/client/rpc/ValueTypesTest.java index 6938eb4..766644e 100644 --- a/user/test/com/google/gwt/user/client/rpc/ValueTypesTest.java +++ b/user/test/com/google/gwt/user/client/rpc/ValueTypesTest.java
@@ -1,13 +1,29 @@ -// Copyright 2006 Google Inc. All Rights Reserved. - +/* + * Copyright 2007 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. + */ package com.google.gwt.user.client.rpc; import com.google.gwt.core.client.GWT; import com.google.gwt.junit.client.GWTTestCase; +/** + * TODO: document me. + */ public class ValueTypesTest extends GWTTestCase { private static final int TEST_DELAY = 5000; - + public String getModuleName() { return "com.google.gwt.user.RPCSuite"; } @@ -109,7 +125,7 @@ public void onSuccess(Object result) { assertNotNull(result); assertEquals((char) (Character.MAX_VALUE / (char) 2), - ((Character) result).charValue()); + ((Character) result).charValue()); finishTest(); } }); @@ -412,7 +428,7 @@ if (primitiveTypeTestService == null) { primitiveTypeTestService = (ValueTypesTestServiceAsync) GWT.create(ValueTypesTestService.class); ((ServiceDefTarget) primitiveTypeTestService).setServiceEntryPoint(GWT.getModuleBaseURL() - + "valuetypes"); + + "valuetypes"); } return primitiveTypeTestService; }
diff --git a/user/test/com/google/gwt/user/client/rpc/ValueTypesTestService.java b/user/test/com/google/gwt/user/client/rpc/ValueTypesTestService.java index 6f8f214..85868f1 100644 --- a/user/test/com/google/gwt/user/client/rpc/ValueTypesTestService.java +++ b/user/test/com/google/gwt/user/client/rpc/ValueTypesTestService.java
@@ -1,7 +1,23 @@ -// Copyright 2006 Google Inc. All Rights Reserved. - +/* + * Copyright 2007 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. + */ package com.google.gwt.user.client.rpc; +/** + * TODO: document me. + */ public interface ValueTypesTestService extends RemoteService { byte echo(byte value);
diff --git a/user/test/com/google/gwt/user/client/rpc/ValueTypesTestServiceAsync.java b/user/test/com/google/gwt/user/client/rpc/ValueTypesTestServiceAsync.java index 315f572..28d2fb2 100644 --- a/user/test/com/google/gwt/user/client/rpc/ValueTypesTestServiceAsync.java +++ b/user/test/com/google/gwt/user/client/rpc/ValueTypesTestServiceAsync.java
@@ -1,7 +1,23 @@ -// Copyright 2006 Google Inc. All Rights Reserved. - +/* + * Copyright 2007 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. + */ package com.google.gwt.user.client.rpc; +/** + * TODO: document me. + */ public interface ValueTypesTestServiceAsync { void echo(byte value, AsyncCallback callback);
diff --git a/user/test/com/google/gwt/user/client/ui/AbsolutePanelTest.java b/user/test/com/google/gwt/user/client/ui/AbsolutePanelTest.java index 4452f8f..0bd415f 100644 --- a/user/test/com/google/gwt/user/client/ui/AbsolutePanelTest.java +++ b/user/test/com/google/gwt/user/client/ui/AbsolutePanelTest.java
@@ -1,8 +1,26 @@ +/* + * Copyright 2007 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. + */ package com.google.gwt.user.client.ui; import com.google.gwt.junit.client.GWTTestCase; import com.google.gwt.user.client.Window; +/** + * TODO: document me. + */ public class AbsolutePanelTest extends GWTTestCase { public String getModuleName() {
diff --git a/user/test/com/google/gwt/user/client/ui/ArrayListAndVectorProfile.java b/user/test/com/google/gwt/user/client/ui/ArrayListAndVectorProfile.java index 4bbf9e2..c3b328b 100644 --- a/user/test/com/google/gwt/user/client/ui/ArrayListAndVectorProfile.java +++ b/user/test/com/google/gwt/user/client/ui/ArrayListAndVectorProfile.java
@@ -1,5 +1,18 @@ -// Copyright 2006 Google Inc. All Rights Reserved. - +/* + * Copyright 2007 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. + */ package com.google.gwt.user.client.ui; import java.util.ArrayList; @@ -54,6 +67,6 @@ v.get(k); } - timing("arrayList | get(" + num +")"); + timing("arrayList | get(" + num + ")"); } }
diff --git a/user/test/com/google/gwt/user/client/ui/DOMTest.java b/user/test/com/google/gwt/user/client/ui/DOMTest.java index 2d7d2c0..e12c6b3 100644 --- a/user/test/com/google/gwt/user/client/ui/DOMTest.java +++ b/user/test/com/google/gwt/user/client/ui/DOMTest.java
@@ -1,17 +1,35 @@ +/* + * Copyright 2007 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. + */ package com.google.gwt.user.client.ui; import com.google.gwt.junit.client.GWTTestCase; import com.google.gwt.user.client.DOM; import com.google.gwt.user.client.Element; +/** + * TODO: document me. + */ public class DOMTest extends GWTTestCase { /** - * Helper method to return the denormalized child count of a DOM Element. For example, - * child nodes which have a nodeType of Text are included in the count, whereas - * <code>DOM.getChildCount(Element parent)</code> only counts the child nodes which have a nodeType - * of Element. - * + * Helper method to return the denormalized child count of a DOM Element. For + * example, child nodes which have a nodeType of Text are included in the + * count, whereas <code>DOM.getChildCount(Element parent)</code> only counts + * the child nodes which have a nodeType of Element. + * * @param elem the DOM element to check the child count for * @return The number of child nodes */ @@ -31,10 +49,10 @@ i++; } // If we got here we looped "forever" or passed, as no exception was thrown. - if(i==10) { + if (i == 10) { fail("Cyclic parent structure detected."); } - // If we get here, we pass, because we encountered no errors going to the + // If we get here, we pass, because we encountered no errors going to the // top of the parent hierarchy. } @@ -59,14 +77,15 @@ DOM.setInnerText(tdElem, null); - // Once we set the inner text on an element to null, all of the element's child nodes + // Once we set the inner text on an element to null, all of the element's + // child nodes // should be deleted, including any text nodes, for all supported browsers. assertTrue(getDenormalizedChildCount(tdElem) == 0); } public void testToString() { Button b = new Button("abcdef"); - assertTrue(b.toString().indexOf("abcdef")!=-1); - assertTrue(b.toString().toLowerCase().indexOf("button")!=-1); + assertTrue(b.toString().indexOf("abcdef") != -1); + assertTrue(b.toString().toLowerCase().indexOf("button") != -1); } }
diff --git a/user/test/com/google/gwt/user/client/ui/DockPanelTest.java b/user/test/com/google/gwt/user/client/ui/DockPanelTest.java index b8c46bf..1b464fb 100644 --- a/user/test/com/google/gwt/user/client/ui/DockPanelTest.java +++ b/user/test/com/google/gwt/user/client/ui/DockPanelTest.java
@@ -1,10 +1,27 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.user.client.ui; import com.google.gwt.junit.client.GWTTestCase; import com.google.gwt.user.client.DOM; import com.google.gwt.user.client.Element; +/** + * TODO: document me. + */ public class DockPanelTest extends GWTTestCase { private static class OnLoadTestLabel extends Label { @@ -19,8 +36,9 @@ Element curElem = getElement(); Element body = RootPanel.getBodyElement(); while (curElem != null) { - if (DOM.compare(curElem, body)) + if (DOM.compare(curElem, body)) { attachedWhenLoaded = true; + } curElem = DOM.getParent(curElem); } }
diff --git a/user/test/com/google/gwt/user/client/ui/FastStringMapProfile.java b/user/test/com/google/gwt/user/client/ui/FastStringMapProfile.java index ac358cf..b6057b4 100644 --- a/user/test/com/google/gwt/user/client/ui/FastStringMapProfile.java +++ b/user/test/com/google/gwt/user/client/ui/FastStringMapProfile.java
@@ -1,8 +1,25 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.user.client.ui; import java.util.Map; +/** + * TODO: document me. + */ public class FastStringMapProfile extends WidgetProfile { Map m; @@ -15,7 +32,6 @@ timing(16000); timing(32000); throw new Exception("|browser|test case|time|"); - } private void timing(int s) { @@ -28,7 +44,6 @@ m.get(size + ":"); } this.timing("get(" + size + ")"); - } public FastStringMap putTiming(int size) {
diff --git a/user/test/com/google/gwt/user/client/ui/FastStringMapTest.java b/user/test/com/google/gwt/user/client/ui/FastStringMapTest.java index 103ed8c..8c0e624 100644 --- a/user/test/com/google/gwt/user/client/ui/FastStringMapTest.java +++ b/user/test/com/google/gwt/user/client/ui/FastStringMapTest.java
@@ -1,4 +1,18 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.user.client.ui; import com.google.gwt.junit.client.GWTTestCase; @@ -15,9 +29,8 @@ public class FastStringMapTest extends GWTTestCase { /** - * These is an example of two correctly formatted java API specification + * These is an example of two correctly formatted java API specification. */ - public static Map makeEmptyMap() { return new FastStringMap(); }
diff --git a/user/test/com/google/gwt/user/client/ui/FlexTableProfile.java b/user/test/com/google/gwt/user/client/ui/FlexTableProfile.java index 755766d..ce9554e 100644 --- a/user/test/com/google/gwt/user/client/ui/FlexTableProfile.java +++ b/user/test/com/google/gwt/user/client/ui/FlexTableProfile.java
@@ -1,7 +1,23 @@ -// Copyright 2006 Google Inc. All Rights Reserved. - +/* + * Copyright 2007 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. + */ package com.google.gwt.user.client.ui; +/** + * TODO: document me. + */ public class FlexTableProfile extends HTMLTableProfile { public HTMLTable createTable(int rows, int columns) {
diff --git a/user/test/com/google/gwt/user/client/ui/FlexTableTest.java b/user/test/com/google/gwt/user/client/ui/FlexTableTest.java index 563b192..cb915cf 100644 --- a/user/test/com/google/gwt/user/client/ui/FlexTableTest.java +++ b/user/test/com/google/gwt/user/client/ui/FlexTableTest.java
@@ -1,8 +1,25 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.user.client.ui; import com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter; +/** + * TODO: document me. + */ public class FlexTableTest extends HTMLTableTestBase { public HTMLTable getTable(int row, int column) { @@ -24,15 +41,15 @@ t.setText(-1, 0, "hello"); fail("IndexOutOfBoundsException should have been thrown"); } catch (IndexOutOfBoundsException e) { - assertEquals("Cannot create a row with a negative index: -1", e - .getMessage()); + assertEquals("Cannot create a row with a negative index: -1", + e.getMessage()); } try { t.setText(0, -1, "hello"); fail("IndexOutOfBoundsException should have been thrown"); } catch (IndexOutOfBoundsException e) { - assertEquals("Cannot create a column with a negative index: -1", e - .getMessage()); + assertEquals("Cannot create a column with a negative index: -1", + e.getMessage()); } try { t.clearCell(3, 3);
diff --git a/user/test/com/google/gwt/user/client/ui/FormPanelTest.java b/user/test/com/google/gwt/user/client/ui/FormPanelTest.java index b9db323..e60c616 100644 --- a/user/test/com/google/gwt/user/client/ui/FormPanelTest.java +++ b/user/test/com/google/gwt/user/client/ui/FormPanelTest.java
@@ -1,12 +1,30 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.user.client.ui; import com.google.gwt.junit.client.GWTTestCase; import com.google.gwt.user.client.Element; import com.google.gwt.user.client.Timer; +/** + * TODO: document me. + */ public class FormPanelTest extends GWTTestCase { - public static boolean clicked=false; + public static boolean clicked = false; + public String getModuleName() { return "com.google.gwt.user.UserTest"; } @@ -33,7 +51,7 @@ // The server just echoes the contents of the request. The following // string should have been present in it. assertTrue(event.getResults().indexOf( - "Content-Disposition: form-data; name=\"file0\";") != -1); + "Content-Disposition: form-data; name=\"file0\";") != -1); finishTest(); } @@ -82,8 +100,8 @@ lb.setSelectedIndex(1); lb.setName("lb"); - Hidden h = new Hidden("h","v"); - + Hidden h = new Hidden("h", "v"); + FlowPanel panel = new FlowPanel(); panel.add(tb); panel.add(ptb); @@ -97,14 +115,14 @@ RootPanel.get().add(form); delayTestFinish(5000); - + form.addFormHandler(new FormHandler() { public void onSubmitComplete(FormSubmitCompleteEvent event) { // The server just echoes the query string. This is what it should look // like. assertTrue(event.getResults().equals( - "tb=text&ptb=password&cb1=on&rb0=on&lb=value1&h=v")); - + "tb=text&ptb=password&cb1=on&rb0=on&lb=value1&h=v")); + finishTest(); }
diff --git a/user/test/com/google/gwt/user/client/ui/GridProfile.java b/user/test/com/google/gwt/user/client/ui/GridProfile.java index 5e3f6d8..56e2d73 100644 --- a/user/test/com/google/gwt/user/client/ui/GridProfile.java +++ b/user/test/com/google/gwt/user/client/ui/GridProfile.java
@@ -1,6 +1,23 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.user.client.ui; +/** + * TODO: document me. + */ public class GridProfile extends HTMLTableProfile { public HTMLTable createTable(int rows, int columns) { return new Grid(rows, columns);
diff --git a/user/test/com/google/gwt/user/client/ui/GridTest.java b/user/test/com/google/gwt/user/client/ui/GridTest.java index 4bb1a5e..2ac56d3 100644 --- a/user/test/com/google/gwt/user/client/ui/GridTest.java +++ b/user/test/com/google/gwt/user/client/ui/GridTest.java
@@ -1,9 +1,26 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.user.client.ui; import com.google.gwt.user.client.DOM; import com.google.gwt.user.client.Element; +/** + * TODO: document me. + */ public class GridTest extends HTMLTableTestBase { public HTMLTable getTable(int row, int column) { @@ -16,15 +33,15 @@ t.setText(-1, 0, "hello"); fail("IndexOutOfBoundsException should have been thrown"); } catch (IndexOutOfBoundsException e) { - assertEquals("Cannot access a row with a negative index: -1", e - .getMessage()); + assertEquals("Cannot access a row with a negative index: -1", + e.getMessage()); } try { t.setText(0, -1, "hello"); fail("IndexOutOfBoundsException should have been thrown"); } catch (IndexOutOfBoundsException e) { - assertEquals("Cannot access a column with a negative index: -1", e - .getMessage()); + assertEquals("Cannot access a column with a negative index: -1", + e.getMessage()); } try { t.clearCell(3, 3); @@ -37,7 +54,7 @@ t.getText(0, 5); fail("IndexOutOfBoundsException should have been thrown"); } catch (Exception e) { - + // Success. } } @@ -62,7 +79,7 @@ Element e = DOM.getChild(r.getElement(), 0); assertEquals(1, DOM.getChildCount(e)); - columns.addStyleName(3, "a"); + columns.addStyleName(3, "a"); // Now there shoud be three such columns . e = DOM.getChild(r.getElement(), 0); assertEquals(4, DOM.getChildCount(e)); @@ -90,7 +107,6 @@ } catch (IndexOutOfBoundsException e) { assertEquals("Row index: 2, Row size: 1", e.getMessage()); } - } }
diff --git a/user/test/com/google/gwt/user/client/ui/HTMLTableProfile.java b/user/test/com/google/gwt/user/client/ui/HTMLTableProfile.java index bbeea38..a033ba7 100644 --- a/user/test/com/google/gwt/user/client/ui/HTMLTableProfile.java +++ b/user/test/com/google/gwt/user/client/ui/HTMLTableProfile.java
@@ -1,10 +1,27 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.user.client.ui; import com.google.gwt.user.client.ui.HTMLTable.ColumnFormatter; import java.util.HashMap; +/** + * TODO: document me. + */ public abstract class HTMLTableProfile extends WidgetProfile { public abstract HTMLTable createTable(int rows, int columns); @@ -27,7 +44,7 @@ for (int row = 0; row < rows; row++) { for (int column = 0; column < columns; column++) { HTMLTable.getCellFormatter().setStyleName(row, column, - row + "," + column); + row + "," + column); } } timing("setStyleName(" + rows + "," + columns + ")"); @@ -59,7 +76,6 @@ Label label = new Label(column + "i"); m.put(row + "," + column, label); } - } timing("hashMapShare(" + rows + "," + columns + ")"); } @@ -98,8 +114,8 @@ } timing("setWidgetTiming(" + rows + "," + columns + ")"); } - - public void columnAddStyleName(int rows, int cols){ + + public void columnAddStyleName(int rows, int cols) { HTMLTable table = createTable(rows, cols); resetTimer(); ColumnFormatter formatter = table.getColumnFormatter(); @@ -107,7 +123,6 @@ formatter.addStyleName(i, "fooStyle"); } timing("column.addStyleName(" + rows + ", " + cols + ")"); - } public void testTimings() throws Exception { @@ -119,7 +134,7 @@ timing(80, 40); timing(80, 80); - throw new Exception("Finished Profile"); + throw new Exception("Finished Profile"); } public void timing(int rows, int columns) {
diff --git a/user/test/com/google/gwt/user/client/ui/HTMLTableTestBase.java b/user/test/com/google/gwt/user/client/ui/HTMLTableTestBase.java index cfd7de0..89e8c3d 100644 --- a/user/test/com/google/gwt/user/client/ui/HTMLTableTestBase.java +++ b/user/test/com/google/gwt/user/client/ui/HTMLTableTestBase.java
@@ -1,4 +1,18 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.user.client.ui; import com.google.gwt.junit.client.GWTTestCase; @@ -7,6 +21,9 @@ import java.util.List; +/** + * TODO: document me. + */ public abstract class HTMLTableTestBase extends GWTTestCase { public static void assertEquals(Object[] x, Object[] y) { @@ -14,10 +31,11 @@ for (int i = 0; i < y.length; i++) { assertEquals(x[i], y[i]); } - } - /** Easy way to test what should be in a list */ + /** + * Easy way to test what should be in a list. + */ protected static void assertEquals(Object[] array, List target) { if (target.size() != array.length) { fail(target + " should be the same length as" + array); @@ -78,7 +96,7 @@ // These tests simple test for errors while setting these fields. The // Patient sample under the survey project has the visual part of the test. HTMLTable t = getTable(4, 4); - + CellFormatter formatter = t.getCellFormatter(); formatter.setHeight(0, 0, "100%"); formatter.setVerticalAlignment(0, 1, HasVerticalAlignment.ALIGN_BOTTOM);
diff --git a/user/test/com/google/gwt/user/client/ui/HiddenTest.java b/user/test/com/google/gwt/user/client/ui/HiddenTest.java index d86e4d8..7c1a814 100644 --- a/user/test/com/google/gwt/user/client/ui/HiddenTest.java +++ b/user/test/com/google/gwt/user/client/ui/HiddenTest.java
@@ -1,8 +1,25 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.user.client.ui; import com.google.gwt.junit.client.GWTTestCase; +/** + * TODO: document me. + */ public class HiddenTest extends GWTTestCase { public String getModuleName() { @@ -32,13 +49,13 @@ assertEquals("myValue", x.getValue()); x.setID("myID"); assertEquals("myID", x.getID()); - + x.setName("myName"); assertEquals("myName", x.getName()); } - - public void testConstructors(){ - Hidden e= new Hidden(); + + public void testConstructors() { + Hidden e = new Hidden(); assertEquals("", e.getName()); Hidden e2 = new Hidden("myName"); assertEquals("myName", e2.getName());
diff --git a/user/test/com/google/gwt/user/client/ui/HistoryTest.java b/user/test/com/google/gwt/user/client/ui/HistoryTest.java index 47b7894..a3aa1e6 100644 --- a/user/test/com/google/gwt/user/client/ui/HistoryTest.java +++ b/user/test/com/google/gwt/user/client/ui/HistoryTest.java
@@ -1,27 +1,44 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.user.client.ui; import com.google.gwt.junit.client.GWTTestCase; import com.google.gwt.user.client.History; import com.google.gwt.user.client.HistoryListener; +/** + * TODO: document me. + */ public class HistoryTest extends GWTTestCase { public String getModuleName() { return "com.google.gwt.user.User"; } - + /* Tests against issue #572: Double unescaping of history tokens. */ public void testTokenEscaping() { - final String escToken = "%24%24%24"; - delayTestFinish(5000); - History.addHistoryListener(new HistoryListener() { - public void onHistoryChanged(String token) { - assertEquals(escToken,token); - finishTest(); - } - }); - History.newItem(escToken); + final String escToken = "%24%24%24"; + delayTestFinish(5000); + History.addHistoryListener(new HistoryListener() { + public void onHistoryChanged(String token) { + assertEquals(escToken, token); + finishTest(); + } + }); + History.newItem(escToken); } /* @@ -36,8 +53,9 @@ public void onHistoryChanged(String historyToken) { switch (state) { case 0: { - if (!historyToken.equals("foo bar")) + if (!historyToken.equals("foo bar")) { fail("Expecting token 'foo bar', but got: " + historyToken); + } state = 1; History.newItem("baz"); @@ -45,8 +63,9 @@ } case 1: { - if (!historyToken.equals("baz")) + if (!historyToken.equals("baz")) { fail("Expecting token 'baz', but got: " + historyToken); + } state = 2; History.back(); @@ -54,8 +73,9 @@ } case 2: { - if (!historyToken.equals("foo bar")) + if (!historyToken.equals("foo bar")) { fail("Expecting token 'foo bar', but got: " + historyToken); + } finishTest(); break; } @@ -64,5 +84,5 @@ }); History.newItem("foo bar"); - } + } }
diff --git a/user/test/com/google/gwt/user/client/ui/LinearPanelTest.java b/user/test/com/google/gwt/user/client/ui/LinearPanelTest.java index 61721d5..90a2c36 100644 --- a/user/test/com/google/gwt/user/client/ui/LinearPanelTest.java +++ b/user/test/com/google/gwt/user/client/ui/LinearPanelTest.java
@@ -1,10 +1,27 @@ -//Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.user.client.ui; import com.google.gwt.junit.client.GWTTestCase; import com.google.gwt.user.client.DOM; import com.google.gwt.user.client.Element; +/** + * TODO: document me. + */ public class LinearPanelTest extends GWTTestCase { public String getModuleName() {
diff --git a/user/test/com/google/gwt/user/client/ui/ListBoxProfile.java b/user/test/com/google/gwt/user/client/ui/ListBoxProfile.java index f0bb81e..119a286 100644 --- a/user/test/com/google/gwt/user/client/ui/ListBoxProfile.java +++ b/user/test/com/google/gwt/user/client/ui/ListBoxProfile.java
@@ -1,7 +1,23 @@ -// Copyright 2006 Google Inc. All Rights Reserved. - +/* + * Copyright 2007 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. + */ package com.google.gwt.user.client.ui; +/** + * TODO: document me. + */ public class ListBoxProfile extends WidgetProfile { public void testTiming() throws Exception {
diff --git a/user/test/com/google/gwt/user/client/ui/ListBoxTest.java b/user/test/com/google/gwt/user/client/ui/ListBoxTest.java index 3d5a17b..3f33685 100644 --- a/user/test/com/google/gwt/user/client/ui/ListBoxTest.java +++ b/user/test/com/google/gwt/user/client/ui/ListBoxTest.java
@@ -1,4 +1,18 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.user.client.ui; import com.google.gwt.junit.client.GWTTestCase;
diff --git a/user/test/com/google/gwt/user/client/ui/PanelTest.java b/user/test/com/google/gwt/user/client/ui/PanelTest.java index c6dea76..8f71203 100644 --- a/user/test/com/google/gwt/user/client/ui/PanelTest.java +++ b/user/test/com/google/gwt/user/client/ui/PanelTest.java
@@ -1,4 +1,18 @@ -//Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.user.client.ui; import com.google.gwt.junit.client.GWTTestCase;
diff --git a/user/test/com/google/gwt/user/client/ui/PopupTest.java b/user/test/com/google/gwt/user/client/ui/PopupTest.java index fdf1c61..f82d363 100644 --- a/user/test/com/google/gwt/user/client/ui/PopupTest.java +++ b/user/test/com/google/gwt/user/client/ui/PopupTest.java
@@ -1,9 +1,26 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.user.client.ui; import com.google.gwt.junit.client.GWTTestCase; import com.google.gwt.user.client.Window; +/** + * TODO: document me. + */ public class PopupTest extends GWTTestCase { public String getModuleName() {
diff --git a/user/test/com/google/gwt/user/client/ui/StackPanelTest.java b/user/test/com/google/gwt/user/client/ui/StackPanelTest.java index e3ce791..b54f380 100644 --- a/user/test/com/google/gwt/user/client/ui/StackPanelTest.java +++ b/user/test/com/google/gwt/user/client/ui/StackPanelTest.java
@@ -1,4 +1,18 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.user.client.ui; import com.google.gwt.junit.client.GWTTestCase; @@ -26,7 +40,7 @@ } /** - * Tests new remove implementation for StackPanel + * Tests new remove implementation for StackPanel. */ public void testRemove() { StackPanel p = new StackPanel(); @@ -58,7 +72,6 @@ // Remove d. p.remove(a); assertEquals("d", curContents(p)); - } /** @@ -81,6 +94,4 @@ p.showStack(-1); assertEquals(-1, p.getSelectedIndex()); } - - -} \ No newline at end of file +}
diff --git a/user/test/com/google/gwt/user/client/ui/TabBarTest.java b/user/test/com/google/gwt/user/client/ui/TabBarTest.java index 9efbe37..6219fe3 100644 --- a/user/test/com/google/gwt/user/client/ui/TabBarTest.java +++ b/user/test/com/google/gwt/user/client/ui/TabBarTest.java
@@ -1,13 +1,30 @@ -//Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.user.client.ui; import com.google.gwt.junit.client.GWTTestCase; +/** + * TODO: document me. + */ public class TabBarTest extends GWTTestCase { int selected; int beforeSelection; - + public String getModuleName() { return "com.google.gwt.user.User"; } @@ -33,25 +50,26 @@ return true; } } + public void onTabSelected(SourcesTabEvents sender, int tabIndex) { selected = tabIndex; } }; bar.addTabListener(listener); boolean result = bar.selectTab(-1); - assertEquals(-1,beforeSelection); - assertEquals(0,selected); + assertEquals(-1, beforeSelection); + assertEquals(0, selected); assertTrue(result); - + result = bar.selectTab(1); assertFalse(result); - assertEquals(0,selected); + assertEquals(0, selected); assertEquals(1, beforeSelection); - + result = bar.selectTab(2); assertTrue(result); - assertEquals(2,selected); - assertEquals(2,beforeSelection); + assertEquals(2, selected); + assertEquals(2, beforeSelection); } public void testGetHTML() {
diff --git a/user/test/com/google/gwt/user/client/ui/TabPanelTest.java b/user/test/com/google/gwt/user/client/ui/TabPanelTest.java index c6ca910..80713a1 100644 --- a/user/test/com/google/gwt/user/client/ui/TabPanelTest.java +++ b/user/test/com/google/gwt/user/client/ui/TabPanelTest.java
@@ -1,10 +1,27 @@ -//Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.user.client.ui; import com.google.gwt.junit.client.GWTTestCase; import java.util.Iterator; +/** + * TODO: document me. + */ public class TabPanelTest extends GWTTestCase { public String getModuleName() {
diff --git a/user/test/com/google/gwt/user/client/ui/TextAreaTest.java b/user/test/com/google/gwt/user/client/ui/TextAreaTest.java index 2ed200a..aa672cc 100644 --- a/user/test/com/google/gwt/user/client/ui/TextAreaTest.java +++ b/user/test/com/google/gwt/user/client/ui/TextAreaTest.java
@@ -1,9 +1,25 @@ -//Copyright 2006 Google Inc. All Rights Reserved. - +/* + * Copyright 2007 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. + */ package com.google.gwt.user.client.ui; import com.google.gwt.junit.client.GWTTestCase; +/** + * TODO: document me. + */ public class TextAreaTest extends GWTTestCase { public String getModuleName() { @@ -18,7 +34,6 @@ area.setCursorPos(i); assertEquals(i, area.getCursorPos()); } - } public void disabledTestSelection() { @@ -37,9 +52,9 @@ RootPanel.get().add(area); area.setText("a"); - area.selectAll(); + area.selectAll(); assertEquals(1, area.getSelectionLength()); - + area.setText(""); assertEquals(0, area.getSelectionLength()); area.setText("abcde");
diff --git a/user/test/com/google/gwt/user/client/ui/TreeProfile.java b/user/test/com/google/gwt/user/client/ui/TreeProfile.java index 4afce3e..0c871d8 100644 --- a/user/test/com/google/gwt/user/client/ui/TreeProfile.java +++ b/user/test/com/google/gwt/user/client/ui/TreeProfile.java
@@ -1,9 +1,26 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.user.client.ui; import com.google.gwt.user.client.Timer; import com.google.gwt.user.client.Window; +/** + * TODO: document me. + */ public class TreeProfile extends WidgetProfile { // Using 10*10,20*10,20*20,40*20, 40*40, 80*40,80*80 to get answers. 40*20 and @@ -57,7 +74,7 @@ ++run; } }; - createTree(branches); + createTree(branches); } Tree createTree(int[] branches) { @@ -78,7 +95,6 @@ if (branches.length > 1) { createTreeItem(item, branches, 1); } - } timing(branchName); return t; @@ -113,7 +129,6 @@ if (branches.length > 1) { createCheckBoxTreeItem(item, branches, 1); } - } timing(branchName); return t;
diff --git a/user/test/com/google/gwt/user/client/ui/TreeTest.java b/user/test/com/google/gwt/user/client/ui/TreeTest.java index eb065c7..99eac7f 100644 --- a/user/test/com/google/gwt/user/client/ui/TreeTest.java +++ b/user/test/com/google/gwt/user/client/ui/TreeTest.java
@@ -1,5 +1,5 @@ /* - * Copyright 2006 Google Inc. + * Copyright 2007 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 @@ -13,7 +13,6 @@ * License for the specific language governing permissions and limitations under * the License. */ - package com.google.gwt.user.client.ui; import com.google.gwt.junit.client.GWTTestCase; @@ -23,9 +22,12 @@ import java.util.Iterator; +/** + * TODO: document me. + */ public class TreeTest extends GWTTestCase { - public void testClear() { - Tree t = new Tree(); + public void testClear() { + Tree t = new Tree(); // Adding widget to end of tree, widgets still have their parents set // correctly. TreeItem a = new TreeItem("a"); @@ -44,31 +46,30 @@ t.addItem("hello"); t.addItem(eLabel); t.clear(); - assertFalse(t.treeItemIterator().hasNext()); - assertEquals(0, t.getChildWidgets().size()); + assertFalse(t.treeItemIterator().hasNext()); + assertEquals(0, t.getChildWidgets().size()); } - - public void testNulls(){ + + public void testNulls() { // Checking for setting the widget null then clearing the tree. Tree t = new Tree(); TreeItem item = new TreeItem(); item.setWidget(null); t.clear(); - + TreeItem a = t.addItem(""); - TreeItem b =t.addItem(new Label("b")); + TreeItem b = t.addItem(new Label("b")); a.setWidget(null); b.setWidget(null); - } - + public void testSwap() { Tree t = new Tree(); // Start with text. TreeItem item = t.addItem("hello"); - String inner = DOM.getInnerHTML(item.getContentElem()); - assertTrue(inner.indexOf("hello")>=0); + String inner = DOM.getInnerHTML(item.getContentElem()); + assertTrue(inner.indexOf("hello") >= 0); t.addItem(item); Widget goodbyeWidget = new Label("goodbye"); item.setWidget(goodbyeWidget); @@ -81,20 +82,19 @@ assertTrue(DOM.getInnerHTML(widgetItem.getContentElem()).indexOf("hello") >= 0); widgetItem.setText("goodbye"); assertFalse(DOM.getInnerHTML(widgetItem.getContentElem()).indexOf("hello") >= 0); - assertTrue(DOM.getInnerHTML(widgetItem.getContentElem()).indexOf("goodbye")>=0); + assertTrue(DOM.getInnerHTML(widgetItem.getContentElem()).indexOf("goodbye") >= 0); assertNull(hello.getParent()); // Move widget. widgetItem.addItem(item); assertEquals(t, goodbyeWidget.getParent().getParent()); assertEquals(goodbyeWidget, item.getWidget()); - + // Set back to text. item.setText("aloha"); assertEquals("aloha", DOM.getInnerHTML(item.getContentElem())); assertNull(goodbyeWidget.getParent()); assertNull(item.getWidget()); - } public void testRemove() { @@ -115,7 +115,6 @@ assertFalse(iter2.hasNext()); } - public void testTree() { // Simple widget Tree t = new Tree(); @@ -134,12 +133,12 @@ item.setWidget(new Label("now widget")); Element elem = item.getContentElem(); assertEquals(1, DOM.getChildCount(elem)); - + // Add widget to existing tree. Label l2 = new Label("next widget"); simple.setWidget(l2); assertEquals(t, l2.getParent().getParent()); - + // Remove a tree item, make sure widget is removed from tree, but not tree // item. simple.remove(); @@ -164,23 +163,23 @@ assertEquals(t, dLabel.getParent().getParent()); e.setWidget(eLabel); assertEquals(t, eLabel.getParent().getParent()); - + // Tree inside of Tree. Tree childTree = new Tree(); t.addItem(new TreeItem(childTree)); - + // Swap TreeItems to new Tree. childTree.addItem(c); assertEquals(childTree, dLabel.getParent().getParent()); assertEquals(childTree, eLabel.getParent().getParent()); assertTrue(childTree.getChildWidgets().contains(eLabel.getParent())); - + // Make sure remove clears. d.remove(); assertNull(dLabel.getParent().getParent()); assertNull(eLabel.getParent().getParent()); assertFalse(childTree.getChildWidgets().contains(eLabel.getParent())); - + // Should not be able to add getParent Panel p = new SimplePanel(DOM.createDiv()); try { @@ -240,13 +239,13 @@ t.addItem(simple); } - public void testRootAdd(){ - Tree t =new Tree(); + public void testRootAdd() { + Tree t = new Tree(); Label l = new Label("hello"); t.add(l); assertEquals(t, l.getParent().getParent()); } - + public void testInsertSameItemRepeatedly() { Tree t = new Tree(); TreeItem ti = new TreeItem();
diff --git a/user/test/com/google/gwt/user/client/ui/WidgetCollectionTest.java b/user/test/com/google/gwt/user/client/ui/WidgetCollectionTest.java index a7acfbd..33d01ad 100644 --- a/user/test/com/google/gwt/user/client/ui/WidgetCollectionTest.java +++ b/user/test/com/google/gwt/user/client/ui/WidgetCollectionTest.java
@@ -1,10 +1,27 @@ -//Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.user.client.ui; import com.google.gwt.junit.client.GWTTestCase; import java.util.Iterator; +/** + * TODO: document me. + */ public class WidgetCollectionTest extends GWTTestCase { public String getModuleName() { @@ -26,8 +43,9 @@ } public boolean remove(Widget w) { - if (!collection.contains(w)) + if (!collection.contains(w)) { return false; + } collection.remove(w); return true; }
diff --git a/user/test/com/google/gwt/user/client/ui/WidgetProfile.java b/user/test/com/google/gwt/user/client/ui/WidgetProfile.java index 9d15346..d2cb7b0 100644 --- a/user/test/com/google/gwt/user/client/ui/WidgetProfile.java +++ b/user/test/com/google/gwt/user/client/ui/WidgetProfile.java
@@ -1,10 +1,26 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.user.client.ui; import com.google.gwt.user.client.Profile; +/** + * TODO: document me. + */ public abstract class WidgetProfile extends Profile { - public String getModuleName() { return "com.google.gwt.user.User";
diff --git a/user/test/com/google/gwt/user/maptests/FastStringMapTest.java b/user/test/com/google/gwt/user/maptests/FastStringMapTest.java index 8cb4cb5..9ba4d58 100644 --- a/user/test/com/google/gwt/user/maptests/FastStringMapTest.java +++ b/user/test/com/google/gwt/user/maptests/FastStringMapTest.java
@@ -1,4 +1,18 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.user.maptests; import org.apache.commons.collections.TestMap; @@ -10,10 +24,10 @@ */ public class FastStringMapTest extends TestMap { - public String getModuleName() { return "com.google.gwt.user.FastStringMapTest"; } + protected Map makeEmptyMap() { return com.google.gwt.user.client.ui.FastStringMapTest.makeEmptyMap(); }
diff --git a/user/test/com/google/gwt/user/server/rpc/CollectionsTestServiceImpl.java b/user/test/com/google/gwt/user/server/rpc/CollectionsTestServiceImpl.java index 309e78c..208732c 100644 --- a/user/test/com/google/gwt/user/server/rpc/CollectionsTestServiceImpl.java +++ b/user/test/com/google/gwt/user/server/rpc/CollectionsTestServiceImpl.java
@@ -1,5 +1,18 @@ -// Copyright 2006 Google Inc. All Rights Reserved. - +/* + * Copyright 2007 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. + */ package com.google.gwt.user.server.rpc; import com.google.gwt.user.client.rpc.CollectionsTestService; @@ -13,6 +26,9 @@ import java.util.HashSet; import java.util.Vector; +/** + * TODO: document me. + */ public class CollectionsTestServiceImpl extends RemoteServiceServlet implements CollectionsTestService { @@ -33,7 +49,7 @@ boolean[] expected = TestSetFactory.createPrimitiveBooleanArray(); if (!TestSetValidator.equals(expected, actual)) { throw new CollectionsTestServiceException("expected:" - + expected.toString() + " actual:" + actual.toString()); + + expected.toString() + " actual:" + actual.toString()); } return actual; @@ -44,7 +60,7 @@ Boolean[] expected = TestSetFactory.createBooleanArray(); if (!TestSetValidator.equals(expected, actual)) { throw new CollectionsTestServiceException("expected:" - + expected.toString() + " actual:" + actual.toString()); + + expected.toString() + " actual:" + actual.toString()); } return actual; @@ -54,7 +70,7 @@ byte[] expected = TestSetFactory.createPrimitiveByteArray(); if (!TestSetValidator.equals(expected, actual)) { throw new CollectionsTestServiceException("expected:" - + expected.toString() + " actual:" + actual.toString()); + + expected.toString() + " actual:" + actual.toString()); } return actual; @@ -64,7 +80,7 @@ Byte[] expected = TestSetFactory.createByteArray(); if (!TestSetValidator.equals(expected, actual)) { throw new CollectionsTestServiceException("expected:" - + expected.toString() + " actual:" + actual.toString()); + + expected.toString() + " actual:" + actual.toString()); } return actual; @@ -74,7 +90,7 @@ char[] expected = TestSetFactory.createPrimitiveCharArray(); if (!TestSetValidator.equals(expected, actual)) { throw new CollectionsTestServiceException("expected:" - + expected.toString() + " actual:" + actual.toString()); + + expected.toString() + " actual:" + actual.toString()); } return actual; @@ -85,7 +101,7 @@ Character[] expected = TestSetFactory.createCharArray(); if (!TestSetValidator.equals(expected, actual)) { throw new CollectionsTestServiceException("expected:" - + expected.toString() + " actual:" + actual.toString()); + + expected.toString() + " actual:" + actual.toString()); } return actual; @@ -95,7 +111,7 @@ Date[] expected = TestSetFactory.createDateArray(); if (!TestSetValidator.equals(expected, actual)) { throw new CollectionsTestServiceException("expected:" - + toString(expected) + " actual:" + toString(actual)); + + toString(expected) + " actual:" + toString(actual)); } return actual; @@ -105,7 +121,7 @@ double[] expected = TestSetFactory.createPrimitiveDoubleArray(); if (!TestSetValidator.equals(expected, actual)) { throw new CollectionsTestServiceException("expected:" - + expected.toString() + " actual:" + actual.toString()); + + expected.toString() + " actual:" + actual.toString()); } return actual; @@ -115,7 +131,7 @@ Double[] expected = TestSetFactory.createDoubleArray(); if (!TestSetValidator.equals(expected, actual)) { throw new CollectionsTestServiceException("expected:" - + expected.toString() + " actual:" + actual.toString()); + + expected.toString() + " actual:" + actual.toString()); } return actual; @@ -125,7 +141,7 @@ float[] expected = TestSetFactory.createPrimitiveFloatArray(); if (!TestSetValidator.equals(expected, actual)) { throw new CollectionsTestServiceException("expected:" - + expected.toString() + " actual:" + actual.toString()); + + expected.toString() + " actual:" + actual.toString()); } return actual; @@ -135,7 +151,7 @@ Float[] expected = TestSetFactory.createFloatArray(); if (!TestSetValidator.equals(expected, actual)) { throw new CollectionsTestServiceException("expected:" - + expected.toString() + " actual:" + actual.toString()); + + expected.toString() + " actual:" + actual.toString()); } return actual; @@ -145,7 +161,7 @@ HashMap expected = TestSetFactory.createHashMap(); if (!TestSetValidator.isValid(expected, actual)) { throw new CollectionsTestServiceException("expected:" - + expected.toString() + " actual:" + actual.toString()); + + expected.toString() + " actual:" + actual.toString()); } return actual; @@ -155,7 +171,7 @@ HashSet expected = TestSetFactory.createHashSet(); if (!TestSetValidator.isValid(expected, actual)) { throw new CollectionsTestServiceException("expected:" - + expected.toString() + " actual:" + actual.toString()); + + expected.toString() + " actual:" + actual.toString()); } return actual; @@ -165,7 +181,7 @@ int[] expected = TestSetFactory.createPrimitiveIntegerArray(); if (!TestSetValidator.equals(expected, actual)) { throw new CollectionsTestServiceException("expected:" - + expected.toString() + " actual:" + actual.toString()); + + expected.toString() + " actual:" + actual.toString()); } return actual; @@ -176,7 +192,7 @@ Integer[] expected = TestSetFactory.createIntegerArray(); if (!TestSetValidator.equals(expected, actual)) { throw new CollectionsTestServiceException("expected:" - + expected.toString() + " actual:" + actual.toString()); + + expected.toString() + " actual:" + actual.toString()); } return actual; @@ -186,7 +202,7 @@ long[] expected = TestSetFactory.createPrimitiveLongArray(); if (!TestSetValidator.equals(expected, actual)) { throw new CollectionsTestServiceException("expected:" - + expected.toString() + " actual:" + actual.toString()); + + expected.toString() + " actual:" + actual.toString()); } return actual; @@ -196,7 +212,7 @@ Long[] expected = TestSetFactory.createLongArray(); if (!TestSetValidator.equals(expected, actual)) { throw new CollectionsTestServiceException("expected:" - + toString(expected) + " actual:" + toString(actual)); + + toString(expected) + " actual:" + toString(actual)); } return actual; @@ -206,7 +222,7 @@ short[] expected = TestSetFactory.createPrimitiveShortArray(); if (!TestSetValidator.equals(expected, actual)) { throw new CollectionsTestServiceException("expected:" - + expected.toString() + " actual:" + actual.toString()); + + expected.toString() + " actual:" + actual.toString()); } return actual; @@ -216,7 +232,7 @@ Short[] expected = TestSetFactory.createShortArray(); if (!TestSetValidator.equals(expected, actual)) { throw new CollectionsTestServiceException("expected:" - + expected.toString() + " actual:" + actual.toString()); + + expected.toString() + " actual:" + actual.toString()); } return actual; @@ -226,7 +242,7 @@ String[] expected = TestSetFactory.createStringArray(); if (!TestSetValidator.equals(expected, actual)) { throw new CollectionsTestServiceException("expected:" - + expected.toString() + " actual:" + actual.toString()); + + expected.toString() + " actual:" + actual.toString()); } return actual; @@ -236,7 +252,7 @@ Vector expected = TestSetFactory.createVector(); if (!TestSetValidator.isValid(expected, actual)) { throw new CollectionsTestServiceException("expected:" - + expected.toString() + " actual:" + actual.toString()); + + expected.toString() + " actual:" + actual.toString()); } return actual;
diff --git a/user/test/com/google/gwt/user/server/rpc/CustomFieldSerializerTestServiceImpl.java b/user/test/com/google/gwt/user/server/rpc/CustomFieldSerializerTestServiceImpl.java index 4687b9d..addfbf9 100644 --- a/user/test/com/google/gwt/user/server/rpc/CustomFieldSerializerTestServiceImpl.java +++ b/user/test/com/google/gwt/user/server/rpc/CustomFieldSerializerTestServiceImpl.java
@@ -1,3 +1,18 @@ +/* + * Copyright 2007 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. + */ package com.google.gwt.user.server.rpc; import com.google.gwt.user.client.rpc.CustomFieldSerializerTestService; @@ -5,6 +20,9 @@ import com.google.gwt.user.client.rpc.UnserializableClass; import com.google.gwt.user.client.rpc.CustomFieldSerializerTestSetFactory.SerializableSubclass; +/** + * TODO: document me. + */ public class CustomFieldSerializerTestServiceImpl extends RemoteServiceServlet implements CustomFieldSerializerTestService {
diff --git a/user/test/com/google/gwt/user/server/rpc/InheritanceTestServiceImpl.java b/user/test/com/google/gwt/user/server/rpc/InheritanceTestServiceImpl.java index 581d679..750431b 100644 --- a/user/test/com/google/gwt/user/server/rpc/InheritanceTestServiceImpl.java +++ b/user/test/com/google/gwt/user/server/rpc/InheritanceTestServiceImpl.java
@@ -1,3 +1,18 @@ +/* + * Copyright 2007 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. + */ package com.google.gwt.user.server.rpc; import com.google.gwt.user.client.rpc.InheritanceTestSetFactory; @@ -9,6 +24,9 @@ import com.google.gwt.user.client.rpc.InheritanceTestSetFactory.SerializableClassWithTransientField; import com.google.gwt.user.client.rpc.InheritanceTestSetFactory.SerializableSubclass; +/** + * TODO: document me. + */ public class InheritanceTestServiceImpl extends RemoteServiceServlet implements InheritanceTestService {
diff --git a/user/test/com/google/gwt/user/server/rpc/ObjectGraphTestServiceImpl.java b/user/test/com/google/gwt/user/server/rpc/ObjectGraphTestServiceImpl.java index 34ef65a..b293bf1 100644 --- a/user/test/com/google/gwt/user/server/rpc/ObjectGraphTestServiceImpl.java +++ b/user/test/com/google/gwt/user/server/rpc/ObjectGraphTestServiceImpl.java
@@ -1,11 +1,27 @@ -// Copyright 2006 Google Inc. All Rights Reserved. - +/* + * Copyright 2007 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. + */ package com.google.gwt.user.server.rpc; import com.google.gwt.user.client.rpc.ObjectGraphTestService; import com.google.gwt.user.client.rpc.TestSetValidator; import com.google.gwt.user.client.rpc.TestSetFactory.SerializableDoublyLinkedNode; +/** + * TODO: document me. + */ public class ObjectGraphTestServiceImpl extends RemoteServiceServlet implements ObjectGraphTestService { @@ -36,11 +52,12 @@ return root; } - public SerializableDoublyLinkedNode echo_ComplexCyclicGraph(SerializableDoublyLinkedNode node1, SerializableDoublyLinkedNode node2) { + public SerializableDoublyLinkedNode echo_ComplexCyclicGraph( + SerializableDoublyLinkedNode node1, SerializableDoublyLinkedNode node2) { if (node1 != node2) { throw new RuntimeException(); } - + return node1; } }
diff --git a/user/test/com/google/gwt/user/server/rpc/RemoteServiceServletTestServiceImpl.java b/user/test/com/google/gwt/user/server/rpc/RemoteServiceServletTestServiceImpl.java index 2eb287b..ba11a06 100644 --- a/user/test/com/google/gwt/user/server/rpc/RemoteServiceServletTestServiceImpl.java +++ b/user/test/com/google/gwt/user/server/rpc/RemoteServiceServletTestServiceImpl.java
@@ -1,6 +1,23 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.user.server.rpc; +/** + * TODO: document me. + */ public class RemoteServiceServletTestServiceImpl extends RemoteServiceServletTestServiceImplBase { }
diff --git a/user/test/com/google/gwt/user/server/rpc/RemoteServiceServletTestServiceImplBase.java b/user/test/com/google/gwt/user/server/rpc/RemoteServiceServletTestServiceImplBase.java index 792e34a..384eb27 100644 --- a/user/test/com/google/gwt/user/server/rpc/RemoteServiceServletTestServiceImplBase.java +++ b/user/test/com/google/gwt/user/server/rpc/RemoteServiceServletTestServiceImplBase.java
@@ -1,10 +1,27 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.user.server.rpc; import com.google.gwt.user.client.rpc.RemoteServiceServletTestService; -public class RemoteServiceServletTestServiceImplBase extends RemoteServiceServlet - implements RemoteServiceServletTestService { +/** + * TODO: document me. + */ +public class RemoteServiceServletTestServiceImplBase extends + RemoteServiceServlet implements RemoteServiceServletTestService { public void test() { }
diff --git a/user/test/com/google/gwt/user/server/rpc/ValueTypesTestServiceImpl.java b/user/test/com/google/gwt/user/server/rpc/ValueTypesTestServiceImpl.java index 88e2788..f552c3a 100644 --- a/user/test/com/google/gwt/user/server/rpc/ValueTypesTestServiceImpl.java +++ b/user/test/com/google/gwt/user/server/rpc/ValueTypesTestServiceImpl.java
@@ -1,9 +1,25 @@ -// Copyright 2006 Google Inc. All Rights Reserved. - +/* + * Copyright 2007 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. + */ package com.google.gwt.user.server.rpc; import com.google.gwt.user.client.rpc.ValueTypesTestService; +/** + * TODO: document me. + */ public class ValueTypesTestServiceImpl extends RemoteServiceServlet implements ValueTypesTestService { @@ -86,7 +102,7 @@ public long echo_MAX_VALUE(long value) { if (value != Long.MAX_VALUE) { throw new RuntimeException("expected:" + Long.toString(Long.MAX_VALUE) - + " actual:" + Long.toString(value)); + + " actual:" + Long.toString(value)); } return value; @@ -143,7 +159,7 @@ public long echo_MIN_VALUE(long value) { if (value != Long.MIN_VALUE) { throw new RuntimeException("expected:" + Long.toString(Long.MIN_VALUE) - + " actual:" + Long.toString(value)); + + " actual:" + Long.toString(value)); } return value;
diff --git a/user/test/com/google/gwt/user/server/ui/FormPanelTestServlet.java b/user/test/com/google/gwt/user/server/ui/FormPanelTestServlet.java index d16d53d..56ae306 100644 --- a/user/test/com/google/gwt/user/server/ui/FormPanelTestServlet.java +++ b/user/test/com/google/gwt/user/server/ui/FormPanelTestServlet.java
@@ -1,3 +1,18 @@ +/* + * Copyright 2007 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. + */ package com.google.gwt.user.server.ui; import java.io.BufferedReader; @@ -8,6 +23,9 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +/** + * TODO: document me. + */ public class FormPanelTestServlet extends HttpServlet { protected void doGet(HttpServletRequest req, HttpServletResponse rsp)
diff --git a/user/test/com/google/gwt/xml/client/XMLTest.java b/user/test/com/google/gwt/xml/client/XMLTest.java index 5f51b8f..d9e983f 100644 --- a/user/test/com/google/gwt/xml/client/XMLTest.java +++ b/user/test/com/google/gwt/xml/client/XMLTest.java
@@ -1,4 +1,18 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package com.google.gwt.xml.client; import com.google.gwt.junit.client.GWTTestCase; @@ -43,22 +57,22 @@ DocumentFragment createDocumentFragment = d.createDocumentFragment(); Element elementWithChildren = d.createElement("elementWithChildren"); ProcessingInstruction createProcessingInstruction = d.createProcessingInstruction( - "target", "processing instruction data"); + "target", "processing instruction data"); Text createTextNode = d.createTextNode("sample text node"); // TODO: what is "all" for? - List all = asList(new Node[]{ - createCDATA, createComment, createDocumentFragment, elementWithChildren, - createProcessingInstruction, createTextNode}); - List canHaveChildren = asList(new Node[]{ - createDocumentFragment, elementWithChildren}); - List canBeChildren = asList(new Node[]{ - createCDATA, createComment, elementWithChildren, - createProcessingInstruction, createTextNode}); + List all = asList(new Node[] { + createCDATA, createComment, createDocumentFragment, + elementWithChildren, createProcessingInstruction, createTextNode}); + List canHaveChildren = asList(new Node[] { + createDocumentFragment, elementWithChildren}); + List canBeChildren = asList(new Node[] { + createCDATA, createComment, elementWithChildren, + createProcessingInstruction, createTextNode}); for (int i = 0; i < canHaveChildren.size(); i++) { Node parent = (Node) canHaveChildren.get(i); Node cloneParent = parent.cloneNode(false); - if(canBeChildren.contains(parent)) { + if (canBeChildren.contains(parent)) { d.appendChild(cloneParent); } for (int j = 0; j < canBeChildren.size(); j++) { @@ -69,7 +83,7 @@ Node clonedChild = cloneParent.getChildNodes().item(j); Node hopefullySameChild = (Node) canBeChildren.get(j); assertEquals(hopefullySameChild.cloneNode(false).toString(), - clonedChild.toString()); + clonedChild.toString()); } Node deepClonedNode = parent.cloneNode(true); assertEquals(parent.toString(), deepClonedNode.toString()); @@ -77,16 +91,15 @@ XMLParser.removeWhitespace(d); if (XMLParser.supportsCDATASection()) { assertEquals("<elementWithChildren>" + "<![CDATA[sampl<<< >>e data]]>" - + "<!--a sample comment-->" + "<elementWithChildren/>" - + "<?target processing instruction data?>" + "sample text node" - + "</elementWithChildren>", d.toString()); + + "<!--a sample comment-->" + "<elementWithChildren/>" + + "<?target processing instruction data?>" + "sample text node" + + "</elementWithChildren>", d.toString()); } else { // Opera does not support CDATASection nodes assertEquals("<elementWithChildren>" + "sample data" - + "<!--a sample comment-->" + "<elementWithChildren/>" - + "<?target processing instruction data?>" + "sample text node" - + "</elementWithChildren>", d.toString()); - + + "<!--a sample comment-->" + "<elementWithChildren/>" + + "<?target processing instruction data?>" + "sample text node" + + "</elementWithChildren>", d.toString()); } } @@ -134,11 +147,11 @@ public void testPrefix() { Document d = XMLParser.parse("<?xml version=\"1.0\"?>\r\n" - + "<!-- both namespace prefixes are available throughout -->\r\n" - + "<bk:book xmlns:bk=\'urn:loc.gov:books\'\r\n" - + " xmlns:isbn=\'urn:ISBN:0-395-36341-6\'>\r\n" - + " <bk:title>Cheaper by the Dozen</bk:title>\r\n" - + " <isbn:number>1568491379</isbn:number>\r\n" + "</bk:book>"); + + "<!-- both namespace prefixes are available throughout -->\r\n" + + "<bk:book xmlns:bk=\'urn:loc.gov:books\'\r\n" + + " xmlns:isbn=\'urn:ISBN:0-395-36341-6\'>\r\n" + + " <bk:title>Cheaper by the Dozen</bk:title>\r\n" + + " <isbn:number>1568491379</isbn:number>\r\n" + "</bk:book>"); assertEquals(d.getDocumentElement().getNodeName(), "bk:book"); assertEquals(d.getDocumentElement().getPrefix(), "bk"); assertEquals(d.getElementsByTagName("book").getLength(), 1); @@ -149,25 +162,25 @@ Document d = createTestDocument(); Element documentElement = d.getDocumentElement(); assertEquals("getPreviousSibling", documentElement.getPreviousSibling(), - d.getChildNodes().item(0)); + d.getChildNodes().item(0)); assertEquals("getNextSibling", documentElement.getNextSibling(), - d.getChildNodes().item(2)); + d.getChildNodes().item(2)); assertEquals("getDocumentElement", documentElement, d.getChildNodes().item( - 1)); + 1)); assertEquals("getTagName", documentElement.getTagName(), "doc"); NodeList documentElementChildNodes = documentElement.getChildNodes(); int deChildNodesLength = documentElementChildNodes.getLength(); assertEquals("getFirstChild", documentElement.getFirstChild(), - documentElementChildNodes.item(0)); + documentElementChildNodes.item(0)); assertEquals("getLastChild", documentElement.getLastChild(), - documentElementChildNodes.item(deChildNodesLength - 1)); + documentElementChildNodes.item(deChildNodesLength - 1)); assertEquals("getNextSibling2", - documentElement.getFirstChild().getNextSibling(), - documentElementChildNodes.item(1)); + documentElement.getFirstChild().getNextSibling(), + documentElementChildNodes.item(1)); assertEquals("getPreviousSibling2", - documentElement.getLastChild().getPreviousSibling(), - documentElementChildNodes.item(deChildNodesLength - 2)); + documentElement.getLastChild().getPreviousSibling(), + documentElementChildNodes.item(deChildNodesLength - 2)); } public void testNode() { @@ -196,7 +209,7 @@ Document d = XMLParser.parse("<!--hello--> <a spam=\"ham\">\n <?pi hello ?>dfgdfg <b/>\t</a>"); XMLParser.removeWhitespace(d); assertEquals("<!--hello--><a spam=\"ham\"><?pi hello ?>dfgdfg <b/></a>", - d.toString()); + d.toString()); try { XMLParser.parse("<<<"); fail(); @@ -215,8 +228,8 @@ public void testText() { Document d = createTestDocument(); - List textLikeNodes = Arrays.asList(new Node[]{ - d.createTextNode(""), d.createCDATASection(""), d.createComment("")}); + List textLikeNodes = Arrays.asList(new Node[] { + d.createTextNode(""), d.createCDATASection(""), d.createComment("")}); StringBuffer b = new StringBuffer(); for (char i = 32; i < 30000; i++) { b.append(i); @@ -225,14 +238,14 @@ CharacterData textLike = (CharacterData) iter.next(); textLike.setData(b.toString()); assertEquals("initialLength type:" + textLike.getNodeType(), 30000 - 32, - textLike.getLength()); + textLike.getLength()); assertEquals("initialEquals", textLike.getData(), b.toString()); } for (int i = 32; i < 29900; i += 100) { for (Iterator iter = textLikeNodes.iterator(); iter.hasNext();) { CharacterData textLike = (CharacterData) iter.next(); assertEquals("substring type:" + textLike.getNodeType() + " count: " - + i, b.substring(i, i + 100), textLike.substringData(i, 100)); + + i, b.substring(i, i + 100), textLike.substringData(i, 100)); } } for (Iterator iter = textLikeNodes.iterator(); iter.hasNext();) { @@ -241,9 +254,9 @@ textLike.deleteData(100, 100); bTemp.delete(100, 200); assertEquals("deleteLength type:" + textLike.getNodeType(), - bTemp.length(), textLike.getData().length()); + bTemp.length(), textLike.getData().length()); assertEquals("deleteEquals type:" + textLike.getNodeType(), - bTemp.toString(), textLike.getData()); + bTemp.toString(), textLike.getData()); bTemp.setLength(0); } for (Iterator iter = textLikeNodes.iterator(); iter.hasNext();) { @@ -253,9 +266,9 @@ textLike.replaceData(50, 100, " "); bTemp.replace(50, 150, " "); assertEquals("replaceLength type:" + textLike.getNodeType(), - bTemp.length(), textLike.getData().length()); + bTemp.length(), textLike.getData().length()); assertEquals("replaceEquals type:" + textLike.getNodeType(), - bTemp.toString(), textLike.getData()); + bTemp.toString(), textLike.getData()); bTemp.setLength(0); } for (Iterator iter = textLikeNodes.iterator(); iter.hasNext();) { @@ -269,17 +282,17 @@ Text t = (Text) d.getDocumentElement().getChildNodes().item(3); Text rightT = t.splitText(5); assertEquals("t and leftT parent equality", t.getParentNode(), - rightT.getParentNode()); + rightT.getParentNode()); assertEquals("leftT.getPreviousSibling", rightT.getPreviousSibling(), t); assertEquals("t.length", t.getData().length(), 5); assertEquals("leftT.length", rightT.getData().length(), 5); assertEquals("t data", t.getData(), "01234"); assertEquals("LeftT data", rightT.getData(), "56789"); CDATASection cd = (CDATASection) d.getDocumentElement().getChildNodes().item( - 5); + 5); Text rightCD = cd.splitText(5); assertEquals("cd and leftCd parent equality", cd.getParentNode(), - rightCD.getParentNode()); + rightCD.getParentNode()); assertEquals("leftCD.getPreviousSibling", rightCD.getPreviousSibling(), cd); assertEquals("cd length", cd.getData().length(), 5); assertEquals("leftCD.length", rightCD.getData().length(), 5); @@ -288,10 +301,10 @@ d.getDocumentElement().normalize(); if (XMLParser.supportsCDATASection()) { assertEquals("normalized t", d.getDocumentElement().getChildNodes().item( - 3).toString(), "0123456789"); + 3).toString(), "0123456789"); } else { assertEquals("normalized t", d.getDocumentElement().getChildNodes().item( - 3).toString(), "0123456789abcdefghij"); + 3).toString(), "0123456789abcdefghij"); } } @@ -306,7 +319,7 @@ top.setAttribute("numAttributes", "2"); d.appendChild(top); ProcessingInstruction commentBefore = d.createProcessingInstruction( - "target", "some data"); + "target", "some data"); d.insertBefore(commentBefore, top); Comment commentAfter = d.createComment("after the element"); d.insertBefore(commentAfter, null);
diff --git a/user/test/test/ServletMappingTest.java b/user/test/test/ServletMappingTest.java index 67755ec..8d88a96 100644 --- a/user/test/test/ServletMappingTest.java +++ b/user/test/test/ServletMappingTest.java
@@ -1,3 +1,18 @@ +/* + * Copyright 2007 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. + */ package test; import com.google.gwt.core.client.GWT; @@ -5,6 +20,9 @@ import com.google.gwt.user.client.rpc.AsyncCallback; import com.google.gwt.user.client.rpc.ServiceDefTarget; +/** + * TODO: document me. + */ public class ServletMappingTest extends GWTTestCase { private static final int RPC_WAIT = 5000; @@ -118,7 +136,7 @@ */ public void testTotallyDifferentServletMapping3() { makeAsyncCall(GWT.getModuleBaseURL() - + "totally/different/but/valid?a=b&c=d", new AsyncCallback() { + + "totally/different/but/valid?a=b&c=d", new AsyncCallback() { public void onFailure(Throwable caught) { fail(caught.toString()); } @@ -131,8 +149,7 @@ } private void makeAsyncCall(String url, AsyncCallback callback) { - ServletMappingTestServiceAsync async = (ServletMappingTestServiceAsync) GWT - .create(ServletMappingTestService.class); + ServletMappingTestServiceAsync async = (ServletMappingTestServiceAsync) GWT.create(ServletMappingTestService.class); ServiceDefTarget target = (ServiceDefTarget) async; target.setServiceEntryPoint(url); delayTestFinish(RPC_WAIT);
diff --git a/user/test/test/ServletMappingTestApp.java b/user/test/test/ServletMappingTestApp.java index a10ff94..d1d5cf7 100644 --- a/user/test/test/ServletMappingTestApp.java +++ b/user/test/test/ServletMappingTestApp.java
@@ -1,11 +1,28 @@ -// Copyright 2006 Google Inc. All Rights Reserved. +/* + * Copyright 2007 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. + */ package test; import com.google.gwt.core.client.EntryPoint; import com.google.gwt.user.client.Window; +/** + * TODO: document me. + */ public class ServletMappingTestApp implements EntryPoint { public void onModuleLoad() { Window.alert("ServletMappingTest onModuleLoad()"); } -} \ No newline at end of file +}
diff --git a/user/test/test/ServletMappingTestService.java b/user/test/test/ServletMappingTestService.java index 80866ea..ae3e35c 100644 --- a/user/test/test/ServletMappingTestService.java +++ b/user/test/test/ServletMappingTestService.java
@@ -1,7 +1,25 @@ +/* + * Copyright 2007 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. + */ package test; import com.google.gwt.user.client.rpc.RemoteService; +/** + * TODO: document me. + */ public interface ServletMappingTestService extends RemoteService { int which();
diff --git a/user/test/test/ServletMappingTestServiceAsync.java b/user/test/test/ServletMappingTestServiceAsync.java index 553ed27..71fda55 100644 --- a/user/test/test/ServletMappingTestServiceAsync.java +++ b/user/test/test/ServletMappingTestServiceAsync.java
@@ -1,7 +1,25 @@ +/* + * Copyright 2007 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. + */ package test; import com.google.gwt.user.client.rpc.AsyncCallback; +/** + * TODO: document me. + */ public interface ServletMappingTestServiceAsync { void which(AsyncCallback callback);
diff --git a/user/test/test/ServletMappingTestServiceImpl1.java b/user/test/test/ServletMappingTestServiceImpl1.java index deaeada..0269192 100644 --- a/user/test/test/ServletMappingTestServiceImpl1.java +++ b/user/test/test/ServletMappingTestServiceImpl1.java
@@ -1,7 +1,25 @@ +/* + * Copyright 2007 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. + */ package test; import com.google.gwt.user.server.rpc.RemoteServiceServlet; +/** + * TODO: document me. + */ public class ServletMappingTestServiceImpl1 extends RemoteServiceServlet implements ServletMappingTestService {
diff --git a/user/test/test/ServletMappingTestServiceImpl2.java b/user/test/test/ServletMappingTestServiceImpl2.java index a90c54b..b349cf8 100644 --- a/user/test/test/ServletMappingTestServiceImpl2.java +++ b/user/test/test/ServletMappingTestServiceImpl2.java
@@ -1,7 +1,25 @@ +/* + * Copyright 2007 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. + */ package test; import com.google.gwt.user.server.rpc.RemoteServiceServlet; +/** + * TODO: document me. + */ public class ServletMappingTestServiceImpl2 extends RemoteServiceServlet implements ServletMappingTestService {
diff --git a/user/test/test/ServletMappingTestServiceImpl3.java b/user/test/test/ServletMappingTestServiceImpl3.java index 53f3a84..7c3e3f6 100644 --- a/user/test/test/ServletMappingTestServiceImpl3.java +++ b/user/test/test/ServletMappingTestServiceImpl3.java
@@ -1,7 +1,25 @@ +/* + * Copyright 2007 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. + */ package test; import com.google.gwt.user.server.rpc.RemoteServiceServlet; +/** + * TODO: document me. + */ public class ServletMappingTestServiceImpl3 extends RemoteServiceServlet implements ServletMappingTestService {