@@ -444,8 +444,8 @@ generateNormalPathTestBundles()
444
444
overflowState.setFieldAmount (ripple::sfBalance, ripple::STAmount (getIssue (" JPY" , kISSUER ), min64, 80 ));
445
445
return std::vector<NormalTestBundle>{
446
446
NormalTestBundle{
447
- .testName = " AllBranches" ,
448
- .mockedDir = createOwnerDirLedgerObject (
447
+ .testName = " AllBranches" ,
448
+ .mockedDir = createOwnerDirLedgerObject (
449
449
{ripple::uint256{kINDEX2 },
450
450
ripple::uint256{kINDEX2 },
451
451
ripple::uint256{kINDEX2 },
@@ -454,20 +454,22 @@ generateNormalPathTestBundles()
454
454
ripple::uint256{kINDEX2 }},
455
455
kINDEX1
456
456
),
457
- .mockedObjects =std::vector{// hotwallet
458
- createRippleStateLedgerObject (" USD" , kISSUER , -10 , kACCOUNT , 100 , kACCOUNT2 , 200 , kTXN_ID , 123 ),
459
- // hotwallet
460
- createRippleStateLedgerObject (" CNY" , kISSUER , -20 , kACCOUNT , 100 , kACCOUNT2 , 200 , kTXN_ID , 123 ),
461
- // positive balance -> asset
462
- createRippleStateLedgerObject (" EUR" , kISSUER , 30 , kACCOUNT , 100 , kACCOUNT3 , 200 , kTXN_ID , 123 ),
463
- // positive balance -> asset
464
- createRippleStateLedgerObject (" JPY" , kISSUER , 40 , kACCOUNT , 100 , kACCOUNT3 , 200 , kTXN_ID , 123 ),
465
- // obligation
466
- createRippleStateLedgerObject (" JPY" , kISSUER , -50 , kACCOUNT , 10 , kACCOUNT3 , 20 , kTXN_ID , 123 ),
467
- frozenState
468
-
469
- },
470
- .expectedJson =fmt::format (
457
+ .mockedObjects =
458
+ std::vector{
459
+ // hotwallet
460
+ createRippleStateLedgerObject (" USD" , kISSUER , -10 , kACCOUNT , 100 , kACCOUNT2 , 200 , kTXN_ID , 123 ),
461
+ // hotwallet
462
+ createRippleStateLedgerObject (" CNY" , kISSUER , -20 , kACCOUNT , 100 , kACCOUNT2 , 200 , kTXN_ID , 123 ),
463
+ // positive balance -> asset
464
+ createRippleStateLedgerObject (" EUR" , kISSUER , 30 , kACCOUNT , 100 , kACCOUNT3 , 200 , kTXN_ID , 123 ),
465
+ // positive balance -> asset
466
+ createRippleStateLedgerObject (" JPY" , kISSUER , 40 , kACCOUNT , 100 , kACCOUNT3 , 200 , kTXN_ID , 123 ),
467
+ // obligation
468
+ createRippleStateLedgerObject (" JPY" , kISSUER , -50 , kACCOUNT , 10 , kACCOUNT3 , 20 , kTXN_ID , 123 ),
469
+ frozenState
470
+
471
+ },
472
+ .expectedJson = fmt::format (
471
473
R"( {{
472
474
"obligations":{{
473
475
"JPY":"50"
@@ -513,13 +515,15 @@ generateNormalPathTestBundles()
513
515
kACCOUNT3 ,
514
516
kACCOUNT
515
517
),
516
- .hotwallet = fmt::format (R"( "hotwallet": "{}")" , kACCOUNT2 )
518
+ .hotwallet = fmt::format (R"( "hotwallet": "{}")" , kACCOUNT2 )
517
519
},
518
520
NormalTestBundle{
519
- .testName =" NoHotwallet" ,
520
- .mockedDir =createOwnerDirLedgerObject ({ripple::uint256{kINDEX2 }}, kINDEX1 ),
521
- .mockedObjects =std::vector{createRippleStateLedgerObject (" JPY" , kISSUER , -50 , kACCOUNT , 10 , kACCOUNT3 , 20 , kTXN_ID , 123 )},
522
- .expectedJson =fmt::format (
521
+ .testName = " NoHotwallet" ,
522
+ .mockedDir = createOwnerDirLedgerObject ({ripple::uint256{kINDEX2 }}, kINDEX1 ),
523
+ .mockedObjects = std::vector{createRippleStateLedgerObject (
524
+ " JPY" , kISSUER , -50 , kACCOUNT , 10 , kACCOUNT3 , 20 , kTXN_ID , 123
525
+ )},
526
+ .expectedJson = fmt::format (
523
527
R"( {{
524
528
"obligations":{{
525
529
"JPY":"50"
@@ -533,10 +537,10 @@ generateNormalPathTestBundles()
533
537
.hotwallet = R"( "ledger_index" : "validated")"
534
538
},
535
539
NormalTestBundle{
536
- .testName = " ObligationOverflow" ,
537
- .mockedDir = createOwnerDirLedgerObject ({ripple::uint256{kINDEX2 }, ripple::uint256{kINDEX2 }}, kINDEX1 ),
538
- .mockedObjects = std::vector{overflowState, overflowState},
539
- .expectedJson = fmt::format (
540
+ .testName = " ObligationOverflow" ,
541
+ .mockedDir = createOwnerDirLedgerObject ({ripple::uint256{kINDEX2 }, ripple::uint256{kINDEX2 }}, kINDEX1 ),
542
+ .mockedObjects = std::vector{overflowState, overflowState},
543
+ .expectedJson = fmt::format (
540
544
R"( {{
541
545
"obligations":{{
542
546
"JPY":"9999999999999999e80"
@@ -550,20 +554,22 @@ generateNormalPathTestBundles()
550
554
.hotwallet = R"( "ledger_index" : "validated")"
551
555
},
552
556
NormalTestBundle{
553
- .testName = " HighID" ,
554
- .mockedDir = createOwnerDirLedgerObject (
557
+ .testName = " HighID" ,
558
+ .mockedDir = createOwnerDirLedgerObject (
555
559
{ripple::uint256{kINDEX2 }, ripple::uint256{kINDEX2 }, ripple::uint256{kINDEX2 }, ripple::uint256{kINDEX2 }
556
560
},
557
561
kINDEX1
558
562
),
559
- .mockedObjects =std::vector{// hotwallet
560
- createRippleStateLedgerObject (" USD" , kISSUER , 10 , kACCOUNT2 , 100 , kACCOUNT , 200 , kTXN_ID , 123 ),
561
- // hotwallet
562
- createRippleStateLedgerObject (" CNY" , kISSUER , 20 , kACCOUNT2 , 100 , kACCOUNT , 200 , kTXN_ID , 123 ),
563
- createRippleStateLedgerObject (" EUR" , kISSUER , 30 , kACCOUNT3 , 100 , kACCOUNT , 200 , kTXN_ID , 123 ),
564
- createRippleStateLedgerObject (" JPY" , kISSUER , -50 , kACCOUNT3 , 10 , kACCOUNT , 20 , kTXN_ID , 123 )
565
- },
566
- .expectedJson =fmt::format (
563
+ .mockedObjects =
564
+ std::vector{
565
+ // hotwallet
566
+ createRippleStateLedgerObject (" USD" , kISSUER , 10 , kACCOUNT2 , 100 , kACCOUNT , 200 , kTXN_ID , 123 ),
567
+ // hotwallet
568
+ createRippleStateLedgerObject (" CNY" , kISSUER , 20 , kACCOUNT2 , 100 , kACCOUNT , 200 , kTXN_ID , 123 ),
569
+ createRippleStateLedgerObject (" EUR" , kISSUER , 30 , kACCOUNT3 , 100 , kACCOUNT , 200 , kTXN_ID , 123 ),
570
+ createRippleStateLedgerObject (" JPY" , kISSUER , -50 , kACCOUNT3 , 10 , kACCOUNT , 20 , kTXN_ID , 123 )
571
+ },
572
+ .expectedJson = fmt::format (
567
573
R"( {{
568
574
"obligations":{{
569
575
"EUR":"30"
@@ -596,19 +602,20 @@ generateNormalPathTestBundles()
596
602
kACCOUNT3 ,
597
603
kACCOUNT
598
604
),
599
- .hotwallet = fmt::format (R"( "hotwallet": "{}")" , kACCOUNT2 )
605
+ .hotwallet = fmt::format (R"( "hotwallet": "{}")" , kACCOUNT2 )
600
606
},
601
607
NormalTestBundle{
602
- .testName = " HotWalletArray" ,
603
- .mockedDir = createOwnerDirLedgerObject (
608
+ .testName = " HotWalletArray" ,
609
+ .mockedDir = createOwnerDirLedgerObject (
604
610
{ripple::uint256{kINDEX2 }, ripple::uint256{kINDEX2 }, ripple::uint256{kINDEX2 }}, kINDEX1
605
611
),
606
- .mockedObjects =std::vector{
607
- createRippleStateLedgerObject (" USD" , kISSUER , -10 , kACCOUNT , 100 , kACCOUNT2 , 200 , kTXN_ID , 123 ),
608
- createRippleStateLedgerObject (" CNY" , kISSUER , -20 , kACCOUNT , 100 , kACCOUNT2 , 200 , kTXN_ID , 123 ),
609
- createRippleStateLedgerObject (" EUR" , kISSUER , -30 , kACCOUNT , 100 , kACCOUNT3 , 200 , kTXN_ID , 123 )
612
+ .mockedObjects =
613
+ std::vector{
614
+ createRippleStateLedgerObject (" USD" , kISSUER , -10 , kACCOUNT , 100 , kACCOUNT2 , 200 , kTXN_ID , 123 ),
615
+ createRippleStateLedgerObject (" CNY" , kISSUER , -20 , kACCOUNT , 100 , kACCOUNT2 , 200 , kTXN_ID , 123 ),
616
+ createRippleStateLedgerObject (" EUR" , kISSUER , -30 , kACCOUNT , 100 , kACCOUNT3 , 200 , kTXN_ID , 123 )
610
617
611
- },
618
+ },
612
619
.expectedJson = fmt::format (
613
620
R"( {{
614
621
"balances":{{
@@ -637,7 +644,7 @@ generateNormalPathTestBundles()
637
644
kACCOUNT2 ,
638
645
kACCOUNT
639
646
),
640
- .hotwallet = fmt::format (R"( "hotwallet": ["{}", "{}"])" , kACCOUNT2 , kACCOUNT3 )
647
+ .hotwallet = fmt::format (R"( "hotwallet": ["{}", "{}"])" , kACCOUNT2 , kACCOUNT3 )
641
648
},
642
649
};
643
650
}
0 commit comments