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

Side by Side Diff: pkg/analyzer/test/generated/utilities_test.dart

Issue 694833002: Fix logging API (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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/test/generated/test_support.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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 // This code was auto-generated, is not intended to be edited, and is subject to 5 // This code was auto-generated, is not intended to be edited, and is subject to
6 // significant change. Please see the README file for more information. 6 // significant change. Please see the README file for more information.
7 7
8 library engine.utilities_test; 8 library engine.utilities_test;
9 9
10 import 'dart:collection'; 10 import 'dart:collection';
(...skipping 5224 matching lines...) Expand 10 before | Expand all | Expand 10 after
5235 expect(StringUtilities.substringBeforeChar("abcba", 0x62), "a"); 5235 expect(StringUtilities.substringBeforeChar("abcba", 0x62), "a");
5236 expect(StringUtilities.substringBeforeChar("abc", 0x63), "ab"); 5236 expect(StringUtilities.substringBeforeChar("abc", 0x63), "ab");
5237 expect(StringUtilities.substringBeforeChar("abc", 0x64), "abc"); 5237 expect(StringUtilities.substringBeforeChar("abc", 0x64), "abc");
5238 } 5238 }
5239 } 5239 }
5240 5240
5241 /** 5241 /**
5242 * Instances of the class `TestLogger` implement a logger that can be used by te sts. 5242 * Instances of the class `TestLogger` implement a logger that can be used by te sts.
5243 */ 5243 */
5244 class TestLogger implements Logger { 5244 class TestLogger implements Logger {
5245 // TODO(brianwilkerson) Deprecate this class in favor of the class TestLogger
5246 // in tet_support.dart.
scheglov 2014/10/31 16:15:20 As I can see, it is not used at all.
Brian Wilkerson 2014/10/31 16:21:55 You're right. I've removed it.
5245 /** 5247 /**
5246 * The number of error messages that were logged. 5248 * The number of error messages that were logged.
5247 */ 5249 */
5248 int _errorCount = 0; 5250 int _errorCount = 0;
5249 5251
5250 /** 5252 /**
5251 * The number of informational messages that were logged. 5253 * The number of informational messages that were logged.
5252 */ 5254 */
5253 int _infoCount = 0; 5255 int _infoCount = 0;
5254 5256
5255 /** 5257 /**
5256 * Return the number of error messages that were logged. 5258 * Return the number of error messages that were logged.
5257 * 5259 *
5258 * @return the number of error messages that were logged 5260 * @return the number of error messages that were logged
5259 */ 5261 */
5260 int get errorCount => _errorCount; 5262 int get errorCount => _errorCount;
5261 5263
5262 /** 5264 /**
5263 * Return the number of informational messages that were logged. 5265 * Return the number of informational messages that were logged.
5264 * 5266 *
5265 * @return the number of informational messages that were logged 5267 * @return the number of informational messages that were logged
5266 */ 5268 */
5267 int get infoCount => _infoCount; 5269 int get infoCount => _infoCount;
5268 5270
5269 @override 5271 @override
5270 void logError(String message) { 5272 void logError(String message, [CaughtException exception]) {
5271 _errorCount++; 5273 _errorCount++;
5272 } 5274 }
5273 5275
5274 @override 5276 @override
5275 void logError2(String message, Exception exception) { 5277 void logError2(String message, Object exception) {
5276 _errorCount++; 5278 _errorCount++;
5277 } 5279 }
5278 5280
5279 @override 5281 @override
5280 void logInformation(String message) { 5282 void logInformation(String message, [CaughtException exception]) {
5281 _infoCount++; 5283 _infoCount++;
5282 } 5284 }
5283 5285
5284 @override 5286 @override
5285 void logInformation2(String message, Exception exception) { 5287 void logInformation2(String message, Object exception) {
5286 _infoCount++; 5288 _infoCount++;
5287 } 5289 }
5288 } 5290 }
5289 5291
5290 5292
5291 class TokenMapTest { 5293 class TokenMapTest {
5292 void test_creation() { 5294 void test_creation() {
5293 expect(new TokenMap(), isNotNull); 5295 expect(new TokenMap(), isNotNull);
5294 } 5296 }
5295 5297
5296 void test_get_absent() { 5298 void test_get_absent() {
5297 TokenMap tokenMap = new TokenMap(); 5299 TokenMap tokenMap = new TokenMap();
5298 expect(tokenMap.get(TokenFactory.tokenFromType(TokenType.AT)), isNull); 5300 expect(tokenMap.get(TokenFactory.tokenFromType(TokenType.AT)), isNull);
5299 } 5301 }
5300 5302
5301 void test_get_added() { 5303 void test_get_added() {
5302 TokenMap tokenMap = new TokenMap(); 5304 TokenMap tokenMap = new TokenMap();
5303 Token key = TokenFactory.tokenFromType(TokenType.AT); 5305 Token key = TokenFactory.tokenFromType(TokenType.AT);
5304 Token value = TokenFactory.tokenFromType(TokenType.AT); 5306 Token value = TokenFactory.tokenFromType(TokenType.AT);
5305 tokenMap.put(key, value); 5307 tokenMap.put(key, value);
5306 expect(tokenMap.get(key), same(value)); 5308 expect(tokenMap.get(key), same(value));
5307 } 5309 }
5308 } 5310 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/generated/test_support.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698