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

Unified Diff: tests/dartino_compiler/incremental/feature_test.dart

Issue 1659163007: Rename fletch -> dartino (Closed) Base URL: https://github.com/dartino/sdk.git@master
Patch Set: address comments Created 4 years, 11 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/dartino_compiler/incremental/feature_test.dart
diff --git a/tests/fletchc/incremental/feature_test.dart b/tests/dartino_compiler/incremental/feature_test.dart
similarity index 87%
rename from tests/fletchc/incremental/feature_test.dart
rename to tests/dartino_compiler/incremental/feature_test.dart
index 080b3b35799effd30e17bd0118bf333bba24ad67..d7bc83df9a3d492d530ae5e1644a68a224680c0d 100644
--- a/tests/fletchc/incremental/feature_test.dart
+++ b/tests/dartino_compiler/incremental/feature_test.dart
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-library fletchc.test.feature_test;
+library dartino_compiler.test.feature_test;
import 'dart:io' hide
exitCode,
@@ -27,7 +27,7 @@ import 'dart:convert' show
import 'package:expect/expect.dart' show
Expect;
-import 'package:fletchc/incremental/scope_information_visitor.dart' show
+import 'package:dartino_compiler/incremental/scope_information_visitor.dart' show
ScopeInformationVisitor;
import 'compiler_test_case.dart' show
@@ -50,53 +50,53 @@ import 'package:compiler/src/source_file_provider.dart' show
import 'package:compiler/src/io/source_file.dart' show
StringSourceFile;
-import 'package:fletchc/incremental/fletchc_incremental.dart' show
+import 'package:dartino_compiler/incremental/dartino_compiler_incremental.dart' show
IncrementalCompilationFailed,
IncrementalCompiler,
IncrementalMode;
-import 'package:fletchc/vm_commands.dart' show
+import 'package:dartino_compiler/vm_commands.dart' show
VmCommand,
CommitChanges,
CommitChangesResult,
HandShakeResult,
MapId;
-import 'package:fletchc/fletch_compiler.dart' show
- FletchCompiler;
+import 'package:dartino_compiler/dartino_compiler.dart' show
+ DartinoCompiler;
-import 'package:fletchc/src/fletch_compiler_implementation.dart' show
+import 'package:dartino_compiler/src/dartino_compiler_implementation.dart' show
OutputProvider;
-import 'package:fletchc/src/guess_configuration.dart' show
- fletchVersion,
- guessFletchVm;
+import 'package:dartino_compiler/src/guess_configuration.dart' show
+ dartinoVersion,
+ guessDartinoVm;
-import 'package:fletchc/fletch_system.dart';
+import 'package:dartino_compiler/dartino_system.dart';
-import 'package:fletchc/vm_commands.dart' as commands_lib;
+import 'package:dartino_compiler/vm_commands.dart' as commands_lib;
-import 'package:fletchc/vm_session.dart' show
+import 'package:dartino_compiler/vm_session.dart' show
Session;
-import 'package:fletchc/src/fletch_backend.dart' show
- FletchBackend;
+import 'package:dartino_compiler/src/dartino_backend.dart' show
+ DartinoBackend;
-import 'package:fletchc/fletch_vm.dart' show
- FletchVm;
+import 'package:dartino_compiler/dartino_vm.dart' show
+ DartinoVm;
-import 'package:fletchc/debug_state.dart' as debug show
+import 'package:dartino_compiler/debug_state.dart' as debug show
BackTraceFrame,
BackTrace;
import 'program_result.dart';
-import 'package:fletchc/src/hub/exit_codes.dart' show
+import 'package:dartino_compiler/src/hub/exit_codes.dart' show
DART_VM_EXITCODE_COMPILE_TIME_ERROR;
-const String PACKAGE_SCHEME = 'org.dartlang.fletch.packages';
+const String PACKAGE_SCHEME = 'org.dartlang.dartino.packages';
-const String CUSTOM_SCHEME = 'org.dartlang.fletch.test-case';
+const String CUSTOM_SCHEME = 'org.dartlang.dartino.test-case';
final Uri customUriBase = new Uri(scheme: CUSTOM_SCHEME, path: '/');
@@ -131,16 +131,16 @@ compileAndRun(
print(numberedLines(program.code));
bool compileUpdatesThrew = true;
- FletchDelta fletchDelta;
+ DartinoDelta dartinoDelta;
if (isFirstProgram) {
// The first program is compiled "fully".
- fletchDelta = await helper.fullCompile(program);
+ dartinoDelta = await helper.fullCompile(program);
compileUpdatesThrew = false;
} else {
// An update to the first program, all updates are compiled as
// incremental updates to the first program.
try {
- fletchDelta = await helper.incrementalCompile(program, version);
+ dartinoDelta = await helper.incrementalCompile(program, version);
compileUpdatesThrew = false;
} on IncrementalCompilationFailed catch (error) {
if (program.compileUpdatesShouldThrow) {
@@ -152,20 +152,20 @@ compileAndRun(
}
}
- FletchBackend backend = helper.compiler.compiler.context.backend;
+ DartinoBackend backend = helper.compiler.compiler.context.backend;
if (program.compileUpdatesShouldThrow) {
Expect.isFalse(isFirstProgram);
Expect.isTrue(
compileUpdatesThrew,
"Expected an exception in compileUpdates");
- Expect.isNull(fletchDelta, "Expected update == null");
+ Expect.isNull(dartinoDelta, "Expected update == null");
break;
}
if (!isFirstProgram ||
const bool.fromEnvironment("feature_test.print_initial_commands")) {
- for (VmCommand command in fletchDelta.commands) {
+ for (VmCommand command in dartinoDelta.commands) {
print(command);
}
}
@@ -173,11 +173,11 @@ compileAndRun(
if (isFirstProgram) {
// Perform handshake with VM.
HandShakeResult handShakeResult =
- await session.handShake(fletchVersion);
- Expect.isTrue(handShakeResult.success, "Fletch VM version mismatch");
+ await session.handShake(dartinoVersion);
+ Expect.isTrue(handShakeResult.success, "Dartino VM version mismatch");
}
- CommitChangesResult result = await session.applyDelta(fletchDelta);
+ CommitChangesResult result = await session.applyDelta(dartinoDelta);
if (!result.successful) {
print("The CommitChanges() command was not successful: "
@@ -224,8 +224,8 @@ compileAndRun(
// Select the stack frame of callMain.
debug.BackTrace trace = await session.backTrace();
FunctionElement callMainElement =
- backend.fletchSystemLibrary.findLocal("callMain");
- FletchFunction callMain =
+ backend.dartinoSystemLibrary.findLocal("callMain");
+ DartinoFunction callMain =
helper.system.lookupFunctionByElement(callMainElement);
debug.BackTraceFrame mainFrame =
trace.frames.firstWhere(
@@ -241,7 +241,7 @@ compileAndRun(
if (program.hasCompileTimeError) {
print("Compile-time error expected");
// TODO(ahe): The compile-time error message shouldn't be printed by
- // the Fletch VM.
+ // the Dartino VM.
// Find the compile-time error message in the actual output, and
// remove all lines after it.
@@ -302,7 +302,7 @@ compileAndRun(
int expectedExitCode = hasCompileTimeError
? DART_VM_EXITCODE_COMPILE_TIME_ERROR : 0;
Expect.equals(
- expectedExitCode, actualExitCode, "Unexpected exit code from fletch VM");
+ expectedExitCode, actualExitCode, "Unexpected exit code from dartino VM");
}
class SerializeScopeTestCase extends CompilerTestCase {
@@ -418,7 +418,7 @@ class TestSession extends Session {
void writeStdout(String s) {
// Unfortunately, print will always add a newline, and the alternative is
// to use stdout.write. However, to make it easier to debug problems in
- // this and other fletch_tests, everything that is printed to stdout ends
+ // this and other dartino_tests, everything that is printed to stdout ends
// up on the console of test.dart. This is good enough for testing, but DO
// NOT COPY TO PRODUCTION CODE.
print(s);
@@ -470,7 +470,7 @@ class TestSession extends Session {
List<String> stderrLines = await stderrFuture;
if (stdoutLines.isNotEmpty) {
sb.writeln("Problem #${++problemCount}:");
- sb.writeln("Unexpected stdout from fletch-vm:");
+ sb.writeln("Unexpected stdout from dartino-vm:");
for (String line in stdoutLines) {
sb.writeln(line);
}
@@ -478,7 +478,7 @@ class TestSession extends Session {
}
if (stderrLines.isNotEmpty) {
sb.writeln("Problem #${++problemCount}:");
- sb.writeln("Unexpected stderr from fletch-vm:");
+ sb.writeln("Unexpected stderr from dartino-vm:");
for (String line in stderrLines) {
sb.writeln(line);
}
@@ -498,7 +498,7 @@ class TestSession extends Session {
static Future<TestSession> spawnVm(
IncrementalCompiler compiler,
{String testName}) async {
- String vmPath = guessFletchVm(null).toFilePath();
+ String vmPath = guessDartinoVm(null).toFilePath();
List<Future> futures = <Future>[];
void recordFuture(String name, Future future) {
@@ -513,19 +513,19 @@ class TestSession extends Session {
print("Running '$vmPath ${vmOptions.join(" ")}'");
var environment = getProcessEnvironment(testName);
- FletchVm fletchVm = await FletchVm.start(
+ DartinoVm dartinoVm = await DartinoVm.start(
vmPath, arguments: vmOptions, environment: environment);
- // Unlike [fletchvm.stdoutLines] and [fletchvm.stderrLines], their
+ // Unlike [dartinovm.stdoutLines] and [dartinovm.stderrLines], their
// corresponding controller cannot produce an error.
StreamController<String> stdoutController = new StreamController<String>();
StreamController<String> stderrController = new StreamController<String>();
- recordFuture("stdout", fletchVm.stdoutLines.listen((String line) {
- print('fletch_vm_stdout: $line');
+ recordFuture("stdout", dartinoVm.stdoutLines.listen((String line) {
+ print('dartino_vm_stdout: $line');
stdoutController.add(line);
}).asFuture().whenComplete(stdoutController.close));
- recordFuture("stderr", fletchVm.stderrLines.listen((String line) {
- print('fletch_vm_stderr: $line');
+ recordFuture("stderr", dartinoVm.stderrLines.listen((String line) {
+ print('dartino_vm_stderr: $line');
stderrController.add(line);
}).asFuture().whenComplete(stderrController.close));
@@ -536,16 +536,16 @@ class TestSession extends Session {
// actually be ready to give us a crashed exit code. Exiting early with a
// failure in case exitCode is ready before server.first or having a
// timeout on server.first would be possible solutions.
- var vmSocket = await fletchVm.connect();
+ var vmSocket = await dartinoVm.connect();
recordFuture("vmSocket", vmSocket.done);
TestSession session = new TestSession(
- vmSocket, compiler, fletchVm.process,
+ vmSocket, compiler, dartinoVm.process,
new StreamIterator(stdoutController.stream),
stderrController.stream,
futures, exitCodeCompleter.future);
- recordFuture("exitCode", fletchVm.exitCode.then((int exitCode) {
+ recordFuture("exitCode", dartinoVm.exitCode.then((int exitCode) {
print("VM exited with exit code: $exitCode.");
exitCodeCompleter.complete(exitCode);
}));
@@ -602,7 +602,7 @@ class IncrementalTestHelper {
final IncrementalCompiler compiler;
- FletchSystem system;
+ DartinoSystem system;
IncrementalTestHelper.internal(
this.packageConfig,
@@ -620,14 +620,14 @@ class IncrementalTestHelper {
diagnosticHandler: diagnosticHandler,
outputProvider: new OutputProvider(),
support: incrementalMode,
- platform: "fletch_mobile.platform");
+ platform: "dartino_mobile.platform");
return new IncrementalTestHelper.internal(
packageConfig,
inputProvider,
compiler);
}
- Future<FletchDelta> fullCompile(ProgramResult program) async {
+ Future<DartinoDelta> fullCompile(ProgramResult program) async {
Map<String, String> code = computeCode(program);
inputProvider.sources.clear();
code.forEach((String name, String code) {
@@ -635,12 +635,12 @@ class IncrementalTestHelper {
});
await compiler.compile(customUriBase.resolve('main.dart'), customUriBase);
- FletchDelta delta = compiler.compiler.context.backend.computeDelta();
+ DartinoDelta delta = compiler.compiler.context.backend.computeDelta();
system = delta.system;
return delta;
}
- Future<FletchDelta> incrementalCompile(
+ Future<DartinoDelta> incrementalCompile(
ProgramResult program,
int version) async {
Map<String, String> code = computeCode(program);
@@ -650,7 +650,7 @@ class IncrementalTestHelper {
inputProvider.cachedSources[uri] = new Future.value(code[name]);
uriMap[customUriBase.resolve(name)] = uri;
}
- FletchDelta delta = await compiler.compileUpdates(
+ DartinoDelta delta = await compiler.compileUpdates(
system, uriMap, logVerbose: logger, logTime: logger);
system = delta.system;
return delta;
« no previous file with comments | « tests/dartino_compiler/incremental/experimental_mode.dart ('k') | tests/dartino_compiler/incremental/production_mode.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698