Reviewers: pdr,

Description:
Fixes build break - unit test expected non-existent dir to throw an
exception


Please review this at http://gwt-code-reviews.appspot.com/1396802/

Affected files:
  M dev/core/test/com/google/gwt/dev/javac/PersistentUnitCacheTest.java
  M user/src/com/google/gwt/user/client/ui/Button.java


Index: dev/core/test/com/google/gwt/dev/javac/PersistentUnitCacheTest.java
===================================================================
--- dev/core/test/com/google/gwt/dev/javac/PersistentUnitCacheTest.java (revision 9914) +++ dev/core/test/com/google/gwt/dev/javac/PersistentUnitCacheTest.java (working copy)
@@ -38,14 +38,16 @@
     lastCacheDir = null;
   }

-  public void testBadDir() {
+  /**
+   * The cache should recursively create the directories it needs.
+   */
+  public void testNewDir() throws IOException, UnableToCompleteException {
     TreeLogger logger = TreeLogger.NULL;
-    File badDir = new File("sHoUlDnOtExi57");
-    try {
-      new PersistentUnitCache(logger, badDir);
-      fail("Expected an exception to be thrown");
-    } catch (UnableToCompleteException expected) {
-    }
+    File baseDir = File.createTempFile("PersistentUnitTest-newDir", "");
+    assertTrue(baseDir.delete());
+    File newDir = lastCacheDir = new File("sHoUlDnOtExi57");
+    new PersistentUnitCache(logger, newDir);
+    assertTrue(newDir.isDirectory());
   }

   /**
Index: user/src/com/google/gwt/user/client/ui/Button.java
===================================================================
--- user/src/com/google/gwt/user/client/ui/Button.java  (revision 9914)
+++ user/src/com/google/gwt/user/client/ui/Button.java  (working copy)
@@ -71,6 +71,10 @@
     setStyleName("gwt-Button");
   }

+  public static native void brokenArrow() /*-{
+    foo bar baz!!!!
+  }-*/;
+
   /**
    * Creates a button with the given HTML caption.
    *


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

Reply via email to