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

Unified Diff: pkg/analyzer/test/instrumentation/instrumentation_test.dart

Issue 825683005: Instrument file reads (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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
« no previous file with comments | « pkg/analyzer/lib/src/generated/engine.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/instrumentation/instrumentation_test.dart
diff --git a/pkg/analyzer/test/instrumentation/instrumentation_test.dart b/pkg/analyzer/test/instrumentation/instrumentation_test.dart
index 230f65d94b26853e4663c4592c939f846fe9e432..53a81914b72f8024fd4c9c7a9ed1a15d1e9c4101 100644
--- a/pkg/analyzer/test/instrumentation/instrumentation_test.dart
+++ b/pkg/analyzer/test/instrumentation/instrumentation_test.dart
@@ -56,6 +56,19 @@ class InstrumentationServiceTest extends ReflectiveTestCase {
assertNormal(server, InstrumentationService.TAG_EXCEPTION, '$message:null');
}
+ void test_logFileRead() {
+ TestInstrumentationServer server = new TestInstrumentationServer();
+ InstrumentationService service = new InstrumentationService(server);
+ String path = '/file/path';
+ int time = 978336000000;
+ String content = 'class C {\n}\n';
+ service.logFileRead(path, time, content);
+ assertNormal(
+ server,
+ InstrumentationService.TAG_FILE_READ,
+ '$path:$time:$content');
+ }
+
void test_logLogEntry() {
TestInstrumentationServer server = new TestInstrumentationServer();
InstrumentationService service = new InstrumentationService(server);
@@ -66,7 +79,7 @@ class InstrumentationServiceTest extends ReflectiveTestCase {
assertNormal(
server,
InstrumentationService.TAG_LOG_ENTRY,
- '$level:2001-01-01 00::00::00.000:$message');
+ '$level:${time.millisecondsSinceEpoch}:$message');
}
void test_logNotification() {
« no previous file with comments | « pkg/analyzer/lib/src/generated/engine.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698