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

Side by Side Diff: test/codegen/expect/language/full_stacktrace2_test.js

Issue 2128353002: Check in codegen test expectations. (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 5 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
OLDNEW
(Empty)
1 dart_library.library('language/full_stacktrace2_test', null, /* Imports */[
2 'dart_sdk',
3 'expect'
4 ], function load__full_stacktrace2_test(exports, dart_sdk, expect) {
5 'use strict';
6 const core = dart_sdk.core;
7 const dart = dart_sdk.dart;
8 const dartx = dart_sdk.dartx;
9 const expect$ = expect.expect;
10 const full_stacktrace2_test = Object.create(null);
11 let VoidTovoid = () => (VoidTovoid = dart.constFn(dart.definiteFunctionType(da rt.void, [])))();
12 let VoidToint = () => (VoidToint = dart.constFn(dart.definiteFunctionType(core .int, [])))();
13 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT ype(dart.dynamic, [])))();
14 full_stacktrace2_test.func1 = function() {
15 dart.throw(core.Exception.new("Test full stacktrace"));
16 };
17 dart.fn(full_stacktrace2_test.func1, VoidTovoid());
18 full_stacktrace2_test.func2 = function() {
19 full_stacktrace2_test.func1();
20 };
21 dart.fn(full_stacktrace2_test.func2, VoidTovoid());
22 full_stacktrace2_test.func3 = function() {
23 try {
24 full_stacktrace2_test.func2();
25 } catch (e) {
26 if (core.Object.is(e)) {
27 let s = dart.stackTrace(e);
28 let fullTrace = s.toString();
29 expect$.Expect.isTrue(fullTrace[dartx.contains]("func1"));
30 expect$.Expect.isTrue(fullTrace[dartx.contains]("func2"));
31 expect$.Expect.isTrue(fullTrace[dartx.contains]("func3"));
32 expect$.Expect.isTrue(fullTrace[dartx.contains]("func4"));
33 expect$.Expect.isTrue(fullTrace[dartx.contains]("func5"));
34 expect$.Expect.isTrue(fullTrace[dartx.contains]("func6"));
35 expect$.Expect.isTrue(fullTrace[dartx.contains]("func7"));
36 expect$.Expect.isTrue(fullTrace[dartx.contains]("main"));
37 throw e;
38 } else
39 throw e;
40 }
41
42 };
43 dart.fn(full_stacktrace2_test.func3, VoidTovoid());
44 full_stacktrace2_test.func4 = function() {
45 full_stacktrace2_test.func3();
46 return 1;
47 };
48 dart.fn(full_stacktrace2_test.func4, VoidToint());
49 full_stacktrace2_test.func5 = function() {
50 try {
51 full_stacktrace2_test.func4();
52 } catch (e) {
53 if (core.Object.is(e)) {
54 let s = dart.stackTrace(e);
55 let fullTrace = s.toString();
56 expect$.Expect.isTrue(fullTrace[dartx.contains]("func1"));
57 expect$.Expect.isTrue(fullTrace[dartx.contains]("func2"));
58 expect$.Expect.isTrue(fullTrace[dartx.contains]("func3"));
59 expect$.Expect.isTrue(fullTrace[dartx.contains]("func4"));
60 expect$.Expect.isTrue(fullTrace[dartx.contains]("func5"));
61 expect$.Expect.isTrue(fullTrace[dartx.contains]("func6"));
62 expect$.Expect.isTrue(fullTrace[dartx.contains]("func7"));
63 expect$.Expect.isTrue(fullTrace[dartx.contains]("main"));
64 } else
65 throw e;
66 }
67
68 return 1;
69 };
70 dart.fn(full_stacktrace2_test.func5, VoidToint());
71 full_stacktrace2_test.func6 = function() {
72 full_stacktrace2_test.func5();
73 return 1;
74 };
75 dart.fn(full_stacktrace2_test.func6, VoidToint());
76 full_stacktrace2_test.func7 = function() {
77 full_stacktrace2_test.func6();
78 return 1;
79 };
80 dart.fn(full_stacktrace2_test.func7, VoidToint());
81 full_stacktrace2_test.main = function() {
82 let i = full_stacktrace2_test.func7();
83 expect$.Expect.equals(1, i);
84 };
85 dart.fn(full_stacktrace2_test.main, VoidTodynamic());
86 // Exports:
87 exports.full_stacktrace2_test = full_stacktrace2_test;
88 });
OLDNEW
« no previous file with comments | « test/codegen/expect/language/full_stacktrace1_test.js ('k') | test/codegen/expect/language/full_stacktrace3_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698