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

Unified Diff: dart/tests/try/web/incremental_compilation_update_test.dart

Issue 809313006: Implement incremental tests with multiple files. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merged with r42458. Created 6 years 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
« no previous file with comments | « dart/tests/try/poi/compiler_test_case.dart ('k') | dart/tests/try/web/program_result.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/tests/try/web/incremental_compilation_update_test.dart
diff --git a/dart/tests/try/web/incremental_compilation_update_test.dart b/dart/tests/try/web/incremental_compilation_update_test.dart
index ec333a24029cf09815a007ced1865133ce2ff466..282e299f87fc6ab43149b48b092ba284a241bb88 100644
--- a/dart/tests/try/web/incremental_compilation_update_test.dart
+++ b/dart/tests/try/web/incremental_compilation_update_test.dart
@@ -1649,6 +1649,31 @@ main() {
const ProgramExpectation(
const <String>['A(v2)', 'B(v2)', 'B(A(v2))', 'A(B(v2))']),
]),
+
+ const EncodedResult(
+ r"""
+==> main.dart <==
+library test.main;
+
+part 'part.dart';
+==> part.dart.patch <==
+part of test.main;
+
+main() {
+<<<<<<<
+ print('Hello, World!');
+=======
+ print('Hello, Brave New World!');
+>>>>>>>
+}
+""",
+ const [
+ 'Hello, World!',
+ const ProgramExpectation(
+ const <String>['Hello, Brave New World!'],
+ // TODO(ahe): Shouldn't throw.
+ compileUpdatesShouldThrow: true),
+ ]),
];
void main() {
@@ -1825,23 +1850,30 @@ void logger(x) {
}
}
-DivElement numberedLines(String code) {
- DivElement result = new DivElement();
- result.classes.add("output");
-
- for (String text in splitLines(code)) {
- PreElement line = new PreElement()
- ..appendText(text.trimRight())
- ..classes.add("line");
- result.append(line);
+DivElement numberedLines(code) {
+ if (code is! Map) {
+ code = {'main.dart': code};
}
-
+ DivElement result = new DivElement();
+ code.forEach((String fileName, String code) {
+ result.append(new HeadingElement.h4()..appendText(fileName));
+ DivElement lines = new DivElement();
+ result.append(lines);
+ lines.classes.add("output");
+
+ for (String text in splitLines(code)) {
+ PreElement line = new PreElement()
+ ..appendText(text.trimRight())
+ ..classes.add("line");
+ lines.append(line);
+ }
+ });
return result;
}
StyleElement lineNumberStyle() {
StyleElement style = new StyleElement()..appendText('''
-h2, h3 {
+h2, h3, h4 {
color: black;
}
« no previous file with comments | « dart/tests/try/poi/compiler_test_case.dart ('k') | dart/tests/try/web/program_result.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698