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

Unified Diff: pkg/fasta/test/expressions.dart.direct.expect

Issue 2631613003: Add Fasta tests. (Closed)
Patch Set: Address review comments. Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/fasta/test/expressions.dart.dartk.expect ('k') | pkg/fasta/test/expressions.dart.outline.expect » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/fasta/test/expressions.dart.direct.expect
diff --git a/pkg/fasta/test/expressions.dart.direct.expect b/pkg/fasta/test/expressions.dart.direct.expect
new file mode 100644
index 0000000000000000000000000000000000000000..cc45ecf76a7762f8380ad9b1cc22db01b029d9d2
--- /dev/null
+++ b/pkg/fasta/test/expressions.dart.direct.expect
@@ -0,0 +1,79 @@
+library;
+import self as self;
+import "dart:core" as core;
+
+static method foo({dynamic fisk = null}) → dynamic {
+ core::print(fisk);
+}
+static method caller(dynamic f) → dynamic {
+ f.call();
+}
+static method main() → dynamic {
+ core::int i = 0;
+ core::print(i.==(1) ? "bad" : "good");
+ core::print("${i}");
+ core::print("'${i}'");
+ core::print(" '${i}' ");
+ core::print(" '${i}' '${i}'");
+ core::print(" '${i}' '${i}'");
+ core::print("foobar");
+ core::print(" '${i}' '${i}' '${i}' '${i}'");
+ try {
+ throw "fisk";
+ }
+ on core::String catch(dynamic e, dynamic s) {
+ core::print(e);
+ if(!s.==(null))
+ core::print(s);
+ }
+ for (; false; ) {
+ }
+ dynamic list = <dynamic>["Hello, World!"];
+ core::print(list.[](i));
+ list.[]=(i, "Hello, Brave New World!");
+ core::print(list.[](i));
+ i = 87;
+ core::print(i.unary-());
+ core::print(i.~());
+ core::print(!i.==(42));
+ core::print(i = i.-(1));
+ core::print(i = i.+(1));
+ core::print(let final dynamic #t1 = i in let final dynamic #t2 = i = #t1.-(1) in #t1);
+ core::print(let final dynamic #t3 = i in let final dynamic #t4 = i = #t3.+(1) in #t3);
+ core::print(new core::Object::•());
+ core::print(const core::Object::•());
+ core::print(core::List::•<core::String>(2).runtimeType);
+ self::foo(fisk: "Blorp gulp");
+ function f() → dynamic {
+ core::print("f was called");
+ }
+ self::caller(f);
+ self::caller(() → dynamic {
+ core::print("<anon> was called");
+ });
+ function g([dynamic message]) → dynamic {
+ core::print(message);
+ }
+ g.call("Hello, World");
+ self::caller(([dynamic x]) → dynamic {
+ core::print("<anon> was called with ${x}");
+ });
+ function h({dynamic message}) → dynamic {
+ core::print(message);
+ }
+ h.call(message: "Hello, World");
+ self::caller(({dynamic x}) → dynamic {
+ core::print("<anon> was called with ${x}");
+ });
+ core::print(core::int.toString());
+ core::print(core::int);
+ core::print(let final dynamic #t5 = core::int in let final dynamic #t6 = #t5.toString() in #t5);
+ try {
+ core::print(throw new core::NoSuchMethodError::•(null, #toString, <dynamic>[], <dynamic, dynamic>{}, null));
+ throw "Shouldn't work";
+ }
+ on core::NoSuchMethodError catch(dynamic e) {
+ core::print("As expected: ${e}");
+ }
+ core::print(core::int::parse("42", radix: null, onError: null));
+}
« no previous file with comments | « pkg/fasta/test/expressions.dart.dartk.expect ('k') | pkg/fasta/test/expressions.dart.outline.expect » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698