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

Side by Side Diff: sdk/lib/_internal/dartdoc/test/markdown_test.dart

Issue 12295014: Remove deprecated Strings class. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « sdk/lib/_internal/dartdoc/lib/src/markdown/block_parser.dart ('k') | sdk/lib/core/core.dart » ('j') | 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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 /// Unit tests for markdown. 5 /// Unit tests for markdown.
6 library markdownTests; 6 library markdownTests;
7 7
8 // TODO(rnystrom): Use "package:" URL (#4968). 8 // TODO(rnystrom): Use "package:" URL (#4968).
9 import '../lib/markdown.dart'; 9 import '../lib/markdown.dart';
10 10
(...skipping 807 matching lines...) Expand 10 before | Expand all | Expand 10 after
818 if (lines.length <= 1) return text; 818 if (lines.length <= 1) return text;
819 819
820 for (var j = 0; j < lines.length; j++) { 820 for (var j = 0; j < lines.length; j++) {
821 if (lines[j].length > 8) { 821 if (lines[j].length > 8) {
822 lines[j] = lines[j].substring(8, lines[j].length); 822 lines[j] = lines[j].substring(8, lines[j].length);
823 } else { 823 } else {
824 lines[j] = ''; 824 lines[j] = '';
825 } 825 }
826 } 826 }
827 827
828 return Strings.join(lines, '\n'); 828 return lines.join('\n');
829 } 829 }
830 830
831 validate(String description, String markdown, String html, 831 validate(String description, String markdown, String html,
832 {bool verbose: false}) { 832 {bool verbose: false}) {
833 test(description, () { 833 test(description, () {
834 markdown = cleanUpLiteral(markdown); 834 markdown = cleanUpLiteral(markdown);
835 html = cleanUpLiteral(html); 835 html = cleanUpLiteral(html);
836 836
837 var result = markdownToHtml(markdown); 837 var result = markdownToHtml(markdown);
838 var passed = compareOutput(html, result); 838 var passed = compareOutput(html, result);
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
874 874
875 // If one string runs out of non-ignored strings, the other must too. 875 // If one string runs out of non-ignored strings, the other must too.
876 if (i == a.length) return j == b.length; 876 if (i == a.length) return j == b.length;
877 if (j == b.length) return i == a.length; 877 if (j == b.length) return i == a.length;
878 878
879 if (a[i] != b[j]) return false; 879 if (a[i] != b[j]) return false;
880 i++; 880 i++;
881 j++; 881 j++;
882 } 882 }
883 } 883 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/dartdoc/lib/src/markdown/block_parser.dart ('k') | sdk/lib/core/core.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698