OLD | NEW |
(Empty) | |
| 1 dart_library.library('language/static_field_test_none_multi', null, /* Imports *
/[ |
| 2 'dart_sdk', |
| 3 'expect' |
| 4 ], function load__static_field_test_none_multi(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 static_field_test_none_multi = Object.create(null); |
| 11 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT
ype(dart.dynamic, [])))(); |
| 12 static_field_test_none_multi.First = class First extends core.Object { |
| 13 new() { |
| 14 } |
| 15 static setValues() { |
| 16 static_field_test_none_multi.First.a = 24; |
| 17 static_field_test_none_multi.First.b = 10; |
| 18 return dart.dsend(dart.dsend(static_field_test_none_multi.First.a, '+', st
atic_field_test_none_multi.First.b), '+', static_field_test_none_multi.First.c); |
| 19 } |
| 20 }; |
| 21 dart.setSignature(static_field_test_none_multi.First, { |
| 22 constructors: () => ({new: dart.definiteFunctionType(static_field_test_none_
multi.First, [])}), |
| 23 statics: () => ({setValues: dart.definiteFunctionType(dart.dynamic, [])}), |
| 24 names: ['setValues'] |
| 25 }); |
| 26 static_field_test_none_multi.First.a = null; |
| 27 static_field_test_none_multi.First.b = null; |
| 28 static_field_test_none_multi.First.c = 1; |
| 29 static_field_test_none_multi.InitializerTest = class InitializerTest extends c
ore.Object { |
| 30 static checkValueOfThree() { |
| 31 expect$.Expect.equals(3, static_field_test_none_multi.InitializerTest.thre
e); |
| 32 } |
| 33 static testStaticFieldInitialization() { |
| 34 expect$.Expect.equals(null, static_field_test_none_multi.InitializerTest.o
ne); |
| 35 expect$.Expect.equals(2, static_field_test_none_multi.InitializerTest.two)
; |
| 36 static_field_test_none_multi.InitializerTest.one = 11; |
| 37 static_field_test_none_multi.InitializerTest.two = 22; |
| 38 expect$.Expect.equals(11, static_field_test_none_multi.InitializerTest.one
); |
| 39 expect$.Expect.equals(22, static_field_test_none_multi.InitializerTest.two
); |
| 40 static_field_test_none_multi.InitializerTest.three = dart.notNull(static_f
ield_test_none_multi.InitializerTest.three) + 1; |
| 41 static_field_test_none_multi.InitializerTest.checkValueOfThree(); |
| 42 } |
| 43 }; |
| 44 dart.setSignature(static_field_test_none_multi.InitializerTest, { |
| 45 statics: () => ({ |
| 46 checkValueOfThree: dart.definiteFunctionType(dart.dynamic, []), |
| 47 testStaticFieldInitialization: dart.definiteFunctionType(dart.void, []) |
| 48 }), |
| 49 names: ['checkValueOfThree', 'testStaticFieldInitialization'] |
| 50 }); |
| 51 static_field_test_none_multi.InitializerTest.one = null; |
| 52 static_field_test_none_multi.InitializerTest.two = 2; |
| 53 static_field_test_none_multi.InitializerTest.three = 2; |
| 54 static_field_test_none_multi.StaticFieldTest = class StaticFieldTest extends c
ore.Object { |
| 55 static testMain() { |
| 56 static_field_test_none_multi.First.a = 3; |
| 57 static_field_test_none_multi.First.b = static_field_test_none_multi.First.
a; |
| 58 expect$.Expect.equals(3, static_field_test_none_multi.First.a); |
| 59 expect$.Expect.equals(static_field_test_none_multi.First.a, static_field_t
est_none_multi.First.b); |
| 60 static_field_test_none_multi.First.b = static_field_test_none_multi.First.
a = 10; |
| 61 expect$.Expect.equals(10, static_field_test_none_multi.First.a); |
| 62 expect$.Expect.equals(10, static_field_test_none_multi.First.b); |
| 63 static_field_test_none_multi.First.b = static_field_test_none_multi.First.
a = 15; |
| 64 expect$.Expect.equals(15, static_field_test_none_multi.First.a); |
| 65 expect$.Expect.equals(15, static_field_test_none_multi.First.b); |
| 66 expect$.Expect.equals(35, static_field_test_none_multi.First.setValues()); |
| 67 expect$.Expect.equals(24, static_field_test_none_multi.First.a); |
| 68 expect$.Expect.equals(10, static_field_test_none_multi.First.b); |
| 69 } |
| 70 }; |
| 71 dart.setSignature(static_field_test_none_multi.StaticFieldTest, { |
| 72 statics: () => ({testMain: dart.definiteFunctionType(dart.dynamic, [])}), |
| 73 names: ['testMain'] |
| 74 }); |
| 75 static_field_test_none_multi.StaticField1RunNegativeTest = class StaticField1R
unNegativeTest extends core.Object { |
| 76 new() { |
| 77 this.x = null; |
| 78 } |
| 79 testMain() { |
| 80 let foo = new static_field_test_none_multi.StaticField1RunNegativeTest(); |
| 81 core.print(this.x); |
| 82 let result = foo.x; |
| 83 } |
| 84 }; |
| 85 dart.setSignature(static_field_test_none_multi.StaticField1RunNegativeTest, { |
| 86 methods: () => ({testMain: dart.definiteFunctionType(dart.dynamic, [])}) |
| 87 }); |
| 88 static_field_test_none_multi.StaticField1aRunNegativeTest = class StaticField1
aRunNegativeTest extends core.Object { |
| 89 m() {} |
| 90 testMain() { |
| 91 let foo = new static_field_test_none_multi.StaticField1aRunNegativeTest(); |
| 92 core.print(dart.bind(this, 'm')); |
| 93 let result = dart.bind(foo, 'm'); |
| 94 } |
| 95 }; |
| 96 dart.setSignature(static_field_test_none_multi.StaticField1aRunNegativeTest, { |
| 97 methods: () => ({ |
| 98 m: dart.definiteFunctionType(dart.void, []), |
| 99 testMain: dart.definiteFunctionType(dart.dynamic, []) |
| 100 }) |
| 101 }); |
| 102 static_field_test_none_multi.StaticField2RunNegativeTest = class StaticField2R
unNegativeTest extends core.Object { |
| 103 new() { |
| 104 this.x = null; |
| 105 } |
| 106 testMain() { |
| 107 let foo = new static_field_test_none_multi.StaticField2RunNegativeTest(); |
| 108 core.print(this.x); |
| 109 foo.x = 1; |
| 110 } |
| 111 }; |
| 112 dart.setSignature(static_field_test_none_multi.StaticField2RunNegativeTest, { |
| 113 methods: () => ({testMain: dart.definiteFunctionType(dart.dynamic, [])}) |
| 114 }); |
| 115 static_field_test_none_multi.StaticField2aRunNegativeTest = class StaticField2
aRunNegativeTest extends core.Object { |
| 116 m() {} |
| 117 testMain() { |
| 118 let foo = new static_field_test_none_multi.StaticField2aRunNegativeTest(); |
| 119 core.print(dart.bind(this, 'm')); |
| 120 } |
| 121 }; |
| 122 dart.setSignature(static_field_test_none_multi.StaticField2aRunNegativeTest, { |
| 123 methods: () => ({ |
| 124 m: dart.definiteFunctionType(dart.void, []), |
| 125 testMain: dart.definiteFunctionType(dart.dynamic, []) |
| 126 }) |
| 127 }); |
| 128 static_field_test_none_multi.main = function() { |
| 129 static_field_test_none_multi.StaticFieldTest.testMain(); |
| 130 static_field_test_none_multi.InitializerTest.testStaticFieldInitialization()
; |
| 131 new static_field_test_none_multi.StaticField1RunNegativeTest().testMain(); |
| 132 new static_field_test_none_multi.StaticField1aRunNegativeTest().testMain(); |
| 133 new static_field_test_none_multi.StaticField2RunNegativeTest().testMain(); |
| 134 new static_field_test_none_multi.StaticField2aRunNegativeTest().testMain(); |
| 135 }; |
| 136 dart.fn(static_field_test_none_multi.main, VoidTodynamic()); |
| 137 // Exports: |
| 138 exports.static_field_test_none_multi = static_field_test_none_multi; |
| 139 }); |
OLD | NEW |