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

Unified Diff: pkg/polymer/test/build/build_log_combiner_test.dart

Issue 513023002: Step one towards stable error messages with details: (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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
« no previous file with comments | « pkg/polymer/test/build/all_phases_test.dart ('k') | pkg/polymer/test/build/common.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/polymer/test/build/build_log_combiner_test.dart
diff --git a/pkg/polymer/test/build/build_log_combiner_test.dart b/pkg/polymer/test/build/build_log_combiner_test.dart
index 6f98e9ac51741dc453080115b1bafae9c39cfa26..34d59bc8b7aa3316e545285dd1e989180083bf3f 100644
--- a/pkg/polymer/test/build/build_log_combiner_test.dart
+++ b/pkg/polymer/test/build/build_log_combiner_test.dart
@@ -4,8 +4,10 @@
library polymer.test.build.build_log_combiner_test;
-import 'package:polymer/src/build/common.dart';
+import 'package:code_transformers/messages/build_logger.dart' show
+ LOG_EXTENSION;
import 'package:polymer/src/build/build_log_combiner.dart';
+import 'package:polymer/src/build/common.dart';
import 'package:unittest/compact_vm_config.dart';
import 'package:unittest/unittest.dart';
@@ -19,17 +21,25 @@ void main() {
testPhases('combines multiple logs', phases, {
'a|web/test.html': '<!DOCTYPE html><html></html>',
- 'a|web/test.html$LOG_EXTENSION.1': '[${_logString('Info', 'foo')}]',
- 'a|web/test.html$LOG_EXTENSION.2': '[${_logString('Warning', 'bar')}]',
- 'a|web/test.html$LOG_EXTENSION.3': '[${_logString('Error', 'baz')}]',
+ 'a|web/test.html$LOG_EXTENSION.1':
+ '{"foo#0":[${_logString('Info', 0, 'foo')}]}',
+ 'a|web/test.html$LOG_EXTENSION.2':
+ '{"foo#2":[${_logString('Warning', 2, 'bar')}]}',
+ 'a|web/test.html$LOG_EXTENSION.3':
+ '{'
+ '"foo#2":[${_logString('Error', 2, 'baz1')}],'
+ '"foo#44":[${_logString('Error', 44, 'baz2')}]'
+ '}',
}, {
'a|web/test.html': '<!DOCTYPE html><html></html>',
- 'a|web/test.html$LOG_EXTENSION':
- '[${_logString('Info', 'foo')},'
- '${_logString('Warning', 'bar')},'
- '${_logString('Error', 'baz')}]',
+ 'a|web/test.html$LOG_EXTENSION': '{'
+ '"foo#0":[${_logString('Info', 0, 'foo')}],'
+ '"foo#2":[${_logString('Warning', 2, 'bar')},'
+ '${_logString('Error', 2, 'baz1')}],'
+ '"foo#44":[${_logString('Error', 44, 'baz2')}]'
+ '}',
});
}
-String _logString(String level, String message) =>
- '{"level":"$level","message":"$message"}';
+String _logString(String level, int id, String message) =>
+ '{"level":"$level","message":{"id":"foo#$id","snippet":"$message"}}';
« no previous file with comments | « pkg/polymer/test/build/all_phases_test.dart ('k') | pkg/polymer/test/build/common.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698