@@ -444,8 +444,8 @@ generateNormalPathTestBundles()
444444 overflowState.setFieldAmount (ripple::sfBalance, ripple::STAmount (getIssue (" JPY" , kISSUER ), min64, 80 ));
445445 return std::vector<NormalTestBundle>{
446446 NormalTestBundle{
447- .testName = " AllBranches" ,
448- .mockedDir = createOwnerDirLedgerObject (
447+ .testName = " AllBranches" ,
448+ .mockedDir = createOwnerDirLedgerObject (
449449 {ripple::uint256{kINDEX2 },
450450 ripple::uint256{kINDEX2 },
451451 ripple::uint256{kINDEX2 },
@@ -454,20 +454,22 @@ generateNormalPathTestBundles()
454454 ripple::uint256{kINDEX2 }},
455455 kINDEX1
456456 ),
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 (
471473 R"( {{
472474 "obligations":{{
473475 "JPY":"50"
@@ -513,13 +515,15 @@ generateNormalPathTestBundles()
513515 kACCOUNT3 ,
514516 kACCOUNT
515517 ),
516- .hotwallet = fmt::format (R"( "hotwallet": "{}")" , kACCOUNT2 )
518+ .hotwallet = fmt::format (R"( "hotwallet": "{}")" , kACCOUNT2 )
517519 },
518520 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 (
523527 R"( {{
524528 "obligations":{{
525529 "JPY":"50"
@@ -533,10 +537,10 @@ generateNormalPathTestBundles()
533537 .hotwallet = R"( "ledger_index" : "validated")"
534538 },
535539 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 (
540544 R"( {{
541545 "obligations":{{
542546 "JPY":"9999999999999999e80"
@@ -550,20 +554,22 @@ generateNormalPathTestBundles()
550554 .hotwallet = R"( "ledger_index" : "validated")"
551555 },
552556 NormalTestBundle{
553- .testName = " HighID" ,
554- .mockedDir = createOwnerDirLedgerObject (
557+ .testName = " HighID" ,
558+ .mockedDir = createOwnerDirLedgerObject (
555559 {ripple::uint256{kINDEX2 }, ripple::uint256{kINDEX2 }, ripple::uint256{kINDEX2 }, ripple::uint256{kINDEX2 }
556560 },
557561 kINDEX1
558562 ),
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 (
567573 R"( {{
568574 "obligations":{{
569575 "EUR":"30"
@@ -596,19 +602,20 @@ generateNormalPathTestBundles()
596602 kACCOUNT3 ,
597603 kACCOUNT
598604 ),
599- .hotwallet = fmt::format (R"( "hotwallet": "{}")" , kACCOUNT2 )
605+ .hotwallet = fmt::format (R"( "hotwallet": "{}")" , kACCOUNT2 )
600606 },
601607 NormalTestBundle{
602- .testName = " HotWalletArray" ,
603- .mockedDir = createOwnerDirLedgerObject (
608+ .testName = " HotWalletArray" ,
609+ .mockedDir = createOwnerDirLedgerObject (
604610 {ripple::uint256{kINDEX2 }, ripple::uint256{kINDEX2 }, ripple::uint256{kINDEX2 }}, kINDEX1
605611 ),
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 )
610617
611- },
618+ },
612619 .expectedJson = fmt::format (
613620 R"( {{
614621 "balances":{{
@@ -637,7 +644,7 @@ generateNormalPathTestBundles()
637644 kACCOUNT2 ,
638645 kACCOUNT
639646 ),
640- .hotwallet = fmt::format (R"( "hotwallet": ["{}", "{}"])" , kACCOUNT2 , kACCOUNT3 )
647+ .hotwallet = fmt::format (R"( "hotwallet": ["{}", "{}"])" , kACCOUNT2 , kACCOUNT3 )
641648 },
642649 };
643650}
0 commit comments