anchor.diff:    Expect.equals(f.lengthSync(), 10);
   }
   
  -Future writeSync(Directory dir) {
  +void writeSync(Directory dir) {
     var f = new File('x');
     var raf = f.openSync(mode: WRITE_ONLY);
     raf.writeStringSync('Hello');
  
positive.code:   }
  }
  
  void withTempDirSync(String prefix, void test(Directory dir)) async {
    var tempDir = Directory.systemTemp.createTempSync(prefix);
    try {
      test(tempDir);
  
negative.code:   }
  }
  
  Future expectThrowsAsync(Future future, String message) {
    return future.then((r) => Expect.fail(message))
                 .catchError((e) {});
  }
  