Revision: 8874
Author: [email protected]
Date: Tue Jul 20 09:29:15 2010
Log: Moved Test suites and benchmarks to separate packages to prevent
spammy errors
http://code.google.com/p/google-web-toolkit/source/detail?r=8874
Added:
/branches/lwc-gwt-migration/bikeshed/test/com/google/gwt/collections/benchmarks
/branches/lwc-gwt-migration/bikeshed/test/com/google/gwt/collections/benchmarks/CollectionsBenchmarks.gwt.xml
/branches/lwc-gwt-migration/bikeshed/test/com/google/gwt/collections/benchmarks/MutableArrayBenchmarkTest.java
/branches/lwc-gwt-migration/bikeshed/test/com/google/gwt/collections/benchmarks/MutableArrayComparisonBenchmark.java
Deleted:
/branches/lwc-gwt-migration/bikeshed/test/com/google/gwt/collections/MutableArrayBenchmarkTest.java
/branches/lwc-gwt-migration/bikeshed/test/com/google/gwt/collections/MutableArrayComparisonBenchmark.java
Modified:
/branches/lwc-gwt-migration/bikeshed/src/com/google/gwt/collections/Collections.gwt.xml
/branches/lwc-gwt-migration/bikeshed/test/com/google/gwt/collections/CollectionsServerSideTestSuite.java
/branches/lwc-gwt-migration/bikeshed/test-super/com/google/gwt/collections/super/com/google/gwt/collections/MutableArrayInternalTest.java
=======================================
--- /dev/null
+++
/branches/lwc-gwt-migration/bikeshed/test/com/google/gwt/collections/benchmarks/CollectionsBenchmarks.gwt.xml
Tue Jul 20 09:29:15 2010
@@ -0,0 +1,21 @@
+<!--
+ Copyright 2010 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.
+-->
+<module>
+ <inherits name='com.google.gwt.user.User'/>
+ <inherits name='com.google.gwt.benchmarks.Benchmarks'/>
+ <inherits name='com.google.gwt.collections.Collections'/>
+ <source path="" />
+</module>
=======================================
--- /dev/null
+++
/branches/lwc-gwt-migration/bikeshed/test/com/google/gwt/collections/benchmarks/MutableArrayBenchmarkTest.java
Tue Jul 20 09:29:15 2010
@@ -0,0 +1,98 @@
+/*
+ * Copyright 2009 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.collections.benchmarks;
+
+import com.google.gwt.benchmarks.client.Benchmark;
+import com.google.gwt.benchmarks.client.IntRange;
+import com.google.gwt.benchmarks.client.Operator;
+import com.google.gwt.benchmarks.client.RangeField;
+import com.google.gwt.collections.CollectionFactory;
+import com.google.gwt.collections.MutableArray;
+
+import java.util.ArrayList;
+
+/**
+ * Benchmarks the performance of various MutableArray methods.
+ */
+public class MutableArrayBenchmarkTest extends Benchmark {
+
+ final IntRange elemRange = new IntRange(5, 30000, Operator.ADD, 500);
+
+ @Override
+ public String getModuleName() {
+ return "com.google.gwt.collections.benchmarks.CollectionsBenchmarks";
+ }
+
+ public void testGwtCollectionsArrayAddGrowth() {
+ }
+
+ public void testGwtCollectionsArrayAddGrowth(@RangeField("elemRange")
Integer numElements) {
+ MutableArray<Integer> ma = CollectionFactory.createMutableArray();
+
+ for (int i = 0; i < numElements; i++) {
+ ma.add(i);
+ }
+ }
+
+ public void testGwtCollectionsArraySetSizeGrowth() {
+ }
+
+ public void
testGwtCollectionsArraySetSizeGrowth(@RangeField("elemRange") Integer
numElements) {
+ MutableArray<Integer> ma =
+ CollectionFactory.createMutableArray(numElements);
+
+ ma.setSize(numElements, null);
+ for (int i = 0; i < numElements; i++) {
+ ma.set(i, i);
+ }
+ }
+
+ public void testGwtCollectionsArraySetSizeInitGrowth() {
+ }
+
+ public void testGwtCollectionsArraySetSizeInitGrowth(
+ @RangeField("elemRange") Integer numElements) {
+ MutableArray<Integer> ma =
+ CollectionFactory.createMutableArray(numElements, new Integer(0));
+
+ for (int i = 0; i < numElements; i++) {
+ ma.set(i, i);
+ }
+ }
+
+ public void testJavaArraySetGrowth() {
+ }
+
+ public void testJavaArraySetGrowth(@RangeField("elemRange") Integer
numElements) {
+ Integer[] ia = new Integer[numElements];
+
+ for (int i = 0; i < numElements; i++) {
+ ia[i] = i;
+ }
+ }
+
+ public void testJreArrayListAddGrowth() {
+ }
+
+ public void testJreArrayListAddGrowth(@RangeField("elemRange") Integer
numElements) {
+ ArrayList<Integer> al = new ArrayList<Integer>();
+
+ for (int i = 0; i < numElements; i++) {
+ al.add(i);
+ }
+ }
+
+}
=======================================
--- /dev/null
+++
/branches/lwc-gwt-migration/bikeshed/test/com/google/gwt/collections/benchmarks/MutableArrayComparisonBenchmark.java
Tue Jul 20 09:29:15 2010
@@ -0,0 +1,133 @@
+/*
+ * Copyright 2010 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.collections.benchmarks;
+
+import com.google.gwt.benchmarks.client.Benchmark;
+import com.google.gwt.benchmarks.client.IntRange;
+import com.google.gwt.benchmarks.client.Operator;
+import com.google.gwt.benchmarks.client.RangeField;
+import com.google.gwt.collections.CollectionFactory;
+import com.google.gwt.collections.MutableArray;
+
+import java.util.ArrayList;
+
+/**
+ * Benchmarks the performance of various MutableArray methods.
+ */
+public class MutableArrayComparisonBenchmark extends Benchmark {
+
+ final IntRange elemRange = new IntRange(5, 30005, Operator.ADD, 5000);
+ final ArrayBuildType[] testKind = {ArrayBuildType.GWT_ADD,
+ ArrayBuildType.GWT_SET, ArrayBuildType.GWT_SET_INIT,
+ ArrayBuildType.JRE_ARRAY, ArrayBuildType.JRE_LIST};
+
+ /**
+ * Type of array construction to benchmark
+ */
+ protected enum ArrayBuildType {
+ GWT_ADD("GWT Array add()"), GWT_SET("GWT sized create"),
+ GWT_SET_INIT("GWT sized create + initialization"), JRE_ARRAY("JRE
Array"),
+ JRE_LIST("JRE ArrayList");
+
+ public String description;
+
+ private ArrayBuildType(String description) {
+ this.description = description;
+ }
+ }
+
+ @Override
+ public String getModuleName() {
+ return "com.google.gwt.collections.benchmarks.CollectionsBenchmarks";
+ }
+
+ /**
+ * Required by benchmarking framework.
+ */
+ public void testComparativePerformance() {
+ }
+
+ public void testComparativePerformance(
+ @RangeField("elemRange") Integer numElements,
+ @RangeField("testKind") ArrayBuildType test) {
+ switch (test) {
+ case GWT_ADD:
+ gwtCollectionsArrayAddGrowth(numElements);
+ break;
+
+ case GWT_SET:
+ gwtCollectionsArraySetSizeGrowth(numElements);
+ break;
+
+ case GWT_SET_INIT:
+ gwtCollectionsArraySetSizeInitGrowth(numElements);
+ break;
+
+ case JRE_ARRAY:
+ javaArraySetGrowth(numElements);
+ break;
+
+ case JRE_LIST:
+ jreArrayListAddGrowth(numElements);
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ private void gwtCollectionsArrayAddGrowth(Integer numElements) {
+ MutableArray<Integer> ma = CollectionFactory.createMutableArray();
+
+ for (int i = 0; i < numElements; i++) {
+ ma.add(i);
+ }
+ }
+
+ private void gwtCollectionsArraySetSizeGrowth(Integer numElements) {
+ MutableArray<Integer> ma =
CollectionFactory.createMutableArray(numElements);
+
+ for (int i = 0; i < numElements; i++) {
+ ma.set(i, i);
+ }
+ }
+
+ private void gwtCollectionsArraySetSizeInitGrowth(Integer numElements) {
+ MutableArray<Integer> ma =
+ CollectionFactory.createMutableArray(numElements, new Integer(0));
+
+ for (int i = 0; i < numElements; i++) {
+ ma.set(i, i);
+ }
+ }
+
+ private void javaArraySetGrowth(Integer numElements) {
+ Integer[] ia = new Integer[numElements];
+
+ for (int i = 0; i < numElements; i++) {
+ ia[i] = i;
+ }
+ }
+
+ private void jreArrayListAddGrowth(Integer numElements) {
+ ArrayList<Integer> al = new ArrayList<Integer>();
+
+ for (int i = 0; i < numElements; i++) {
+ al.add(i);
+ }
+ }
+
+}
=======================================
---
/branches/lwc-gwt-migration/bikeshed/test/com/google/gwt/collections/MutableArrayBenchmarkTest.java
Mon Jun 14 11:58:23 2010
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright 2009 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.collections;
-
-import com.google.gwt.benchmarks.client.Benchmark;
-import com.google.gwt.benchmarks.client.IntRange;
-import com.google.gwt.benchmarks.client.Operator;
-import com.google.gwt.benchmarks.client.RangeField;
-
-import java.util.ArrayList;
-
-/**
- * Benchmarks the performance of various MutableArray methods.
- */
-public class MutableArrayBenchmarkTest extends Benchmark {
-
- final IntRange elemRange = new IntRange(5, 30000, Operator.ADD, 500);
-
- @Override
- public String getModuleName() {
- return "com.google.gwt.collections.Collections";
- }
-
- public void testGwtCollectionsArrayAddGrowth() {
- }
-
- public void testGwtCollectionsArrayAddGrowth(@RangeField("elemRange")
Integer numElements) {
- MutableArray<Integer> ma = CollectionFactory.createMutableArray();
-
- for (int i = 0; i < numElements; i++) {
- ma.add(i);
- }
- }
-
- public void testGwtCollectionsArraySetSizeGrowth() {
- }
-
- public void
testGwtCollectionsArraySetSizeGrowth(@RangeField("elemRange") Integer
numElements) {
- MutableArray<Integer> ma =
- CollectionFactory.createMutableArray(numElements);
-
- ma.setSize(numElements, null);
- for (int i = 0; i < numElements; i++) {
- ma.set(i, i);
- }
- }
-
- public void testGwtCollectionsArraySetSizeInitGrowth() {
- }
-
- public void testGwtCollectionsArraySetSizeInitGrowth(
- @RangeField("elemRange") Integer numElements) {
- MutableArray<Integer> ma =
- CollectionFactory.createMutableArray(numElements, new Integer(0));
-
- for (int i = 0; i < numElements; i++) {
- ma.set(i, i);
- }
- }
-
- public void testJavaArraySetGrowth() {
- }
-
- public void testJavaArraySetGrowth(@RangeField("elemRange") Integer
numElements) {
- Integer[] ia = new Integer[numElements];
-
- for (int i = 0; i < numElements; i++) {
- ia[i] = i;
- }
- }
-
- public void testJreArrayListAddGrowth() {
- }
-
- public void testJreArrayListAddGrowth(@RangeField("elemRange") Integer
numElements) {
- ArrayList<Integer> al = new ArrayList<Integer>();
-
- for (int i = 0; i < numElements; i++) {
- al.add(i);
- }
- }
-
-}
=======================================
---
/branches/lwc-gwt-migration/bikeshed/test/com/google/gwt/collections/MutableArrayComparisonBenchmark.java
Mon Jun 14 11:58:23 2010
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright 2010 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.collections;
-
-import com.google.gwt.benchmarks.client.Benchmark;
-import com.google.gwt.benchmarks.client.IntRange;
-import com.google.gwt.benchmarks.client.Operator;
-import com.google.gwt.benchmarks.client.RangeField;
-
-import java.util.ArrayList;
-
-/**
- * Benchmarks the performance of various MutableArray methods.
- */
-public class MutableArrayComparisonBenchmark extends Benchmark {
-
- final IntRange elemRange = new IntRange(5, 30005, Operator.ADD, 5000);
- final ArrayBuildType[] testKind = {ArrayBuildType.GWT_ADD,
- ArrayBuildType.GWT_SET, ArrayBuildType.GWT_SET_INIT,
- ArrayBuildType.JRE_ARRAY, ArrayBuildType.JRE_LIST};
-
- /**
- * Type of array construction to benchmark
- */
- protected enum ArrayBuildType {
- GWT_ADD("GWT Array add()"), GWT_SET("GWT sized create"),
- GWT_SET_INIT("GWT sized create + initialization"), JRE_ARRAY("JRE
Array"),
- JRE_LIST("JRE ArrayList");
-
- public String description;
-
- private ArrayBuildType(String description) {
- this.description = description;
- }
- }
-
- @Override
- public String getModuleName() {
- return "com.google.gwt.collections.Collections";
- }
-
- /**
- * Required by benchmarking framework.
- */
- public void testComparativePerformance() {
- }
-
- public void testComparativePerformance(
- @RangeField("elemRange") Integer numElements,
- @RangeField("testKind") ArrayBuildType test) {
- switch (test) {
- case GWT_ADD:
- gwtCollectionsArrayAddGrowth(numElements);
- break;
-
- case GWT_SET:
- gwtCollectionsArraySetSizeGrowth(numElements);
- break;
-
- case GWT_SET_INIT:
- gwtCollectionsArraySetSizeInitGrowth(numElements);
- break;
-
- case JRE_ARRAY:
- javaArraySetGrowth(numElements);
- break;
-
- case JRE_LIST:
- jreArrayListAddGrowth(numElements);
- break;
-
- default:
- break;
- }
- }
-
- private void gwtCollectionsArrayAddGrowth(Integer numElements) {
- MutableArray<Integer> ma = CollectionFactory.createMutableArray();
-
- for (int i = 0; i < numElements; i++) {
- ma.add(i);
- }
- }
-
- private void gwtCollectionsArraySetSizeGrowth(Integer numElements) {
- MutableArray<Integer> ma =
CollectionFactory.createMutableArray(numElements);
-
- for (int i = 0; i < numElements; i++) {
- ma.set(i, i);
- }
- }
-
- private void gwtCollectionsArraySetSizeInitGrowth(Integer numElements) {
- MutableArray<Integer> ma =
- CollectionFactory.createMutableArray(numElements, new Integer(0));
-
- for (int i = 0; i < numElements; i++) {
- ma.set(i, i);
- }
- }
-
- private void javaArraySetGrowth(Integer numElements) {
- Integer[] ia = new Integer[numElements];
-
- for (int i = 0; i < numElements; i++) {
- ia[i] = i;
- }
- }
-
- private void jreArrayListAddGrowth(Integer numElements) {
- ArrayList<Integer> al = new ArrayList<Integer>();
-
- for (int i = 0; i < numElements; i++) {
- al.add(i);
- }
- }
-
-}
=======================================
---
/branches/lwc-gwt-migration/bikeshed/src/com/google/gwt/collections/Collections.gwt.xml
Tue Jun 22 12:49:14 2010
+++
/branches/lwc-gwt-migration/bikeshed/src/com/google/gwt/collections/Collections.gwt.xml
Tue Jul 20 09:29:15 2010
@@ -15,6 +15,9 @@
-->
<module>
<inherits name='com.google.gwt.user.User'/>
- <source path="" />
+ <source path="" >
+ <exclude name='benchmarks/*.java'/>
+ <exclude name='*Suite.java'/>
+ </source>
<super-source path="super"/>
</module>
=======================================
---
/branches/lwc-gwt-migration/bikeshed/test/com/google/gwt/collections/CollectionsServerSideTestSuite.java
Wed Jun 30 09:38:46 2010
+++
/branches/lwc-gwt-migration/bikeshed/test/com/google/gwt/collections/CollectionsServerSideTestSuite.java
Tue Jul 20 09:29:15 2010
@@ -15,6 +15,7 @@
*/
package com.google.gwt.collections;
+
import junit.framework.Test;
import junit.framework.TestSuite;
=======================================
---
/branches/lwc-gwt-migration/bikeshed/test-super/com/google/gwt/collections/super/com/google/gwt/collections/MutableArrayInternalTest.java
Mon Jun 14 06:05:16 2010
+++
/branches/lwc-gwt-migration/bikeshed/test-super/com/google/gwt/collections/super/com/google/gwt/collections/MutableArrayInternalTest.java
Tue Jul 20 09:29:15 2010
@@ -15,6 +15,8 @@
*/
package com.google.gwt.collections;
+import com.google.gwt.junit.client.GWTTestCase;
+
/**
* Tests mutable array implementation internal details.
*/
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors