OLD | NEW |
1 dart_library.library('unittest/unittest', null, /* Imports */[ | 1 dart_library.library('unittest/unittest', null, /* Imports */[ |
2 'dart/_runtime', | 2 'dart/_runtime', |
3 'matcher/matcher', | 3 'matcher/matcher', |
4 'dom/dom', | 4 'dom/dom', |
5 'dart/core', | 5 'dart/core', |
6 'dart/async', | 6 'dart/async', |
7 'matcher/src/interfaces', | 7 'matcher/src/interfaces', |
8 'matcher/src/util', | 8 'matcher/src/util', |
9 'matcher/src/description' | 9 'matcher/src/description' |
10 ], /* Lazy imports */[ | 10 ], /* Lazy imports */[ |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 function _defaultFailFormatter(actual, matcher, reason, matchState, verbose) { | 73 function _defaultFailFormatter(actual, matcher, reason, matchState, verbose) { |
74 let description = new description$.StringDescription(); | 74 let description = new description$.StringDescription(); |
75 description.add('Expected: ').addDescriptionOf(matcher).add('\n'); | 75 description.add('Expected: ').addDescriptionOf(matcher).add('\n'); |
76 description.add(' Actual: ').addDescriptionOf(actual).add('\n'); | 76 description.add(' Actual: ').addDescriptionOf(actual).add('\n'); |
77 let mismatchDescription = new description$.StringDescription(); | 77 let mismatchDescription = new description$.StringDescription(); |
78 matcher.describeMismatch(actual, mismatchDescription, matchState, verbose); | 78 matcher.describeMismatch(actual, mismatchDescription, matchState, verbose); |
79 if (dart.notNull(mismatchDescription.length) > 0) { | 79 if (dart.notNull(mismatchDescription.length) > 0) { |
80 description.add(` Which: ${mismatchDescription}\n`); | 80 description.add(` Which: ${mismatchDescription}\n`); |
81 } | 81 } |
82 if (reason != null) description.add(reason).add('\n'); | 82 if (reason != null) description.add(reason).add('\n'); |
83 return dart.toString(description); | 83 return description.toString(); |
84 } | 84 } |
85 dart.fn(_defaultFailFormatter, core.String, [dart.dynamic, interfaces.Matcher,
core.String, core.Map, core.bool]); | 85 dart.fn(_defaultFailFormatter, core.String, [dart.dynamic, interfaces.Matcher,
core.String, core.Map, core.bool]); |
86 // Exports: | 86 // Exports: |
87 exports.group = group; | 87 exports.group = group; |
88 exports.test = test; | 88 exports.test = test; |
89 exports.TestFailure = TestFailure; | 89 exports.TestFailure = TestFailure; |
90 exports.ErrorFormatter = ErrorFormatter; | 90 exports.ErrorFormatter = ErrorFormatter; |
91 exports.expect = expect; | 91 exports.expect = expect; |
92 exports.fail = fail; | 92 exports.fail = fail; |
93 }); | 93 }); |
OLD | NEW |