test cleanup
diff --git a/pkgs/markdown/test/markdown_test.dart b/pkgs/markdown/test/markdown_test.dart
index 29d84a3..3c4564b 100644
--- a/pkgs/markdown/test/markdown_test.dart
+++ b/pkgs/markdown/test/markdown_test.dart
@@ -959,7 +959,7 @@
   return lines.join('\n');
 }
 
-validate(String description, String markdown, String html,
+void validate(String description, String markdown, String html,
          {bool verbose: false, inlineSyntaxes, linkResolver,
           bool inlineOnly: false}) {
   test(description, () {
@@ -974,19 +974,18 @@
       // Remove trailing newline.
       html = html.substring(0, html.length - 1);
 
-      print('FAIL: $description');
-      print('  expect: ${html.replaceAll("\n", "\n          ")}');
-      print('  actual: ${result.replaceAll("\n", "\n          ")}');
-      print('');
-    }
+      var sb = new StringBuffer();
+      sb.writeln('Expected: ${html.replaceAll("\n", "\n          ")}');
+      sb.writeln('  Actual: ${result.replaceAll("\n", "\n          ")}');
 
-    expect(passed, isTrue, verbose: verbose);
+      fail(sb.toString());
+    }
   });
 }
 
 /// Does a loose comparison of the two strings of HTML. Ignores differences in
 /// newlines and indentation.
-compareOutput(String a, String b) {
+bool compareOutput(String a, String b) {
   int i = 0;
   int j = 0;