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

Side by Side Diff: tests/compiler/dart2js/backend_dart/dart_backend_test.dart

Issue 526263002: Remove unneeded generation of default constructors from the dart backend. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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 | « sdk/lib/_internal/compiler/implementation/dart_backend/backend.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 import "package:expect/expect.dart"; 5 import "package:expect/expect.dart";
6 import 'dart:async'; 6 import 'dart:async';
7 import "package:async_helper/async_helper.dart"; 7 import "package:async_helper/async_helper.dart";
8 import '../mock_compiler.dart'; 8 import '../mock_compiler.dart';
9 import '../mock_libraries.dart'; 9 import '../mock_libraries.dart';
10 import 'package:compiler/compiler.dart'; 10 import 'package:compiler/compiler.dart';
(...skipping 860 matching lines...) Expand 10 before | Expand all | Expand 10 after
871 throw 'fisk'; 871 throw 'fisk';
872 } 872 }
873 main() { 873 main() {
874 print('corelib'); 874 print('corelib');
875 print_A('local'); 875 print_A('local');
876 } 876 }
877 """; 877 """;
878 testDart2Dart(src, expectedResult: expectedResult); 878 testDart2Dart(src, expectedResult: expectedResult);
879 } 879 }
880 880
881 testUnresolvedNamedConstructor() { 881 testUnresolvedNamedConstructor1() {
sigurdm 2014/09/02 09:14:06 Maybe it is nicer to keep the class alive with a s
882 var src = '''
883 class A {
884 }
885
886 main() {
887 new A.named();
888 }
889 ''';
890 var expectedResult = """
891 main() {
892 new Unresolved();
893 }
894 """;
895 testDart2Dart(src, expectedResult: expectedResult);
896 }
897
898 testUnresolvedNamedConstructor2() {
882 var src = ''' 899 var src = '''
883 class A { 900 class A {
884 A() {} 901 A() {}
885 } 902 }
886 903
887 main() { 904 main() {
888 new A(); 905 new A();
889 new A.named(); 906 new A.named();
890 } 907 }
891 '''; 908 ''';
892 var expectedResult = """ 909 var expectedResult = """
893 class A { 910 class A {
894 A() {} 911 A() {}
895 } 912 }
896 main() { 913 main() {
897 new A(); 914 new A();
898 new Unresolved_A(); 915 new Unresolved();
899 } 916 }
900 """; 917 """;
901 testDart2Dart(src, expectedResult: expectedResult); 918 testDart2Dart(src, expectedResult: expectedResult);
902 } 919 }
903 920
904 main() { 921 main() {
905 testSimpleFileUnparse(); 922 testSimpleFileUnparse();
906 testTopLevelField(); 923 testTopLevelField();
907 testSimpleTopLevelClass(); 924 testSimpleTopLevelClass();
908 testClassWithSynthesizedConstructor(); 925 testClassWithSynthesizedConstructor();
(...skipping 13 matching lines...) Expand all
922 testClassTypeArgumentBound(); 939 testClassTypeArgumentBound();
923 testDoubleMains(); 940 testDoubleMains();
924 testStaticAccessIoLib(); 941 testStaticAccessIoLib();
925 testLocalFunctionPlaceholder(); 942 testLocalFunctionPlaceholder();
926 testMinification(); 943 testMinification();
927 testClosureLocalsMinified(); 944 testClosureLocalsMinified();
928 testParametersMinified(); 945 testParametersMinified();
929 testDeclarationTypePlaceholders(); 946 testDeclarationTypePlaceholders();
930 testPlatformLibraryMemberNamesAreFixed(); 947 testPlatformLibraryMemberNamesAreFixed();
931 testConflictsWithCoreLib(); 948 testConflictsWithCoreLib();
932 testUnresolvedNamedConstructor(); 949 testUnresolvedNamedConstructor1();
950 testUnresolvedNamedConstructor2();
933 } 951 }
sigurdm 2014/09/02 09:14:06 Could also make a language-test (might already exi
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/dart_backend/backend.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698