Author: [EMAIL PROTECTED]
Date: Fri Sep 19 08:39:29 2008
New Revision: 3668

Modified:
    trunk/user/test/com/google/gwt/dom/client/ElementTest.java

Log:
Fixed ElementTest.testStyleCamelCase() so it only tests the assertions on  
Style if assertions are enabled.

Patch by: jlabanca
Review by: jgw (desk)



Modified: trunk/user/test/com/google/gwt/dom/client/ElementTest.java
==============================================================================
--- trunk/user/test/com/google/gwt/dom/client/ElementTest.java  (original)
+++ trunk/user/test/com/google/gwt/dom/client/ElementTest.java  Fri Sep 19  
08:39:29 2008
@@ -280,23 +280,25 @@
      assertEquals("10px", div.getStyle().getProperty("marginLeft"));

      // Use a hyphenated style
-    try {
-      div.getStyle().setProperty("background-color", "red");
-      fail("Expected assertion error: background-color should be in  
camelCase");
-    } catch (AssertionError e) {
-      // expected
-    }
-    try {
-      div.getStyle().setPropertyPx("margin-left", 20);
-      fail("Expected assertion error: margin-left should be in camelCase");
-    } catch (AssertionError e) {
-      // expected
-    }
-    try {
-      div.getStyle().getProperty("margin-right");
-      fail("Expected assertion error: margin-right should be in  
camelCase");
-    } catch (AssertionError e) {
-      // expected
+    if (Style.class.desiredAssertionStatus()) {
+      try {
+        div.getStyle().setProperty("background-color", "red");
+        fail("Expected assertion error: background-color should be in  
camelCase");
+      } catch (AssertionError e) {
+        // expected
+      }
+      try {
+        div.getStyle().setPropertyPx("margin-left", 20);
+        fail("Expected assertion error: margin-left should be in  
camelCase");
+      } catch (AssertionError e) {
+        // expected
+      }
+      try {
+        div.getStyle().getProperty("margin-right");
+        fail("Expected assertion error: margin-right should be in  
camelCase");
+      } catch (AssertionError e) {
+        // expected
+      }
      }
    }


--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Reply via email to