| OLD | NEW |
| 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('markdown_tests'); | 6 #library('markdown_tests'); |
| 7 | 7 |
| 8 #import('../../pkg/dartdoc/markdown.dart'); | 8 // TODO(rnystrom): Move this test into pkg/dartdoc/test. |
| 9 #import('../../pkg/dartdoc/lib/markdown.dart'); |
| 9 | 10 |
| 10 // TODO(rnystrom): Better path to unittest. | 11 // TODO(rnystrom): Better path to unittest. |
| 11 #import('../../pkg/unittest/unittest.dart'); | 12 #import('../../pkg/unittest/unittest.dart'); |
| 12 #import('test_utils.dart'); | 13 #import('test_utils.dart'); |
| 13 | 14 |
| 14 /// Most of these tests are based on observing how showdown behaves: | 15 /// Most of these tests are based on observing how showdown behaves: |
| 15 /// http://softwaremaniacs.org/playground/showdown-highlight/ | 16 /// http://softwaremaniacs.org/playground/showdown-highlight/ |
| 16 void main() { | 17 void main() { |
| 17 group('Paragraphs', () { | 18 group('Paragraphs', () { |
| 18 validate('consecutive lines form a single paragraph', ''' | 19 validate('consecutive lines form a single paragraph', ''' |
| (...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 788 | 789 |
| 789 // If one string runs out of non-ignored strings, the other must too. | 790 // If one string runs out of non-ignored strings, the other must too. |
| 790 if (i == a.length) return j == b.length; | 791 if (i == a.length) return j == b.length; |
| 791 if (j == b.length) return i == a.length; | 792 if (j == b.length) return i == a.length; |
| 792 | 793 |
| 793 if (a[i] != b[j]) return false; | 794 if (a[i] != b[j]) return false; |
| 794 i++; | 795 i++; |
| 795 j++; | 796 j++; |
| 796 } | 797 } |
| 797 } | 798 } |
| OLD | NEW |