OLD | NEW |
(Empty) | |
| 1 dart_library.library('language/strict_equal_test', null, /* Imports */[ |
| 2 'dart_sdk', |
| 3 'expect' |
| 4 ], function load__strict_equal_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 strict_equal_test = Object.create(null); |
| 11 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT
ype(dart.dynamic, [])))(); |
| 12 let dynamicTodynamic = () => (dynamicTodynamic = dart.constFn(dart.definiteFun
ctionType(dart.dynamic, [dart.dynamic])))(); |
| 13 strict_equal_test.main = function() { |
| 14 for (let i = 0; i < 20; i++) { |
| 15 expect$.Expect.isFalse(strict_equal_test.test1(5)); |
| 16 expect$.Expect.isTrue(strict_equal_test.test1(3)); |
| 17 expect$.Expect.isTrue(strict_equal_test.test2(5)); |
| 18 expect$.Expect.isFalse(strict_equal_test.test2(3)); |
| 19 expect$.Expect.isTrue(strict_equal_test.test2r(5)); |
| 20 expect$.Expect.isFalse(strict_equal_test.test2r(3)); |
| 21 expect$.Expect.isTrue(strict_equal_test.test3()); |
| 22 expect$.Expect.equals(2, strict_equal_test.test4(5)); |
| 23 expect$.Expect.equals(1, strict_equal_test.test4(3)); |
| 24 expect$.Expect.equals(1, strict_equal_test.test5(5)); |
| 25 expect$.Expect.equals(2, strict_equal_test.test5(3)); |
| 26 expect$.Expect.equals(1, strict_equal_test.test6()); |
| 27 expect$.Expect.isFalse(strict_equal_test.test7()); |
| 28 expect$.Expect.equals(2, strict_equal_test.test8()); |
| 29 expect$.Expect.isFalse(strict_equal_test.test9(2)); |
| 30 expect$.Expect.isFalse(strict_equal_test.test9r(2)); |
| 31 expect$.Expect.isTrue(strict_equal_test.test9(0)); |
| 32 expect$.Expect.isTrue(strict_equal_test.test9r(0)); |
| 33 expect$.Expect.isFalse(strict_equal_test.test10(0)); |
| 34 expect$.Expect.isFalse(strict_equal_test.test10r(0)); |
| 35 expect$.Expect.isTrue(strict_equal_test.test10(2)); |
| 36 expect$.Expect.isTrue(strict_equal_test.test10r(2)); |
| 37 strict_equal_test.test11(i); |
| 38 } |
| 39 }; |
| 40 dart.fn(strict_equal_test.main, VoidTodynamic()); |
| 41 strict_equal_test.test1 = function(a) { |
| 42 return core.identical(a, 3); |
| 43 }; |
| 44 dart.fn(strict_equal_test.test1, dynamicTodynamic()); |
| 45 strict_equal_test.test2 = function(a) { |
| 46 return !core.identical(a, 3); |
| 47 }; |
| 48 dart.fn(strict_equal_test.test2, dynamicTodynamic()); |
| 49 strict_equal_test.test2r = function(a) { |
| 50 return !core.identical(3, a); |
| 51 }; |
| 52 dart.fn(strict_equal_test.test2r, dynamicTodynamic()); |
| 53 strict_equal_test.test3 = function() { |
| 54 return core.identical(strict_equal_test.get5(), 5); |
| 55 }; |
| 56 dart.fn(strict_equal_test.test3, VoidTodynamic()); |
| 57 strict_equal_test.test4 = function(a) { |
| 58 if (core.identical(a, 3)) { |
| 59 return 1; |
| 60 } else { |
| 61 return 2; |
| 62 } |
| 63 }; |
| 64 dart.fn(strict_equal_test.test4, dynamicTodynamic()); |
| 65 strict_equal_test.test5 = function(a) { |
| 66 if (!core.identical(a, 3)) { |
| 67 return 1; |
| 68 } else { |
| 69 return 2; |
| 70 } |
| 71 }; |
| 72 dart.fn(strict_equal_test.test5, dynamicTodynamic()); |
| 73 strict_equal_test.test6 = function() { |
| 74 if (core.identical(strict_equal_test.get5(), 5)) { |
| 75 return 1; |
| 76 } else { |
| 77 return 2; |
| 78 } |
| 79 }; |
| 80 dart.fn(strict_equal_test.test6, VoidTodynamic()); |
| 81 strict_equal_test.get5 = function() { |
| 82 return 5; |
| 83 }; |
| 84 dart.fn(strict_equal_test.get5, VoidTodynamic()); |
| 85 strict_equal_test.test7 = function() { |
| 86 return null != null; |
| 87 }; |
| 88 dart.fn(strict_equal_test.test7, VoidTodynamic()); |
| 89 strict_equal_test.test8 = function() { |
| 90 if (null != null) { |
| 91 return 1; |
| 92 } else { |
| 93 return 2; |
| 94 } |
| 95 }; |
| 96 dart.fn(strict_equal_test.test8, VoidTodynamic()); |
| 97 strict_equal_test.test9 = function(a) { |
| 98 return core.identical(a, 0); |
| 99 }; |
| 100 dart.fn(strict_equal_test.test9, dynamicTodynamic()); |
| 101 strict_equal_test.test9r = function(a) { |
| 102 return core.identical(0, a); |
| 103 }; |
| 104 dart.fn(strict_equal_test.test9r, dynamicTodynamic()); |
| 105 strict_equal_test.test10 = function(a) { |
| 106 return !core.identical(a, 0); |
| 107 }; |
| 108 dart.fn(strict_equal_test.test10, dynamicTodynamic()); |
| 109 strict_equal_test.test10r = function(a) { |
| 110 return !core.identical(0, a); |
| 111 }; |
| 112 dart.fn(strict_equal_test.test10r, dynamicTodynamic()); |
| 113 strict_equal_test.test11 = function(a) { |
| 114 if (core.identical(a, 0)) { |
| 115 expect$.Expect.isTrue(core.identical(0, a)); |
| 116 expect$.Expect.isFalse(!core.identical(a, 0)); |
| 117 expect$.Expect.isFalse(!core.identical(0, a)); |
| 118 } else { |
| 119 expect$.Expect.isFalse(core.identical(0, a)); |
| 120 expect$.Expect.isTrue(!core.identical(a, 0)); |
| 121 expect$.Expect.isTrue(!core.identical(0, a)); |
| 122 } |
| 123 }; |
| 124 dart.fn(strict_equal_test.test11, dynamicTodynamic()); |
| 125 // Exports: |
| 126 exports.strict_equal_test = strict_equal_test; |
| 127 }); |
OLD | NEW |