Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(103)

Side by Side Diff: test/util.dart

Issue 1274763005: Clean up: (Closed) Base URL: https://github.com/dart-lang/markdown.git@master
Patch Set: Bump. Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/markdown_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library markdown.test.utils; 5 library markdown.test.utils;
6 6
7 import 'package:unittest/unittest.dart'; 7 import 'package:unittest/unittest.dart';
8 8
9 import 'package:markdown/markdown.dart'; 9 import 'package:markdown/markdown.dart';
10 10
(...skipping 18 matching lines...) Expand all
29 } else { 29 } else {
30 lines[j] = ''; 30 lines[j] = '';
31 } 31 }
32 } 32 }
33 33
34 return lines.join('\n'); 34 return lines.join('\n');
35 } 35 }
36 36
37 void validate(String description, String markdown, String html, 37 void validate(String description, String markdown, String html,
38 {List<InlineSyntax> inlineSyntaxes, 38 {List<InlineSyntax> inlineSyntaxes,
39 Resolver linkResolver, Resolver imageLinkResolver, 39 Resolver linkResolver,
40 Resolver imageLinkResolver,
40 bool inlineOnly: false}) { 41 bool inlineOnly: false}) {
41 test(description, () { 42 test(description, () {
42 markdown = cleanUpLiteral(markdown); 43 markdown = cleanUpLiteral(markdown);
43 html = cleanUpLiteral(html); 44 html = cleanUpLiteral(html);
44 45
45 var result = markdownToHtml(markdown, 46 var result = markdownToHtml(markdown,
46 inlineSyntaxes: inlineSyntaxes, 47 inlineSyntaxes: inlineSyntaxes,
47 linkResolver: linkResolver, 48 linkResolver: linkResolver,
48 imageLinkResolver: imageLinkResolver, 49 imageLinkResolver: imageLinkResolver,
49 inlineOnly: inlineOnly); 50 inlineOnly: inlineOnly);
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 86
86 // If one string runs out of non-ignored strings, the other must too. 87 // If one string runs out of non-ignored strings, the other must too.
87 if (i == a.length) return j == b.length; 88 if (i == a.length) return j == b.length;
88 if (j == b.length) return i == a.length; 89 if (j == b.length) return i == a.length;
89 90
90 if (a[i] != b[j]) return false; 91 if (a[i] != b[j]) return false;
91 i++; 92 i++;
92 j++; 93 j++;
93 } 94 }
94 } 95 }
OLDNEW
« no previous file with comments | « test/markdown_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698