| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 // TODO(jmesserly): this file needs to be refactored, it's a port from | 5 // TODO(jmesserly): this file needs to be refactored, it's a port from |
| 6 // package:dev_compiler's tests | 6 // package:dev_compiler's tests |
| 7 library analyzer.test.src.task.strong.strong_test_helper; | 7 library analyzer.test.src.task.strong.strong_test_helper; |
| 8 | 8 |
| 9 import 'package:analyzer/dart/ast/ast.dart'; | 9 import 'package:analyzer/dart/ast/ast.dart'; |
| 10 import 'package:analyzer/dart/ast/visitor.dart'; | 10 import 'package:analyzer/dart/ast/visitor.dart'; |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 class HtmlElement {} | 111 class HtmlElement {} |
| 112 ''', | 112 ''', |
| 113 'dart:math': ''' | 113 'dart:math': ''' |
| 114 library dart.math; | 114 library dart.math; |
| 115 class Random { | 115 class Random { |
| 116 bool nextBool() {} | 116 bool nextBool() {} |
| 117 } | 117 } |
| 118 num/*=T*/ min/*<T extends num>*/(num/*=T*/ a, num/*=T*/ b) => null; | 118 num/*=T*/ min/*<T extends num>*/(num/*=T*/ a, num/*=T*/ b) => null; |
| 119 num/*=T*/ max/*<T extends num>*/(num/*=T*/ a, num/*=T*/ b) => null; | 119 num/*=T*/ max/*<T extends num>*/(num/*=T*/ a, num/*=T*/ b) => null; |
| 120 ''', | 120 ''', |
| 121 |
| 122 'dart:_foreign_helper': ''' |
| 123 library dart._foreign_helper; |
| 124 |
| 125 JS(String typeDescription, String codeTemplate, |
| 126 [arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11]) |
| 127 {} |
| 128 ''' |
| 121 }; | 129 }; |
| 122 | 130 |
| 123 /// Returns an ANSII color escape sequence corresponding to [levelName]. Colors | 131 /// Returns an ANSII color escape sequence corresponding to [levelName]. Colors |
| 124 /// are defined for: severe, error, warning, or info. Returns null if the level | 132 /// are defined for: severe, error, warning, or info. Returns null if the level |
| 125 /// name is not recognized. | 133 /// name is not recognized. |
| 126 String colorOf(String levelName) { | 134 String colorOf(String levelName) { |
| 127 levelName = levelName.toLowerCase(); | 135 levelName = levelName.toLowerCase(); |
| 128 if (levelName == 'shout' || levelName == 'severe' || levelName == 'error') { | 136 if (levelName == 'shout' || levelName == 'severe' || levelName == 'error') { |
| 129 return _RED_COLOR; | 137 return _RED_COLOR; |
| 130 } | 138 } |
| (...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 516 UriKind get uriKind => UriKind.DART_URI; | 524 UriKind get uriKind => UriKind.DART_URI; |
| 517 | 525 |
| 518 bool exists() => true; | 526 bool exists() => true; |
| 519 | 527 |
| 520 Source resolveRelative(Uri relativeUri) => | 528 Source resolveRelative(Uri relativeUri) => |
| 521 throw new UnsupportedError('not expecting relative urls in dart: mocks'); | 529 throw new UnsupportedError('not expecting relative urls in dart: mocks'); |
| 522 | 530 |
| 523 Uri resolveRelativeUri(Uri relativeUri) => | 531 Uri resolveRelativeUri(Uri relativeUri) => |
| 524 throw new UnsupportedError('not expecting relative urls in dart: mocks'); | 532 throw new UnsupportedError('not expecting relative urls in dart: mocks'); |
| 525 } | 533 } |
| OLD | NEW |