@@ -342,21 +342,27 @@ wishlist:
342
342
- product : A Cool Book.
343
343
quantity : 1
344
344
description : I love that Cool Book.
345
- aStringTatLooksLikeAFloat: 55,34
346
- aStringThatLooksLikeAnInt: 2018+
347
- scientificNotationInt: 1e+3
348
- scientificNotationBigInt: 1e+40
349
- intWithTag: !!int "42"
350
- zeroIntWithTag: !!int "0"
351
- zeroIntWithoutTag: 0
352
- scientificNotationIntWithTag: !!int "1e+3"
353
345
price : 55.34
354
346
total: 4443.52
355
347
int64: $ ( [int64 ]::MaxValue)
356
348
note: >
357
349
I can't wait.
358
350
To get that Cool Book.
359
351
352
+ intsAndDecimals:
353
+ aStringTatLooksLikeAFloat: 55,34
354
+ aStringThatLooksLikeAnInt: 2018+
355
+ scientificNotationInt: 1e+3
356
+ scientificNotationBigInt: 1e+40
357
+ intWithTag: !!int "42"
358
+ zeroIntWithTag: !!int "0"
359
+ zeroIntWithoutTag: 0
360
+ scientificNotationIntWithTag: !!int "1e+3"
361
+ aDecimalWithATag: !!float "3.9999999999999990"
362
+ aDecimalWithoutATag: 3.9999999999999990
363
+ decimalInfinity: !!float ".inf"
364
+ decimalNegativeInfinity: !!float "-.inf"
365
+
360
366
dates:
361
367
- !!timestamp 2001-12-15T02:59:43.1Z
362
368
- !!timestamp 2001-12-14t21:59:43.10-05:00
@@ -392,16 +398,22 @@ bools:
392
398
quantity = 1 ;
393
399
description = " I love that Cool Book." ;
394
400
price = 55.34 ;
395
- aStringTatLooksLikeAFloat = " 55,34"
401
+ }
402
+ );
403
+ intsAndDecimals = @ {
404
+ aStringTatLooksLikeAFloat = " 55,34" ;
396
405
aStringThatLooksLikeAnInt = " 2018+"
397
406
scientificNotationInt = [int32 ]1000
398
407
scientificNotationBigInt = [System.Numerics.BigInteger ]::Parse(" 10000000000000000000000000000000000000000" )
399
408
intWithTag = 42
400
409
zeroIntWithTag = 0
401
410
zeroIntWithoutTag = 0
402
411
scientificNotationIntWithTag = 1000
403
- }
404
- );
412
+ aDecimalWithATag = [decimal ]::Parse(" 3.9999999999999990" , [System.Globalization.CultureInfo ]::InvariantCulture)
413
+ aDecimalWithoutATag = [decimal ]::Parse(" 3.9999999999999990" , [System.Globalization.CultureInfo ]::InvariantCulture)
414
+ decimalInfinity = [double ]::PositiveInfinity
415
+ decimalNegativeInfinity = [double ]::NegativeInfinity
416
+ }
405
417
total = 4443.52 ;
406
418
int64 = ([int64 ]::MaxValue);
407
419
note = (" I can't wait. To get that Cool Book.`n " );
@@ -444,25 +456,38 @@ bools:
444
456
$product [' quantity' ] | Should - Be $expectedProduct [' quantity' ]
445
457
$product [' description' ] | Should - Be $expectedProduct [' description' ]
446
458
$product [' price' ] | Should - Be $expectedProduct [' price' ]
447
- $product [' aStringTatLooksLikeAFloat' ] | Should - Be $expectedProduct [' aStringTatLooksLikeAFloat' ]
448
- $product [' aStringTatLooksLikeAFloat' ] | Should - BeOfType ([string ])
449
- $product [' aStringThatLooksLikeAnInt' ] | Should - Be $expectedProduct [' aStringThatLooksLikeAnInt' ]
450
- $product [' aStringThatLooksLikeAnInt' ] | Should - BeOfType ([string ])
451
- $product [' zeroIntWithTag' ] | Should - Be $expectedProduct [' zeroIntWithTag' ]
452
- $product [' zeroIntWithTag' ] | Should - BeOfType ([int32 ])
453
- $product [' zeroIntWithoutTag' ] | Should - Be $expectedProduct [' zeroIntWithoutTag' ]
454
- $product [' zeroIntWithoutTag' ] | Should - BeOfType ([int32 ])
455
- $product [' scientificNotationInt' ] | Should - Be $expectedProduct [' scientificNotationInt' ]
456
- $product [' scientificNotationInt' ] | Should - BeOfType ([int32 ])
457
- $product [' scientificNotationBigInt' ] | Should - Be $expectedProduct [' scientificNotationBigInt' ]
458
- $product [' scientificNotationBigInt' ] | Should - BeOfType ([System.Numerics.BigInteger ])
459
- $product [' intWithTag' ] | Should - Be $expectedProduct [' intWithTag' ]
460
- $product [' intWithTag' ] | Should - BeOfType ([int32 ])
461
- $product [' scientificNotationIntWithTag' ] | Should - Be $expectedProduct [' scientificNotationIntWithTag' ]
462
- $product [' scientificNotationIntWithTag' ] | Should - BeOfType ([int32 ])
459
+
463
460
$res [' total' ] | Should - Be $expected [' total' ]
464
461
$res [' note' ] | Should - Be $expected [' note' ]
465
462
463
+ $expectedIntsAndDecimals = $expected [' intsAndDecimals' ]
464
+
465
+ $intsAndDecimals = $res [' intsAndDecimals' ]
466
+ $intsAndDecimals [' aStringTatLooksLikeAFloat' ] | Should - Be $expectedIntsAndDecimals [' aStringTatLooksLikeAFloat' ]
467
+ $intsAndDecimals [' aStringTatLooksLikeAFloat' ] | Should - BeOfType ([string ])
468
+ $intsAndDecimals [' aStringThatLooksLikeAnInt' ] | Should - Be $expectedIntsAndDecimals [' aStringThatLooksLikeAnInt' ]
469
+ $intsAndDecimals [' aStringThatLooksLikeAnInt' ] | Should - BeOfType ([string ])
470
+ $intsAndDecimals [' zeroIntWithTag' ] | Should - Be $expectedIntsAndDecimals [' zeroIntWithTag' ]
471
+ $intsAndDecimals [' zeroIntWithTag' ] | Should - BeOfType ([int32 ])
472
+ $intsAndDecimals [' zeroIntWithoutTag' ] | Should - Be $expectedIntsAndDecimals [' zeroIntWithoutTag' ]
473
+ $intsAndDecimals [' zeroIntWithoutTag' ] | Should - BeOfType ([int32 ])
474
+ $intsAndDecimals [' scientificNotationInt' ] | Should - Be $expectedIntsAndDecimals [' scientificNotationInt' ]
475
+ $intsAndDecimals [' scientificNotationInt' ] | Should - BeOfType ([int32 ])
476
+ $intsAndDecimals [' scientificNotationBigInt' ] | Should - Be $expectedIntsAndDecimals [' scientificNotationBigInt' ]
477
+ $intsAndDecimals [' scientificNotationBigInt' ] | Should - BeOfType ([System.Numerics.BigInteger ])
478
+ $intsAndDecimals [' intWithTag' ] | Should - Be $expectedIntsAndDecimals [' intWithTag' ]
479
+ $intsAndDecimals [' intWithTag' ] | Should - BeOfType ([int32 ])
480
+ $intsAndDecimals [' scientificNotationIntWithTag' ] | Should - Be $expectedIntsAndDecimals [' scientificNotationIntWithTag' ]
481
+ $intsAndDecimals [' scientificNotationIntWithTag' ] | Should - BeOfType ([int32 ])
482
+ $intsAndDecimals [' aDecimalWithATag' ] | Should - Be $expectedIntsAndDecimals [' aDecimalWithATag' ]
483
+ $intsAndDecimals [' aDecimalWithATag' ] | Should - BeOfType ([decimal ])
484
+ $intsAndDecimals [' aDecimalWithoutATag' ] | Should - Be $expectedIntsAndDecimals [' aDecimalWithoutATag' ]
485
+ $intsAndDecimals [' aDecimalWithoutATag' ] | Should - BeOfType ([decimal ])
486
+ $intsAndDecimals [' decimalInfinity' ] | Should - Be $expectedIntsAndDecimals [' decimalInfinity' ]
487
+ $intsAndDecimals [' decimalInfinity' ] | Should - BeOfType ([double ])
488
+ $intsAndDecimals [' decimalNegativeInfinity' ] | Should - Be $expectedIntsAndDecimals [' decimalNegativeInfinity' ]
489
+ $intsAndDecimals [' decimalNegativeInfinity' ] | Should - BeOfType ([double ])
490
+
466
491
$res [' dates' ] | Should -Not - BeNullOrEmpty
467
492
$res [' dates' ].Count | Should - Be $expected [' dates' ].Count
468
493
for ( $idx = 0 ; $idx -lt $expected [' dates' ].Count; ++ $idx )
0 commit comments