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

Side by Side Diff: pkg/analyzer/test/instrumentation/instrumentation_test.dart

Issue 837753002: Tweak for escaping in instrumentation. (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/analyzer/lib/instrumentation/instrumentation.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library test.instrumentation; 5 library test.instrumentation;
6 6
7 import 'package:analyzer/instrumentation/instrumentation.dart'; 7 import 'package:analyzer/instrumentation/instrumentation.dart';
8 import 'package:unittest/unittest.dart'; 8 import 'package:unittest/unittest.dart';
9 import '../reflective_tests.dart'; 9 import '../reflective_tests.dart';
10 10
(...skipping 20 matching lines...) Expand all
31 assertNormal(server, InstrumentationService.TAG_ERROR, message); 31 assertNormal(server, InstrumentationService.TAG_ERROR, message);
32 } 32 }
33 33
34 void test_logError_withColon() { 34 void test_logError_withColon() {
35 TestInstrumentationServer server = new TestInstrumentationServer(); 35 TestInstrumentationServer server = new TestInstrumentationServer();
36 InstrumentationService service = new InstrumentationService(server); 36 InstrumentationService service = new InstrumentationService(server);
37 service.logError('Error:message'); 37 service.logError('Error:message');
38 assertNormal(server, InstrumentationService.TAG_ERROR, 'Error::message'); 38 assertNormal(server, InstrumentationService.TAG_ERROR, 'Error::message');
39 } 39 }
40 40
41 void test_logError_withLeadingColon() {
42 TestInstrumentationServer server = new TestInstrumentationServer();
43 InstrumentationService service = new InstrumentationService(server);
44 service.logError(':a:bb');
45 assertNormal(server, InstrumentationService.TAG_ERROR, '::a::bb');
46 }
47
41 void test_logException_noTrace() { 48 void test_logException_noTrace() {
42 TestInstrumentationServer server = new TestInstrumentationServer(); 49 TestInstrumentationServer server = new TestInstrumentationServer();
43 InstrumentationService service = new InstrumentationService(server); 50 InstrumentationService service = new InstrumentationService(server);
44 String message = 'exceptionMessage'; 51 String message = 'exceptionMessage';
45 service.logException(message, null); 52 service.logException(message, null);
46 assertNormal(server, InstrumentationService.TAG_EXCEPTION, '$message:null'); 53 assertNormal(server, InstrumentationService.TAG_EXCEPTION, '$message:null');
47 } 54 }
48 55
49 void test_logNotification() { 56 void test_logNotification() {
50 TestInstrumentationServer server = new TestInstrumentationServer(); 57 TestInstrumentationServer server = new TestInstrumentationServer();
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 @override 90 @override
84 void logWithPriority(String message) { 91 void logWithPriority(String message) {
85 priorityChannel.writeln(message); 92 priorityChannel.writeln(message);
86 } 93 }
87 94
88 @override 95 @override
89 void shutdown() { 96 void shutdown() {
90 // Ignored 97 // Ignored
91 } 98 }
92 } 99 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/instrumentation/instrumentation.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698