| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 // Mocks of classes and interfaces that Leg cannot read directly. | 5 // Mocks of classes and interfaces that Leg cannot read directly. |
| 6 | 6 |
| 7 // TODO(ahe): Remove this file. | 7 // TODO(ahe): Remove this file. |
| 8 | 8 |
| 9 class JSSyntaxRegExp implements RegExp { | 9 class JSSyntaxRegExp implements RegExp { |
| 10 final String pattern; | 10 final String pattern; |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 } else { | 134 } else { |
| 135 return true; | 135 return true; |
| 136 } | 136 } |
| 137 } | 137 } |
| 138 } | 138 } |
| 139 | 139 |
| 140 class ReceivePortFactory { | 140 class ReceivePortFactory { |
| 141 factory ReceivePort() { | 141 factory ReceivePort() { |
| 142 throw 'factory ReceivePort is not implemented'; | 142 throw 'factory ReceivePort is not implemented'; |
| 143 } | 143 } |
| 144 | |
| 145 factory ReceivePort.singleShot() { | |
| 146 throw 'factory ReceivePort.singleShot is not implemented'; | |
| 147 } | |
| 148 } | 144 } |
| 149 | 145 |
| 150 class StringBase { | 146 class StringBase { |
| 151 static String createFromCharCodes(List<int> charCodes) { | 147 static String createFromCharCodes(List<int> charCodes) { |
| 152 checkNull(charCodes); | 148 checkNull(charCodes); |
| 153 if (!isJsArray(charCodes)) { | 149 if (!isJsArray(charCodes)) { |
| 154 if (charCodes is !List) throw new IllegalArgumentException(charCodes); | 150 if (charCodes is !List) throw new IllegalArgumentException(charCodes); |
| 155 charCodes = new List.from(charCodes); | 151 charCodes = new List.from(charCodes); |
| 156 } | 152 } |
| 157 return Primitives.stringFromCharCodes(charCodes); | 153 return Primitives.stringFromCharCodes(charCodes); |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 } | 445 } |
| 450 String twoDigitMinutes = | 446 String twoDigitMinutes = |
| 451 twoDigits(inMinutes.remainder(Duration.MINUTES_PER_HOUR)); | 447 twoDigits(inMinutes.remainder(Duration.MINUTES_PER_HOUR)); |
| 452 String twoDigitSeconds = | 448 String twoDigitSeconds = |
| 453 twoDigits(inSeconds.remainder(Duration.SECONDS_PER_MINUTE)); | 449 twoDigits(inSeconds.remainder(Duration.SECONDS_PER_MINUTE)); |
| 454 String threeDigitMs = | 450 String threeDigitMs = |
| 455 threeDigits(inMilliseconds.remainder(Duration.MILLISECONDS_PER_SECOND)); | 451 threeDigits(inMilliseconds.remainder(Duration.MILLISECONDS_PER_SECOND)); |
| 456 return "${inHours}:${twoDigitMinutes}:${twoDigitSeconds}.${threeDigitMs}"; | 452 return "${inHours}:${twoDigitMinutes}:${twoDigitSeconds}.${threeDigitMs}"; |
| 457 } | 453 } |
| 458 } | 454 } |
| OLD | NEW |