Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(696)

Unified Diff: tests/compiler/dart2js/cpa_inference_test.dart

Issue 27510003: Scanner for UTF-8 byte arrays (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fixes compiler tests Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tests/compiler/dart2js/cpa_inference_test.dart
diff --git a/tests/compiler/dart2js/cpa_inference_test.dart b/tests/compiler/dart2js/cpa_inference_test.dart
index 044d9f3f509c51ba115b1d99a75485af7421b0dc..32a90c5111f0aeffeb9b0307f47b7753cb9b362e 100644
--- a/tests/compiler/dart2js/cpa_inference_test.dart
+++ b/tests/compiler/dart2js/cpa_inference_test.dart
@@ -24,7 +24,7 @@ class VariableFinderVisitor extends Visitor {
visitSend(Send node) {
if (node.isPropertyAccess
- && node.selector.asIdentifier().source.slowToString() == identifier) {
+ && node.selector.asIdentifier().source == identifier) {
result = node;
} else {
node.visitChildren(this);
@@ -64,12 +64,12 @@ class AnalysisResult {
map = inferrer.baseTypes.mapBaseType;
nullType = const NullBaseType();
functionType = inferrer.baseTypes.functionBaseType;
- Element mainElement = compiler.mainApp.find(buildSourceString('main'));
+ Element mainElement = compiler.mainApp.find('main');
ast = mainElement.parseNode(compiler);
}
BaseType base(String className) {
- final source = buildSourceString(className);
+ final source = className;
return new ClassBaseType(compiler.mainApp.find(source));
}
@@ -89,8 +89,8 @@ class AnalysisResult {
* Finds the [Element] corresponding to [: className#fieldName :].
*/
Element findField(String className, String fieldName) {
- ClassElement element = compiler.mainApp.find(buildSourceString(className));
- return element.lookupLocalMember(buildSourceString(fieldName));
+ ClassElement element = compiler.mainApp.find(className);
+ return element.lookupLocalMember(fieldName);
}
ConcreteType concreteFrom(List<BaseType> baseTypes) {
@@ -182,7 +182,8 @@ Future<AnalysisResult> analyze(String code, {int maxConcreteTypeSize: 1000}) {
coreSource: CORELIB,
enableConcreteTypeInference: true,
maxConcreteTypeSize: maxConcreteTypeSize);
- compiler.sourceFiles[uri.toString()] = new SourceFile(uri.toString(), code);
+ compiler.sourceFiles[uri.toString()] =
+ new StringSourceFile(uri.toString(), code);
compiler.typesTask.concreteTypesInferrer.testMode = true;
return compiler.runCompiler(uri).then((_) {
return new AnalysisResult(compiler);
@@ -1541,7 +1542,7 @@ testSelectors() {
ClassElement y = findElement(result.compiler, 'Y');
ClassElement z = findElement(result.compiler, 'Z');
- Selector foo = new Selector.call(buildSourceString("foo"), null, 0);
+ Selector foo = new Selector.call("foo", null, 0);
Expect.equals(
inferredType(foo).simplify(result.compiler),
@@ -1560,7 +1561,7 @@ testSelectors() {
xy, foo)).simplify(result.compiler),
new TypeMask.nonNullSubclass(bc));
- Selector bar = new Selector.call(buildSourceString("bar"), null, 0);
+ Selector bar = new Selector.call("bar", null, 0);
Expect.isNull(inferredType(bar));
});

Powered by Google App Engine
This is Rietveld 408576698