OLD | NEW |
(Empty) | |
| 1 dart_library.library('corelib/regexp/stack-overflow2_test', null, /* Imports */[ |
| 2 'dart_sdk', |
| 3 'expect' |
| 4 ], function load__stack$45overflow2_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 stack$45overflow2_test = Object.create(null); |
| 11 const v8_regexp_utils = Object.create(null); |
| 12 let VoidTovoid = () => (VoidTovoid = dart.constFn(dart.functionType(dart.void,
[])))(); |
| 13 let ListOfString = () => (ListOfString = dart.constFn(core.List$(core.String))
)(); |
| 14 let VoidTovoid$ = () => (VoidTovoid$ = dart.constFn(dart.definiteFunctionType(
dart.void, [])))(); |
| 15 let dynamicAnddynamic__Tovoid = () => (dynamicAnddynamic__Tovoid = dart.constF
n(dart.definiteFunctionType(dart.void, [dart.dynamic, dart.dynamic], [core.Strin
g])))(); |
| 16 let dynamic__Tovoid = () => (dynamic__Tovoid = dart.constFn(dart.definiteFunct
ionType(dart.void, [dart.dynamic], [core.String])))(); |
| 17 let dynamic__Tovoid$ = () => (dynamic__Tovoid$ = dart.constFn(dart.definiteFun
ctionType(dart.void, [dart.dynamic], [core.num])))(); |
| 18 let dynamicAnddynamicAndnumTovoid = () => (dynamicAnddynamicAndnumTovoid = dar
t.constFn(dart.definiteFunctionType(dart.void, [dart.dynamic, dart.dynamic, core
.num])))(); |
| 19 let dynamicTovoid = () => (dynamicTovoid = dart.constFn(dart.definiteFunctionT
ype(dart.void, [dart.dynamic])))(); |
| 20 let StringAndRegExpToMatch = () => (StringAndRegExpToMatch = dart.constFn(dart
.definiteFunctionType(core.Match, [core.String, core.RegExp])))(); |
| 21 let MatchToString = () => (MatchToString = dart.constFn(dart.definiteFunctionT
ype(core.String, [core.Match])))(); |
| 22 let StringAndRegExpToListOfString = () => (StringAndRegExpToListOfString = dar
t.constFn(dart.definiteFunctionType(ListOfString(), [core.String, core.RegExp]))
)(); |
| 23 stack$45overflow2_test.main = function() { |
| 24 let res149 = core.RegExp.new("(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(
\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(
?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s
|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(
\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(
?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s
|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(
\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(
?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s
|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(
\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(
?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s
|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(
\\d+(?:\\s|$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+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(
?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s
|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(
\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(
?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s
|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(
\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(
?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s
|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(
\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(
?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\w+)\\s+(
\\270)", {caseSensitive: false}); |
| 25 v8_regexp_utils.assertToStringEquals("1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 4
3 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 11
7 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 13
7 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 15
7 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 17
7 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 19
7 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 21
7 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 23
7 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 25
7 258 259 260 261 262 263 264 265 266 267 268 269 ABC ABC,1 ,2 ,3 ,4 ,5 ,6 ,7 ,8
,9 ,10 ,11 ,12 ,13 ,14 ,15 ,16 ,17 ,18 ,19 ,20 ,21 ,22 ,23 ,24 ,25 ,26 ,27 ,28
,29 ,30 ,31 ,32 ,33 ,34 ,35 ,36 ,37 ,38 ,39 ,40 ,41 ,42 ,43 ,44 ,45 ,46 ,47 ,48
,49 ,50 ,51 ,52 ,53 ,54 ,55 ,56 ,57 ,58 ,59 ,60 ,61 ,62 ,63 ,64 ,65 ,66 ,67 ,68
,69 ,70 ,71 ,72 ,73 ,74 ,75 ,76 ,77 ,78 ,79 ,80 ,81 ,82 ,83 ,84 ,85 ,86 ,87 ,88
,89 ,90 ,91 ,92 ,93 ,94 ,95 ,96 ,97 ,98 ,99 ,100 ,101 ,102 ,103 ,104 ,105 ,106 ,
107 ,108 ,109 ,110 ,111 ,112 ,113 ,114 ,115 ,116 ,117 ,118 ,119 ,120 ,121 ,122 ,
123 ,124 ,125 ,126 ,127 ,128 ,129 ,130 ,131 ,132 ,133 ,134 ,135 ,136 ,137 ,138 ,
139 ,140 ,141 ,142 ,143 ,144 ,145 ,146 ,147 ,148 ,149 ,150 ,151 ,152 ,153 ,154 ,
155 ,156 ,157 ,158 ,159 ,160 ,161 ,162 ,163 ,164 ,165 ,166 ,167 ,168 ,169 ,170 ,
171 ,172 ,173 ,174 ,175 ,176 ,177 ,178 ,179 ,180 ,181 ,182 ,183 ,184 ,185 ,186 ,
187 ,188 ,189 ,190 ,191 ,192 ,193 ,194 ,195 ,196 ,197 ,198 ,199 ,200 ,201 ,202 ,
203 ,204 ,205 ,206 ,207 ,208 ,209 ,210 ,211 ,212 ,213 ,214 ,215 ,216 ,217 ,218 ,
219 ,220 ,221 ,222 ,223 ,224 ,225 ,226 ,227 ,228 ,229 ,230 ,231 ,232 ,233 ,234 ,
235 ,236 ,237 ,238 ,239 ,240 ,241 ,242 ,243 ,244 ,245 ,246 ,247 ,248 ,249 ,250 ,
251 ,252 ,253 ,254 ,255 ,256 ,257 ,258 ,259 ,260 ,261 ,262 ,263 ,264 ,265 ,266 ,
267 ,268 ,269 ,ABC,ABC", res149.firstMatch("O900 1 2 3 4 5 6 7 8 9 10 11 12 13 1
4 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 9
4 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175
176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195
196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215
216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255
256 257 258 259 260 261 262 263 264 265 266 267 268 269 ABC ABC"), 242); |
| 26 }; |
| 27 dart.fn(stack$45overflow2_test.main, VoidTovoid$()); |
| 28 v8_regexp_utils.assertEquals = function(actual, expected, message) { |
| 29 if (message === void 0) message = null; |
| 30 expect$.Expect.equals(actual, expected, message); |
| 31 }; |
| 32 dart.fn(v8_regexp_utils.assertEquals, dynamicAnddynamic__Tovoid()); |
| 33 v8_regexp_utils.assertTrue = function(actual, message) { |
| 34 if (message === void 0) message = null; |
| 35 expect$.Expect.isTrue(actual, message); |
| 36 }; |
| 37 dart.fn(v8_regexp_utils.assertTrue, dynamic__Tovoid()); |
| 38 v8_regexp_utils.assertFalse = function(actual, message) { |
| 39 if (message === void 0) message = null; |
| 40 expect$.Expect.isFalse(actual, message); |
| 41 }; |
| 42 dart.fn(v8_regexp_utils.assertFalse, dynamic__Tovoid()); |
| 43 v8_regexp_utils.assertThrows = function(fn, testid) { |
| 44 if (testid === void 0) testid = null; |
| 45 expect$.Expect.throws(VoidTovoid()._check(fn), null, dart.str`Test ${testid}
`); |
| 46 }; |
| 47 dart.fn(v8_regexp_utils.assertThrows, dynamic__Tovoid$()); |
| 48 v8_regexp_utils.assertNull = function(actual, testid) { |
| 49 if (testid === void 0) testid = null; |
| 50 expect$.Expect.isNull(actual, dart.str`Test ${testid}`); |
| 51 }; |
| 52 dart.fn(v8_regexp_utils.assertNull, dynamic__Tovoid$()); |
| 53 v8_regexp_utils.assertToStringEquals = function(str, match, testid) { |
| 54 let actual = []; |
| 55 for (let i = 0; i <= dart.notNull(core.num._check(dart.dload(match, 'groupCo
unt'))); i++) { |
| 56 let g = dart.dsend(match, 'group', i); |
| 57 actual[dartx.add](g == null ? "" : g); |
| 58 } |
| 59 expect$.Expect.equals(str, actual[dartx.join](","), dart.str`Test ${testid}`
); |
| 60 }; |
| 61 dart.fn(v8_regexp_utils.assertToStringEquals, dynamicAnddynamicAndnumTovoid())
; |
| 62 v8_regexp_utils.shouldBeTrue = function(actual) { |
| 63 expect$.Expect.isTrue(actual); |
| 64 }; |
| 65 dart.fn(v8_regexp_utils.shouldBeTrue, dynamicTovoid()); |
| 66 v8_regexp_utils.shouldBeFalse = function(actual) { |
| 67 expect$.Expect.isFalse(actual); |
| 68 }; |
| 69 dart.fn(v8_regexp_utils.shouldBeFalse, dynamicTovoid()); |
| 70 v8_regexp_utils.shouldBeNull = function(actual) { |
| 71 expect$.Expect.isNull(actual); |
| 72 }; |
| 73 dart.fn(v8_regexp_utils.shouldBeNull, dynamicTovoid()); |
| 74 v8_regexp_utils.shouldBe = function(actual, expected, message) { |
| 75 if (message === void 0) message = null; |
| 76 if (expected == null) { |
| 77 expect$.Expect.isNull(actual, message); |
| 78 } else { |
| 79 expect$.Expect.equals(dart.dload(expected, 'length'), dart.dsend(dart.dloa
d(actual, 'groupCount'), '+', 1)); |
| 80 for (let i = 0; i <= dart.notNull(core.num._check(dart.dload(actual, 'grou
pCount'))); i++) { |
| 81 expect$.Expect.equals(dart.dindex(expected, i), dart.dsend(actual, 'grou
p', i), message); |
| 82 } |
| 83 } |
| 84 }; |
| 85 dart.fn(v8_regexp_utils.shouldBe, dynamicAnddynamic__Tovoid()); |
| 86 v8_regexp_utils.firstMatch = function(str, pattern) { |
| 87 return pattern.firstMatch(str); |
| 88 }; |
| 89 dart.fn(v8_regexp_utils.firstMatch, StringAndRegExpToMatch()); |
| 90 v8_regexp_utils.allStringMatches = function(str, pattern) { |
| 91 return pattern.allMatches(str)[dartx.map](core.String)(dart.fn(m => m.group(
0), MatchToString()))[dartx.toList](); |
| 92 }; |
| 93 dart.fn(v8_regexp_utils.allStringMatches, StringAndRegExpToListOfString()); |
| 94 v8_regexp_utils.description = function(str) { |
| 95 }; |
| 96 dart.fn(v8_regexp_utils.description, dynamicTovoid()); |
| 97 // Exports: |
| 98 exports.stack$45overflow2_test = stack$45overflow2_test; |
| 99 exports.v8_regexp_utils = v8_regexp_utils; |
| 100 }); |
OLD | NEW |