Revision: 10047
Author: [email protected]
Date: Wed Apr 20 12:03:38 2011
Log: Test that references to PredefinedFormat values work with
DateLabel
Review at http://gwt-code-reviews.appspot.com/1427805
Review by: [email protected]
http://code.google.com/p/google-web-toolkit/source/detail?r=10047
Modified:
/trunk/user/test/com/google/gwt/uibinder/test/client/UiBinderTest.java
/trunk/user/test/com/google/gwt/uibinder/test/client/WidgetBasedUi.java
/trunk/user/test/com/google/gwt/uibinder/test/client/WidgetBasedUi.ui.xml
=======================================
--- /trunk/user/test/com/google/gwt/uibinder/test/client/UiBinderTest.java
Fri Apr 1 10:25:12 2011
+++ /trunk/user/test/com/google/gwt/uibinder/test/client/UiBinderTest.java
Wed Apr 20 12:03:38 2011
@@ -49,7 +49,6 @@
public class UiBinderTest extends GWTTestCase {
private WidgetBasedUi widgetUi;
private DomBasedUi domUi;
- @SuppressWarnings("deprecation")
private com.google.gwt.user.client.ui.DockPanel root;
@Override
@@ -168,7 +167,6 @@
widgetUi.bundledDivLegacy.getClassName());
}
- @SuppressWarnings("deprecation")
public void testCenter() {
// TODO(rjrjr) More of a test of HTMLPanelParser
@@ -380,7 +378,6 @@
assertTrue(innerHTML.endsWith("</span> \u261C"));
}
- @SuppressWarnings("deprecation")
public void testNorth() {
Widget north = root.getWidget(0);
assertEquals(com.google.gwt.user.client.ui.DockPanel.NORTH,
@@ -491,6 +488,10 @@
public void testDateLabel() {
DateLabel p = widgetUi.myDateLabel;
assertNotNull("DateLabel exists", p);
+ p = widgetUi.myDateLabel2;
+ assertNotNull("DateLabel exists", p);
+ p = widgetUi.myDateLabel3;
+ assertNotNull("DateLabel exists", p);
}
public void testNumberLabel() {
@@ -515,7 +516,6 @@
assertEquals("100%",
root.getElement().getStyle().getProperty("width"));
}
- @SuppressWarnings("deprecation")
public void testWest() {
Widget west = root.getWidget(1);
assertEquals(com.google.gwt.user.client.ui.DockPanel.WEST,
=======================================
--- /trunk/user/test/com/google/gwt/uibinder/test/client/WidgetBasedUi.java
Fri Apr 1 10:25:12 2011
+++ /trunk/user/test/com/google/gwt/uibinder/test/client/WidgetBasedUi.java
Wed Apr 20 12:03:38 2011
@@ -191,9 +191,10 @@
@UiField NamedFrame myNamedFrame;
@UiField DateLabel myDateLabel;
@UiField DateLabel myDateLabel2;
+ @UiField DateLabel myDateLabel3;
@UiField NumberLabel<Float> myNumberLabel;
@UiField NumberLabel<Float> myNumberLabel2;
- @UiField(provided = true) @SuppressWarnings("unchecked")
+ @UiField(provided = true) @SuppressWarnings("rawtypes")
Renderer doubleRenderer = DoubleRenderer.instance();
@UiField ValueLabel<Double> myValueLabel;
@UiField ImageElement myImage;
=======================================
---
/trunk/user/test/com/google/gwt/uibinder/test/client/WidgetBasedUi.ui.xml
Sun Apr 3 21:22:18 2011
+++
/trunk/user/test/com/google/gwt/uibinder/test/client/WidgetBasedUi.ui.xml
Wed Apr 20 12:03:38 2011
@@ -94,6 +94,10 @@
Tests a DateTimeFormat using for the DateTimeLabel.
</ui:import>
+<ui:import
field='com.google.gwt.i18n.client.DateTimeFormat.PredefinedFormat.ISO_8601'>
+ Tests a reference to a PredefinedFormat for the DateTimeLabel.
+</ui:import>
+
<ui:import
field='com.google.gwt.uibinder.test.client.WidgetBasedUi.MY_NUMBER_FORMAT'>
Tests a NumberFormat using for the NumberLabel.
</ui:import>
@@ -665,6 +669,7 @@
<gwt:DateLabel ui:field='myDateLabel' predefinedFormat='DATE_FULL' />
<gwt:DateLabel ui:field='myDateLabel2' format='{MY_DATE_FORMAT}' />
+ <gwt:DateLabel ui:field='myDateLabel3' predefinedFormat='{ISO_8601}' />
<gwt:NumberLabel ui:field='myNumberLabel' predefinedFormat='SCIENTIFIC'
/>
<gwt2:ui.NumberLabel ui:field='myNumberLabel2'
format='{MY_NUMBER_FORMAT}' />
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors