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

Unified Diff: test/logging_test.dart

Issue 1284983004: Also generate error when autogenerating stack traces (fix #25) (Closed) Base URL: git@github.com:dart-lang/logging.git@master
Patch Set: Created 5 years, 4 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 | « pubspec.yaml ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/logging_test.dart
diff --git a/test/logging_test.dart b/test/logging_test.dart
index e27ee2f3b047ae09e678c7ddea85742c96eb792f..60017b371bf78a44a337e4cd099cfadcfe643c70 100644
--- a/test/logging_test.dart
+++ b/test/logging_test.dart
@@ -569,5 +569,18 @@ void main() {
expect(records[0].stackTrace, isNot(equals(trace)));
expect(records[1].stackTrace, trace);
});
+
+ test('error also generated when generating a trace', () {
+ var records = new List<LogRecord>();
+ recordStackTraceAtLevel = Level.WARNING;
+ root.onRecord.listen(records.add);
+ root.severe('hello');
+ root.warning('hello');
+ root.info('hello');
+ expect(records, hasLength(3));
+ expect(records[0].error, isNotNull);
+ expect(records[1].error, isNotNull);
+ expect(records[2].error, isNull);
+ });
});
}
« no previous file with comments | « pubspec.yaml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698