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

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

Issue 627133002: Uncomment and clean up engine_test.dart (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rollback ServerRefactoring change Created 6 years, 2 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
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.test_support; 8 library engine.test_support;
9 9
10 import 'dart:collection'; 10 import 'dart:collection';
(...skipping 939 matching lines...) Expand 10 before | Expand all | Expand 10 after
950 @override 950 @override
951 void logInformation2(String message, Exception exception) { 951 void logInformation2(String message, Exception exception) {
952 infoCount++; 952 infoCount++;
953 } 953 }
954 } 954 }
955 955
956 956
957 class TestSource implements Source { 957 class TestSource implements Source {
958 String _name; 958 String _name;
959 String _contents; 959 String _contents;
960 int modificationStamp = 0;
961 bool exists2 = true;
962
963 /**
964 * A flag indicating whether an exception should be generated when an attempt
965 * is made to access the contents of this source.
966 */
967 bool generateExceptionOnRead = false;
968
969 /**
970 * The number of times that the contents of this source have been requested.
971 */
972 int readCount = 0;
973
960 TestSource([this._name = '/test.dart', this._contents]); 974 TestSource([this._name = '/test.dart', this._contents]);
975
961 TimestampedData<String> get contents { 976 TimestampedData<String> get contents {
977 readCount++;
978 if (generateExceptionOnRead) {
979 throw new Exception("I/O Exception while getting the contents of " + _name );
980 }
962 return new TimestampedData<String>(0, _contents); 981 return new TimestampedData<String>(0, _contents);
963 } 982 }
983 void setContents(String value) {
984 modificationStamp = new DateTime.now().millisecondsSinceEpoch;
985 _contents = value;
986 }
964 String get encoding { 987 String get encoding {
965 throw new UnsupportedOperationException(); 988 throw new UnsupportedOperationException();
966 } 989 }
967 String get fullName { 990 String get fullName {
968 return _name; 991 return _name;
969 } 992 }
970 int get hashCode => 0; 993 int get hashCode => 0;
971 bool get isInSystemLibrary { 994 bool get isInSystemLibrary {
972 return false; 995 return false;
973 } 996 }
974 int get modificationStamp {
975 return 0;
976 }
977 String get shortName { 997 String get shortName {
978 return _name; 998 return _name;
979 } 999 }
980 Uri get uri { 1000 Uri get uri {
981 throw new UnsupportedOperationException(); 1001 throw new UnsupportedOperationException();
982 } 1002 }
983 UriKind get uriKind { 1003 UriKind get uriKind {
984 throw new UnsupportedOperationException(); 1004 throw new UnsupportedOperationException();
985 } 1005 }
986 bool operator ==(Object object) { 1006 bool operator ==(Object other) {
987 return object is TestSource; 1007 if (other is TestSource) {
1008 return other._name == _name;
1009 }
1010 return false;
988 } 1011 }
989 bool exists() => true; 1012 bool exists() => exists2;
990 void getContentsToReceiver(Source_ContentReceiver receiver) { 1013 void getContentsToReceiver(Source_ContentReceiver receiver) {
991 throw new UnsupportedOperationException(); 1014 throw new UnsupportedOperationException();
992 } 1015 }
993 Source resolve(String uri) { 1016 Source resolve(String uri) {
994 throw new UnsupportedOperationException(); 1017 throw new UnsupportedOperationException();
995 } 1018 }
996 Uri resolveRelativeUri(Uri uri) { 1019 Uri resolveRelativeUri(Uri uri) {
997 return new Uri(scheme: 'file', path: _name).resolveUri(uri); 1020 return new Uri(scheme: 'file', path: _name).resolveUri(uri);
998 } 1021 }
999 } 1022 }
OLDNEW
« pkg/analyzer/lib/src/generated/engine.dart ('K') | « pkg/analyzer/test/generated/resolver_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698