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

Side by Side Diff: tests/language/metadata_test.dart

Issue 10981026: Convert raw strings to new syntax (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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) 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 // Test ensuring that compiler can parse metadata. Need to add negative 5 // Test ensuring that compiler can parse metadata. Need to add negative
6 // test cases with illegal metadata annotations. 6 // test cases with illegal metadata annotations.
7 7
8 #library("metadata_test.dart"); 8 #library("metadata_test.dart");
9 #import("metadata_lib.dart", prefix: "Meta"); 9 #import("metadata_lib.dart", prefix: "Meta");
10 10
(...skipping 13 matching lines...) Expand all
24 @meta1 typedef int DingDong<@meta2 T>(@meta1 event); 24 @meta1 typedef int DingDong<@meta2 T>(@meta1 event);
25 25
26 @meta1 class A <@Tag("typeParam") T> { 26 @meta1 class A <@Tag("typeParam") T> {
27 @meta1 @meta2 27 @meta1 @meta2
28 static String staticField; 28 static String staticField;
29 29
30 @Meta.Alien("ET") int foo(@meta1 bool fool, {@meta1 @Tag("opt") x: 100}) { 30 @Meta.Alien("ET") int foo(@meta1 bool fool, {@meta1 @Tag("opt") x: 100}) {
31 return x; 31 return x;
32 } 32 }
33 33
34 @Tag(@"timewarp") 34 @Tag(r"timewarp")
35 List<int> getNextWeeksLottoNumbers() => [1, 2, 3, 4, 5, 6]; 35 List<int> getNextWeeksLottoNumbers() => [1, 2, 3, 4, 5, 6];
36 } 36 }
37 37
38 @meta1 main() { 38 @meta1 main() {
39 @meta1 var a = new A(); 39 @meta1 var a = new A();
40 Expect.equals(0, a.foo(false, x: 0)); 40 Expect.equals(0, a.foo(false, x: 0));
41 41
42 for (@Tag("loopvar") int i = 0; i < 10; i++) { 42 for (@Tag("loopvar") int i = 0; i < 10; i++) {
43 // Do something. 43 // Do something.
44 } 44 }
45 45
46 @meta1 var s = @'This is a raw \\ string.'; 46 @meta1 var s = r'This is a raw \\ string.';
47 } 47 }
OLDNEW
« no previous file with comments | « tests/language/field_method4_negative_test.dart ('k') | tests/language/string_interpolate_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698