Author: [email protected]
Date: Mon Jun 8 20:50:17 2009
New Revision: 5526
Modified:
branches/snapshot-2009.06.02-r5498/user/test/com/google/gwt/i18n/client/I18NTest.java
branches/snapshot-2009.06.02-r5498/user/test/com/google/gwt/i18n/rebind/AbstractResourceTest.java
Log:
Test changes missing from previous commit.
Patch by: jat
Review by: scottb
Modified:
branches/snapshot-2009.06.02-r5498/user/test/com/google/gwt/i18n/client/I18NTest.java
==============================================================================
---
branches/snapshot-2009.06.02-r5498/user/test/com/google/gwt/i18n/client/I18NTest.java
(original)
+++
branches/snapshot-2009.06.02-r5498/user/test/com/google/gwt/i18n/client/I18NTest.java
Mon Jun 8 20:50:17 2009
@@ -148,6 +148,13 @@
// No piglatin version exists for grey
assertEquals("ĝréý", colors.grey());
assertEquals("ackblay", colors.black());
+ assertEquals("ueblay", colors.blue());
+ }
+
+ public void testColorsAndShapes() {
+ ColorsAndShapes s = GWT.create(ColorsAndShapes.class);
+ assertEquals("ueblay", s.blue());
+ assertEquals("ĝréý", s.grey());
}
public void testConstantBooleans() {
@@ -561,6 +568,7 @@
// test converge
assertEquals("any primary color", s.shapeColor());
assertEquals("trees", s.green());
+ assertEquals("Îñţérñåţîöñåļîžåţîöñ", s.internationalization());
}
public void testTestMessages() {
Modified:
branches/snapshot-2009.06.02-r5498/user/test/com/google/gwt/i18n/rebind/AbstractResourceTest.java
==============================================================================
---
branches/snapshot-2009.06.02-r5498/user/test/com/google/gwt/i18n/rebind/AbstractResourceTest.java
(original)
+++
branches/snapshot-2009.06.02-r5498/user/test/com/google/gwt/i18n/rebind/AbstractResourceTest.java
Mon Jun 8 20:50:17 2009
@@ -15,12 +15,6 @@
*/
package com.google.gwt.i18n.rebind;
-import com.google.gwt.i18n.client.ColorsAndShapes;
-import com.google.gwt.i18n.client.ColorsAndShapesAndConcepts;
-import com.google.gwt.i18n.client.gen.Colors;
-import com.google.gwt.i18n.rebind.AbstractResource.ResourceList;
-import com.google.gwt.i18n.shared.GwtLocale;
-
import junit.framework.TestCase;
import java.io.ByteArrayOutputStream;
@@ -33,31 +27,9 @@
* TODO: document me.
*/
public class AbstractResourceTest extends TestCase {
- public static final String UNICODE = "Îñţérñåţîöñåļîžåţîöñ";
- private static final GwtLocale LOCALE_NAME_PIGLATIN =
LocaleUtils.getLocaleFactory().fromString("piglatin");
- private static final GwtLocale LOCALE_NAME_PIGLATIN_UK =
LocaleUtils.getLocaleFactory().fromString("piglatin_UK");
- private static final GwtLocale LOCALE_DEFAULT =
LocaleUtils.getLocaleFactory().getDefault();
-
- public void testBundle() {
- // simple test
- String s = Colors.class.getName();
- ResourceList resourceList = ResourceFactory.getBundle(s,
LOCALE_DEFAULT, true);
- assertNotNull(resourceList);
- ResourceList pigLatinResourceList =
- ResourceFactory.getBundle(s, LOCALE_NAME_PIGLATIN, true);
- assertNotNull(pigLatinResourceList);
- assertEquals("ueblay", pigLatinResourceList.getString("blue"));
- assertEquals("ĝréý", pigLatinResourceList.getString("grey"));
- }
-
- public void testInheritence() {
- ResourceFactory.clearCache();
- ResourceList resourceList = ResourceFactory.getBundle(
- ColorsAndShapes.class, LOCALE_NAME_PIGLATIN, true);
- assertEquals("ueblay", resourceList.getString("blue"));
- assertEquals("ĝréý", resourceList.getString("grey"));
- }
+ public static final String UNICODE = "Îñţérñåţîöñåļîžåţîöñ";
+
public void testByteStreamBehavior() throws UnsupportedEncodingException
{
ByteArrayOutputStream s = new ByteArrayOutputStream();
OutputStreamWriter writer = new OutputStreamWriter(s, "UTF-8");
@@ -66,14 +38,6 @@
t.close();
assertEquals("ĝréý", s.toString("UTF-8"));
assertEquals("ĝréý", (new String(s.toString("UTF-8").toCharArray())));
- }
-
- public void testDoubleInherits() {
- ResourceList resourceList = ResourceFactory.getBundle(
- ColorsAndShapesAndConcepts.class, LOCALE_NAME_PIGLATIN_UK, true);
- String s = resourceList.getString("internationalization");
- assertEquals("Îñţérñåţîöñåļîžåţîöñ", s);
- assertTrue(resourceList.keySet().size() > 5);
}
public void testCharArrayBehavior() {
--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---