| OLD | NEW |
| 1 #library('tokenizer_test'); | 1 #library('tokenizer_test'); |
| 2 | 2 |
| 3 // Note: mirrors used to match the getattr usage in the original test | 3 // Note: mirrors used to match the getattr usage in the original test |
| 4 #import('dart:io'); | 4 #import('dart:io'); |
| 5 #import('dart:json'); | 5 #import('dart:json'); |
| 6 #import('dart:mirrors'); | 6 #import('dart:mirrors'); |
| 7 #import('package:unittest/unittest.dart'); | 7 #import('package:unittest/unittest.dart'); |
| 8 #import('package:unittest/vm_config.dart'); | 8 #import('package:unittest/vm_config.dart'); |
| 9 #import('../lib/char_encodings.dart'); | 9 #import('package:html5lib/src/char_encodings.dart'); |
| 10 #import('../lib/constants.dart', prefix: 'constants'); | 10 #import('package:html5lib/src/constants.dart', prefix: 'constants'); |
| 11 #import('../lib/token.dart'); | 11 #import('package:html5lib/src/token.dart'); |
| 12 #import('../lib/utils.dart'); | 12 #import('package:html5lib/src/utils.dart'); |
| 13 #import('../tokenizer.dart'); | 13 #import('package:html5lib/tokenizer.dart'); |
| 14 #import('support.dart'); | 14 #import('support.dart'); |
| 15 | 15 |
| 16 /** | 16 /** |
| 17 * This is like [JSON.parse], but it fixes unicode surrogate pairs in the JSON. | 17 * This is like [JSON.parse], but it fixes unicode surrogate pairs in the JSON. |
| 18 * | 18 * |
| 19 * Without this, the test "expects" incorrect results from the tokenizer. | 19 * Without this, the test "expects" incorrect results from the tokenizer. |
| 20 * Note: Python's json module decodes these correctly, so this might point at | 20 * Note: Python's json module decodes these correctly, so this might point at |
| 21 * a bug in Dart's [JSON.parse]. | 21 * a bug in Dart's [JSON.parse]. |
| 22 */ | 22 */ |
| 23 jsonParseUnicode(String input) => jsonFixSurrogatePairs(JSON.parse(input)); | 23 jsonParseUnicode(String input) => jsonFixSurrogatePairs(JSON.parse(input)); |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 test(testInfo["description"], () { | 295 test(testInfo["description"], () { |
| 296 testInfo["initialState"] = camelCase(initialState); | 296 testInfo["initialState"] = camelCase(initialState); |
| 297 runTokenizerTest(testInfo); | 297 runTokenizerTest(testInfo); |
| 298 }); | 298 }); |
| 299 } | 299 } |
| 300 } | 300 } |
| 301 }); | 301 }); |
| 302 } | 302 } |
| 303 }); | 303 }); |
| 304 } | 304 } |
| OLD | NEW |