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

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

Issue 428303004: Breaking changes in 'analyzer' package. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rename Source.resolveRelative to resolveRelativeUri, soften version constraints Created 6 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 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.element_test; 8 library engine.element_test;
9 9
10 import 'package:analyzer/src/generated/java_core.dart'; 10 import 'package:analyzer/src/generated/java_core.dart';
(...skipping 1239 matching lines...) Expand 10 before | Expand all | Expand 10 after
1250 JUnitTestCase.assertEquals(encoding, location.encoding); 1250 JUnitTestCase.assertEquals(encoding, location.encoding);
1251 } 1251 }
1252 1252
1253 void test_equals_equal() { 1253 void test_equals_equal() {
1254 String encoding = "a;b;c"; 1254 String encoding = "a;b;c";
1255 ElementLocationImpl first = new ElementLocationImpl.con2(encoding); 1255 ElementLocationImpl first = new ElementLocationImpl.con2(encoding);
1256 ElementLocationImpl second = new ElementLocationImpl.con2(encoding); 1256 ElementLocationImpl second = new ElementLocationImpl.con2(encoding);
1257 JUnitTestCase.assertTrue(first == second); 1257 JUnitTestCase.assertTrue(first == second);
1258 } 1258 }
1259 1259
1260 void test_equals_equalWithDifferentUriKind() {
1261 ElementLocationImpl first = new ElementLocationImpl.con2("fa;fb;c");
1262 ElementLocationImpl second = new ElementLocationImpl.con2("pa;pb;c");
1263 JUnitTestCase.assertTrue(first == second);
1264 }
1265
1266 void test_equals_notEqual_differentLengths() { 1260 void test_equals_notEqual_differentLengths() {
1267 ElementLocationImpl first = new ElementLocationImpl.con2("a;b;c"); 1261 ElementLocationImpl first = new ElementLocationImpl.con2("a;b;c");
1268 ElementLocationImpl second = new ElementLocationImpl.con2("a;b;c;d"); 1262 ElementLocationImpl second = new ElementLocationImpl.con2("a;b;c;d");
1269 JUnitTestCase.assertFalse(first == second); 1263 JUnitTestCase.assertFalse(first == second);
1270 } 1264 }
1271 1265
1272 void test_equals_notEqual_notLocation() { 1266 void test_equals_notEqual_notLocation() {
1273 ElementLocationImpl first = new ElementLocationImpl.con2("a;b;c"); 1267 ElementLocationImpl first = new ElementLocationImpl.con2("a;b;c");
1274 JUnitTestCase.assertFalse(first == "a;b;d"); 1268 JUnitTestCase.assertFalse(first == "a;b;d");
1275 } 1269 }
(...skipping 20 matching lines...) Expand all
1296 JUnitTestCase.assertEquals(encoding, location.encoding); 1290 JUnitTestCase.assertEquals(encoding, location.encoding);
1297 } 1291 }
1298 1292
1299 void test_hashCode_equal() { 1293 void test_hashCode_equal() {
1300 String encoding = "a;b;c"; 1294 String encoding = "a;b;c";
1301 ElementLocationImpl first = new ElementLocationImpl.con2(encoding); 1295 ElementLocationImpl first = new ElementLocationImpl.con2(encoding);
1302 ElementLocationImpl second = new ElementLocationImpl.con2(encoding); 1296 ElementLocationImpl second = new ElementLocationImpl.con2(encoding);
1303 JUnitTestCase.assertTrue(first.hashCode == second.hashCode); 1297 JUnitTestCase.assertTrue(first.hashCode == second.hashCode);
1304 } 1298 }
1305 1299
1306 void test_hashCode_equalWithDifferentUriKind() {
1307 ElementLocationImpl first = new ElementLocationImpl.con2("fa;fb;c");
1308 ElementLocationImpl second = new ElementLocationImpl.con2("pa;pb;c");
1309 JUnitTestCase.assertTrue(first.hashCode == second.hashCode);
1310 }
1311
1312 static dartSuite() { 1300 static dartSuite() {
1313 _ut.group('ElementLocationImplTest', () { 1301 _ut.group('ElementLocationImplTest', () {
1314 _ut.test('test_create_encoding', () { 1302 _ut.test('test_create_encoding', () {
1315 final __test = new ElementLocationImplTest(); 1303 final __test = new ElementLocationImplTest();
1316 runJUnitTest(__test, __test.test_create_encoding); 1304 runJUnitTest(__test, __test.test_create_encoding);
1317 }); 1305 });
1318 _ut.test('test_create_encoding_emptyLast', () { 1306 _ut.test('test_create_encoding_emptyLast', () {
1319 final __test = new ElementLocationImplTest(); 1307 final __test = new ElementLocationImplTest();
1320 runJUnitTest(__test, __test.test_create_encoding_emptyLast); 1308 runJUnitTest(__test, __test.test_create_encoding_emptyLast);
1321 }); 1309 });
1322 _ut.test('test_equals_equal', () { 1310 _ut.test('test_equals_equal', () {
1323 final __test = new ElementLocationImplTest(); 1311 final __test = new ElementLocationImplTest();
1324 runJUnitTest(__test, __test.test_equals_equal); 1312 runJUnitTest(__test, __test.test_equals_equal);
1325 }); 1313 });
1326 _ut.test('test_equals_equalWithDifferentUriKind', () {
1327 final __test = new ElementLocationImplTest();
1328 runJUnitTest(__test, __test.test_equals_equalWithDifferentUriKind);
1329 });
1330 _ut.test('test_equals_notEqual_differentLengths', () { 1314 _ut.test('test_equals_notEqual_differentLengths', () {
1331 final __test = new ElementLocationImplTest(); 1315 final __test = new ElementLocationImplTest();
1332 runJUnitTest(__test, __test.test_equals_notEqual_differentLengths); 1316 runJUnitTest(__test, __test.test_equals_notEqual_differentLengths);
1333 }); 1317 });
1334 _ut.test('test_equals_notEqual_notLocation', () { 1318 _ut.test('test_equals_notEqual_notLocation', () {
1335 final __test = new ElementLocationImplTest(); 1319 final __test = new ElementLocationImplTest();
1336 runJUnitTest(__test, __test.test_equals_notEqual_notLocation); 1320 runJUnitTest(__test, __test.test_equals_notEqual_notLocation);
1337 }); 1321 });
1338 _ut.test('test_equals_notEqual_sameLengths', () { 1322 _ut.test('test_equals_notEqual_sameLengths', () {
1339 final __test = new ElementLocationImplTest(); 1323 final __test = new ElementLocationImplTest();
1340 runJUnitTest(__test, __test.test_equals_notEqual_sameLengths); 1324 runJUnitTest(__test, __test.test_equals_notEqual_sameLengths);
1341 }); 1325 });
1342 _ut.test('test_getComponents', () { 1326 _ut.test('test_getComponents', () {
1343 final __test = new ElementLocationImplTest(); 1327 final __test = new ElementLocationImplTest();
1344 runJUnitTest(__test, __test.test_getComponents); 1328 runJUnitTest(__test, __test.test_getComponents);
1345 }); 1329 });
1346 _ut.test('test_getEncoding', () { 1330 _ut.test('test_getEncoding', () {
1347 final __test = new ElementLocationImplTest(); 1331 final __test = new ElementLocationImplTest();
1348 runJUnitTest(__test, __test.test_getEncoding); 1332 runJUnitTest(__test, __test.test_getEncoding);
1349 }); 1333 });
1350 _ut.test('test_hashCode_equal', () { 1334 _ut.test('test_hashCode_equal', () {
1351 final __test = new ElementLocationImplTest(); 1335 final __test = new ElementLocationImplTest();
1352 runJUnitTest(__test, __test.test_hashCode_equal); 1336 runJUnitTest(__test, __test.test_hashCode_equal);
1353 }); 1337 });
1354 _ut.test('test_hashCode_equalWithDifferentUriKind', () {
1355 final __test = new ElementLocationImplTest();
1356 runJUnitTest(__test, __test.test_hashCode_equalWithDifferentUriKind);
1357 });
1358 }); 1338 });
1359 } 1339 }
1360 } 1340 }
1361 1341
1362 class FunctionTypeImplTest extends EngineTestCase { 1342 class FunctionTypeImplTest extends EngineTestCase {
1363 void test_creation() { 1343 void test_creation() {
1364 JUnitTestCase.assertNotNull(new FunctionTypeImpl.con1(new FunctionElementImp l.forNode(AstFactory.identifier3("f")))); 1344 JUnitTestCase.assertNotNull(new FunctionTypeImpl.con1(new FunctionElementImp l.forNode(AstFactory.identifier3("f"))));
1365 } 1345 }
1366 1346
1367 void test_getElement() { 1347 void test_getElement() {
(...skipping 2880 matching lines...) Expand 10 before | Expand all | Expand 10 after
4248 void test_creation() { 4228 void test_creation() {
4249 JUnitTestCase.assertNotNull(new TypeParameterTypeImpl(new TypeParameterEleme ntImpl.forNode(AstFactory.identifier3("E")))); 4229 JUnitTestCase.assertNotNull(new TypeParameterTypeImpl(new TypeParameterEleme ntImpl.forNode(AstFactory.identifier3("E"))));
4250 } 4230 }
4251 4231
4252 void test_getElement() { 4232 void test_getElement() {
4253 TypeParameterElementImpl element = new TypeParameterElementImpl.forNode(AstF actory.identifier3("E")); 4233 TypeParameterElementImpl element = new TypeParameterElementImpl.forNode(AstF actory.identifier3("E"));
4254 TypeParameterTypeImpl type = new TypeParameterTypeImpl(element); 4234 TypeParameterTypeImpl type = new TypeParameterTypeImpl(element);
4255 JUnitTestCase.assertEquals(element, type.element); 4235 JUnitTestCase.assertEquals(element, type.element);
4256 } 4236 }
4257 4237
4258 void test_isMoreSpecificThan_typeArguments_bottom() {
4259 TypeParameterElementImpl element = new TypeParameterElementImpl.forNode(AstF actory.identifier3("E"));
4260 TypeParameterTypeImpl type = new TypeParameterTypeImpl(element);
4261 // E << bottom
4262 JUnitTestCase.assertTrue(type.isMoreSpecificThan(BottomTypeImpl.instance));
4263 }
4264
4265 void test_isMoreSpecificThan_typeArguments_dynamic() { 4238 void test_isMoreSpecificThan_typeArguments_dynamic() {
4266 TypeParameterElementImpl element = new TypeParameterElementImpl.forNode(AstF actory.identifier3("E")); 4239 TypeParameterElementImpl element = new TypeParameterElementImpl.forNode(AstF actory.identifier3("E"));
4267 TypeParameterTypeImpl type = new TypeParameterTypeImpl(element); 4240 TypeParameterTypeImpl type = new TypeParameterTypeImpl(element);
4268 // E << dynamic 4241 // E << dynamic
4269 JUnitTestCase.assertTrue(type.isMoreSpecificThan(DynamicTypeImpl.instance)); 4242 JUnitTestCase.assertTrue(type.isMoreSpecificThan(DynamicTypeImpl.instance));
4270 } 4243 }
4271 4244
4272 void test_isMoreSpecificThan_typeArguments_object() { 4245 void test_isMoreSpecificThan_typeArguments_object() {
4273 TypeParameterElementImpl element = new TypeParameterElementImpl.forNode(AstF actory.identifier3("E")); 4246 TypeParameterElementImpl element = new TypeParameterElementImpl.forNode(AstF actory.identifier3("E"));
4274 TypeParameterTypeImpl type = new TypeParameterTypeImpl(element); 4247 TypeParameterTypeImpl type = new TypeParameterTypeImpl(element);
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
4353 static dartSuite() { 4326 static dartSuite() {
4354 _ut.group('TypeParameterTypeImplTest', () { 4327 _ut.group('TypeParameterTypeImplTest', () {
4355 _ut.test('test_creation', () { 4328 _ut.test('test_creation', () {
4356 final __test = new TypeParameterTypeImplTest(); 4329 final __test = new TypeParameterTypeImplTest();
4357 runJUnitTest(__test, __test.test_creation); 4330 runJUnitTest(__test, __test.test_creation);
4358 }); 4331 });
4359 _ut.test('test_getElement', () { 4332 _ut.test('test_getElement', () {
4360 final __test = new TypeParameterTypeImplTest(); 4333 final __test = new TypeParameterTypeImplTest();
4361 runJUnitTest(__test, __test.test_getElement); 4334 runJUnitTest(__test, __test.test_getElement);
4362 }); 4335 });
4363 _ut.test('test_isMoreSpecificThan_typeArguments_bottom', () {
4364 final __test = new TypeParameterTypeImplTest();
4365 runJUnitTest(__test, __test.test_isMoreSpecificThan_typeArguments_bottom );
4366 });
4367 _ut.test('test_isMoreSpecificThan_typeArguments_dynamic', () { 4336 _ut.test('test_isMoreSpecificThan_typeArguments_dynamic', () {
4368 final __test = new TypeParameterTypeImplTest(); 4337 final __test = new TypeParameterTypeImplTest();
4369 runJUnitTest(__test, __test.test_isMoreSpecificThan_typeArguments_dynami c); 4338 runJUnitTest(__test, __test.test_isMoreSpecificThan_typeArguments_dynami c);
4370 }); 4339 });
4371 _ut.test('test_isMoreSpecificThan_typeArguments_object', () { 4340 _ut.test('test_isMoreSpecificThan_typeArguments_object', () {
4372 final __test = new TypeParameterTypeImplTest(); 4341 final __test = new TypeParameterTypeImplTest();
4373 runJUnitTest(__test, __test.test_isMoreSpecificThan_typeArguments_object ); 4342 runJUnitTest(__test, __test.test_isMoreSpecificThan_typeArguments_object );
4374 }); 4343 });
4375 _ut.test('test_isMoreSpecificThan_typeArguments_resursive', () { 4344 _ut.test('test_isMoreSpecificThan_typeArguments_resursive', () {
4376 final __test = new TypeParameterTypeImplTest(); 4345 final __test = new TypeParameterTypeImplTest();
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
4482 TypeParameterTypeImplTest.dartSuite(); 4451 TypeParameterTypeImplTest.dartSuite();
4483 VoidTypeImplTest.dartSuite(); 4452 VoidTypeImplTest.dartSuite();
4484 ClassElementImplTest.dartSuite(); 4453 ClassElementImplTest.dartSuite();
4485 CompilationUnitElementImplTest.dartSuite(); 4454 CompilationUnitElementImplTest.dartSuite();
4486 ElementLocationImplTest.dartSuite(); 4455 ElementLocationImplTest.dartSuite();
4487 ElementImplTest.dartSuite(); 4456 ElementImplTest.dartSuite();
4488 HtmlElementImplTest.dartSuite(); 4457 HtmlElementImplTest.dartSuite();
4489 LibraryElementImplTest.dartSuite(); 4458 LibraryElementImplTest.dartSuite();
4490 MultiplyDefinedElementImplTest.dartSuite(); 4459 MultiplyDefinedElementImplTest.dartSuite();
4491 } 4460 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/file_system/resource_uri_resolver_test.dart ('k') | pkg/analyzer/test/generated/resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698