OLD | NEW |
1 // Copyright (c) 2014 the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014 the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 import "dart:math" show pow; | 5 import "dart:math" show pow; |
6 import "package:expect/expect.dart"; | 6 import "package:expect/expect.dart"; |
7 | 7 |
8 const whiteSpace = const [ | 8 const whiteSpace = const [ |
9 "", | 9 "", |
10 "\x09", | 10 "\x09", |
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 "3510683981213305753930195236150796396072131289203909993689090575" | 361 "3510683981213305753930195236150796396072131289203909993689090575" |
362 "7124857594163109741741122991442081904408213007753523232190960930" | 362 "7124857594163109741741122991442081904408213007753523232190960930" |
363 "9708605846963343899964245834023664974967551244071942532661392196" | 363 "9708605846963343899964245834023664974967551244071942532661392196" |
364 "3541055085860917957996114367548718018836313960618292137056282677" | 364 "3541055085860917957996114367548718018836313960618292137056282677" |
365 "9743100947475774264558575685795655526362209377553343136273048244" | 365 "9743100947475774264558575685795655526362209377553343136273048244" |
366 "3047584810573390849764671399003076293019258118491937701241384968" | 366 "3047584810573390849764671399003076293019258118491937701241384968" |
367 "6287194322792594125093461156712312786426466050409407761509897584" | 367 "6287194322792594125093461156712312786426466050409407761509897584" |
368 "8136843040991207538774075715754306035963544889052606784864342758" | 368 "8136843040991207538774075715754306035963544889052606784864342758" |
369 "900428165258489343614201061427593231201171875", | 369 "900428165258489343614201061427593231201171875", |
370 5e-324); | 370 5e-324); |
| 371 testParse("0.00000000000000000000000000000000000000000000000000000000000000" /
// 02: ok |
| 372 "0000000000000000000000000000000000000000000000000000000000000000" /
// 02: ok |
| 373 "0000000000000000000000000000000000000000000000000000000000000000" /
// 02: ok |
| 374 "0000000000000000000000000000000000000000000000000000000000000000" /
// 02: ok |
| 375 "0000000000000000000000000000000000000000000000000000000000000000" /
// 02: ok |
| 376 "0000074109846876186981626485318930233205854758970392148714663837" /
// 02: ok |
| 377 "8523751013260905313127797949754542453988569694847043168576596389" /
// 02: ok |
| 378 "9850655339096945981621940161728171894510697854671067917687257517" /
// 02: ok |
| 379 "7347315553307795408549809608457500958111373034747658096871009590" /
// 02: ok |
| 380 "9754422710047573078097111189357848386756539987835030152280559340" /
// 02: ok |
| 381 "4659373979179073872386829939581848166016912201945649993128979841" /
// 02: ok |
| 382 "1362062484498678713572180352209017023903285791732520220528974020" /
// 02: ok |
| 383 "8029068540216066123755499834026713000358124864790413857434018755" /
// 02: ok |
| 384 "2090159017259254714629617513415977493871857473787096164563890871" /
// 02: ok |
| 385 "8119841271673056017045493004705269590165763776884908267986972573" /
// 02: ok |
| 386 "3665217655679410725087643375608460039849049721491174630855395563" /
// 02: ok |
| 387 "54188641513168478436313080237596295773983001708984375", /
// 02: ok |
| 388 1e-323); /
// 02: ok |
371 testParse("0.00000000000000000000000000000000000000000000000000000000000000" | 389 testParse("0.00000000000000000000000000000000000000000000000000000000000000" |
372 "0000000000000000000000000000000000000000000000000000000000000000" | 390 "0000000000000000000000000000000000000000000000000000000000000000" |
373 "0000000000000000000000000000000000000000000000000000000000000000" | 391 "0000000000000000000000000000000000000000000000000000000000000000" |
374 "0000000000000000000000000000000000000000000000000000000000000000" | |
375 "0000000000000000000000000000000000000000000000000000000000000000" | |
376 "0000074109846876186981626485318930233205854758970392148714663837" | |
377 "8523751013260905313127797949754542453988569694847043168576596389" | |
378 "9850655339096945981621940161728171894510697854671067917687257517" | |
379 "7347315553307795408549809608457500958111373034747658096871009590" | |
380 "9754422710047573078097111189357848386756539987835030152280559340" | |
381 "4659373979179073872386829939581848166016912201945649993128979841" | |
382 "1362062484498678713572180352209017023903285791732520220528974020" | |
383 "8029068540216066123755499834026713000358124864790413857434018755" | |
384 "2090159017259254714629617513415977493871857473787096164563890871" | |
385 "8119841271673056017045493004705269590165763776884908267986972573" | |
386 "3665217655679410725087643375608460039849049721491174630855395563" | |
387 "54188641513168478436313080237596295773983001708984375", | |
388 1e-323); | |
389 testParse("0.00000000000000000000000000000000000000000000000000000000000000" | |
390 "0000000000000000000000000000000000000000000000000000000000000000" | |
391 "0000000000000000000000000000000000000000000000000000000000000000" | |
392 "0000000000000000000000000000000000000000000000000000000000000000" | 392 "0000000000000000000000000000000000000000000000000000000000000000" |
393 "0000000000000000000000000000000000000000000000000000000000000000" | 393 "0000000000000000000000000000000000000000000000000000000000000000" |
394 "0000074109846876186981626485318930233205873343654412044724850344" | 394 "0000074109846876186981626485318930233205873343654412044724850344" |
395 "8923718677971811461747287833219166123210675953743507352131000861" | 395 "8923718677971811461747287833219166123210675953743507352131000861" |
396 "5508029119022396648780866584046796426383292609958261304514284249" | 396 "5508029119022396648780866584046796426383292609958261304514284249" |
397 "6061610746879932829188941791435548141415672575056325503240888674" | 397 "6061610746879932829188941791435548141415672575056325503240888674" |
398 "0040403932604439422384254107243478095284614859960753370503720954" | 398 "0040403932604439422384254107243478095284614859960753370503720954" |
399 "5808063977144841990843464643012899935961693114687389992568869106" | 399 "5808063977144841990843464643012899935961693114687389992568869106" |
400 "5599267374834247685403237712975952143398358575711517208866987110" | 400 "5599267374834247685403237712975952143398358575711517208866987110" |
401 "6349531233468788347546753834029761025748698485508885182206645314" | 401 "6349531233468788347546753834029761025748698485508885182206645314" |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
553 "7603909548902984778890775141579626656034298049775671944433069073" | 553 "7603909548902984778890775141579626656034298049775671944433069073" |
554 "7604422038743259373816676164757751587582092333404991820293327212" | 554 "7604422038743259373816676164757751587582092333404991820293327212" |
555 "5599348679138779961378564655046088380671358199810473933506318818" | 555 "5599348679138779961378564655046088380671358199810473933506318818" |
556 "4091175893098026050831945120249489444259897725127807943670177161" | 556 "4091175893098026050831945120249489444259897725127807943670177161" |
557 "6228469603642478614007734439187597872666848076451986069255795298" | 557 "6228469603642478614007734439187597872666848076451986069255795298" |
558 "8732132513641624634115870738160721633511566723954250399605642781" | 558 "8732132513641624634115870738160721633511566723954250399605642781" |
559 "1287194322792594125093461156712312786426466050409407761509897584" | 559 "1287194322792594125093461156712312786426466050409407761509897584" |
560 "8136843040991207538774075715754306035963544889052606784864342758" | 560 "8136843040991207538774075715754306035963544889052606784864342758" |
561 "900428165258489343614201061427593231201171875", | 561 "900428165258489343614201061427593231201171875", |
562 1.112536929253601e-308); | 562 1.112536929253601e-308); |
| 563 testParse("0.00000000000000000000000000000000000000000000000000000000000000" /
// 02: ok |
| 564 "0000000000000000000000000000000000000000000000000000000000000000" /
// 02: ok |
| 565 "0000000000000000000000000000000000000000000000000000000000000000" /
// 02: ok |
| 566 "0000000000000000000000000000000000000000000000000000000000000000" /
// 02: ok |
| 567 "0000000000000000000000000000000000000000000000000000011125369292" /
// 02: ok |
| 568 "5360143264358512053601829696279729256322446286636762993074885578" /
// 02: ok |
| 569 "5482848940402484819383308231788212319506475197423260249353326444" /
// 02: ok |
| 570 "4130717265985540087275830129388183546908748591883986098046865342" /
// 02: ok |
| 571 "9694440740018214171090142139290408905547397593746087678853434622" /
// 02: ok |
| 572 "7708807769200010477987555066232823112546765790360487852208850575" /
// 02: ok |
| 573 "8752599546868752897347409845010678425979078962517411943872958339" /
// 02: ok |
| 574 "1841626929078828345647733525524686707077165117383988808631340302" /
// 02: ok |
| 575 "3919811372391502185169818655049136406061931820528945258278945377" /
// 02: ok |
| 576 "2640279824496362807465448266116748919295441238296611971177785355" /
// 02: ok |
| 577 "4605209927839760366494651758097211936470402475783551200969719627" /
// 02: ok |
| 578 "9349765358747644509438842714766105380341358326953487329219653376" /
// 02: ok |
| 579 "04188641513168478436313080237596295773983001708984375", /
// 02: ok |
| 580 1.1125369292536017e-308); /
// 02: ok |
563 testParse("0.00000000000000000000000000000000000000000000000000000000000000" | 581 testParse("0.00000000000000000000000000000000000000000000000000000000000000" |
564 "0000000000000000000000000000000000000000000000000000000000000000" | 582 "0000000000000000000000000000000000000000000000000000000000000000" |
565 "0000000000000000000000000000000000000000000000000000000000000000" | 583 "0000000000000000000000000000000000000000000000000000000000000000" |
566 "0000000000000000000000000000000000000000000000000000000000000000" | |
567 "0000000000000000000000000000000000000000000000000000011125369292" | |
568 "5360143264358512053601829696279729256322446286636762993074885578" | |
569 "5482848940402484819383308231788212319506475197423260249353326444" | |
570 "4130717265985540087275830129388183546908748591883986098046865342" | |
571 "9694440740018214171090142139290408905547397593746087678853434622" | |
572 "7708807769200010477987555066232823112546765790360487852208850575" | |
573 "8752599546868752897347409845010678425979078962517411943872958339" | |
574 "1841626929078828345647733525524686707077165117383988808631340302" | |
575 "3919811372391502185169818655049136406061931820528945258278945377" | |
576 "2640279824496362807465448266116748919295441238296611971177785355" | |
577 "4605209927839760366494651758097211936470402475783551200969719627" | |
578 "9349765358747644509438842714766105380341358326953487329219653376" | |
579 "04188641513168478436313080237596295773983001708984375", | |
580 1.1125369292536017e-308); | |
581 testParse("0.00000000000000000000000000000000000000000000000000000000000000" | |
582 "0000000000000000000000000000000000000000000000000000000000000000" | |
583 "0000000000000000000000000000000000000000000000000000000000000000" | |
584 "0000000000000000000000000000000000000000000000000000000000000000" | 584 "0000000000000000000000000000000000000000000000000000000000000000" |
585 "0000000000000000000000000000000000000000000000000000011125369292" | 585 "0000000000000000000000000000000000000000000000000000011125369292" |
586 "5360143264358512053601829696279729256322464871320782889085072085" | 586 "5360143264358512053601829696279729256322464871320782889085072085" |
587 "5882816605113390968002798115252835988728581456319724432907730915" | 587 "5882816605113390968002798115252835988728581456319724432907730915" |
588 "9788091045910990754434756551706808078781343347171179484873892074" | 588 "9788091045910990754434756551706808078781343347171179484873892074" |
589 "8408735933590351591729274322268456088851697134054755085223313705" | 589 "8408735933590351591729274322268456088851697134054755085223313705" |
590 "7994788991756876822274697984118452821074840662486211070432012189" | 590 "7994788991756876822274697984118452821074840662486211070432012189" |
591 "9901289544834521015804044548441730195923859875259151943312847604" | 591 "9901289544834521015804044548441730195923859875259151943312847604" |
592 "6078831819414397317478790886291621826572237901362985796969353392" | 592 "6078831819414397317478790886291621826572237901362985796969353392" |
593 "2240274065644224408961072655052184431452505441247416583051571936" | 593 "2240274065644224408961072655052184431452505441247416583051571936" |
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1149 testFail("INFINITY"); | 1149 testFail("INFINITY"); |
1150 testFail("1.#INF"); | 1150 testFail("1.#INF"); |
1151 testFail("inf"); | 1151 testFail("inf"); |
1152 testFail("nan"); | 1152 testFail("nan"); |
1153 testFail("NAN"); | 1153 testFail("NAN"); |
1154 testFail("1.#IND"); | 1154 testFail("1.#IND"); |
1155 testFail("indef"); | 1155 testFail("indef"); |
1156 testFail("qnan"); | 1156 testFail("qnan"); |
1157 testFail("snan"); | 1157 testFail("snan"); |
1158 } | 1158 } |
OLD | NEW |