diff options
author | Fabio Berger <me@fabioberger.com> | 2018-06-14 18:07:57 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-06-14 18:07:57 +0800 |
commit | 12033abe095e902102f1d56e7a2711a630e6826b (patch) | |
tree | c3dcea6850ab2e4769fc969611018ba445a62191 /packages/contracts/test/exchange | |
parent | f9410d5d008ce289d075741710c6f7705bd3ad2a (diff) | |
download | dexon-sol-tools-12033abe095e902102f1d56e7a2711a630e6826b.tar dexon-sol-tools-12033abe095e902102f1d56e7a2711a630e6826b.tar.gz dexon-sol-tools-12033abe095e902102f1d56e7a2711a630e6826b.tar.bz2 dexon-sol-tools-12033abe095e902102f1d56e7a2711a630e6826b.tar.lz dexon-sol-tools-12033abe095e902102f1d56e7a2711a630e6826b.tar.xz dexon-sol-tools-12033abe095e902102f1d56e7a2711a630e6826b.tar.zst dexon-sol-tools-12033abe095e902102f1d56e7a2711a630e6826b.zip |
Rename OrderAmountScenario to OrderAssetAmountScenario and convert generateOrderCombinations to generateFillOrderCombinations
Diffstat (limited to 'packages/contracts/test/exchange')
-rw-r--r-- | packages/contracts/test/exchange/combinatorial_tests.ts | 8 | ||||
-rw-r--r-- | packages/contracts/test/exchange/fill_order.ts | 20 |
2 files changed, 11 insertions, 17 deletions
diff --git a/packages/contracts/test/exchange/combinatorial_tests.ts b/packages/contracts/test/exchange/combinatorial_tests.ts index fd9193d69..754af9b08 100644 --- a/packages/contracts/test/exchange/combinatorial_tests.ts +++ b/packages/contracts/test/exchange/combinatorial_tests.ts @@ -42,13 +42,7 @@ describe('Combinatorial tests', () => { }); }; - const allOrderScenarios = CoreCombinatorialUtils.generateOrderCombinations(); - const allFillScenarios = _.map(allOrderScenarios, orderScenario => { - return { - orderScenario, - takerAssetFillAmountScenario: TakerAssetFillAmountScenario.LessThanRemainingFillableTakerAssetAmount, - }; - }); + const allFillScenarios = CoreCombinatorialUtils.generateFillOrderCombinations(); describe('Fills orders', () => test(allFillScenarios)); }); diff --git a/packages/contracts/test/exchange/fill_order.ts b/packages/contracts/test/exchange/fill_order.ts index 3f49f6119..2498ee27e 100644 --- a/packages/contracts/test/exchange/fill_order.ts +++ b/packages/contracts/test/exchange/fill_order.ts @@ -9,7 +9,7 @@ import { AssetDataScenario, ExpirationTimeSecondsScenario, FeeRecipientAddressScenario, - OrderAmountScenario, + OrderAssetAmountScenario, OrderScenario, TakerAssetFillAmountScenario, TakerScenario, @@ -22,10 +22,10 @@ const defaultFillScenario = { orderScenario: { takerScenario: TakerScenario.Unspecified, feeRecipientScenario: FeeRecipientAddressScenario.EthUserAddress, - makerAssetAmountScenario: OrderAmountScenario.Large, - takerAssetAmountScenario: OrderAmountScenario.Large, - makerFeeScenario: OrderAmountScenario.Large, - takerFeeScenario: OrderAmountScenario.Large, + makerAssetAmountScenario: OrderAssetAmountScenario.Large, + takerAssetAmountScenario: OrderAssetAmountScenario.Large, + makerFeeScenario: OrderAssetAmountScenario.Large, + takerFeeScenario: OrderAssetAmountScenario.Large, expirationTimeSecondsScenario: ExpirationTimeSecondsScenario.InFuture, makerAssetDataScenario: AssetDataScenario.ERC20NonZRXEighteenDecimals, takerAssetDataScenario: AssetDataScenario.ERC20NonZRXEighteenDecimals, @@ -33,7 +33,7 @@ const defaultFillScenario = { takerAssetFillAmountScenario: TakerAssetFillAmountScenario.LessThanRemainingFillableTakerAssetAmount, }; -describe.only('FillOrder Tests', () => { +describe('FillOrder Tests', () => { let coreCombinatorialUtils: CoreCombinatorialUtils; before(async () => { @@ -61,7 +61,7 @@ describe.only('FillOrder Tests', () => { ...defaultFillScenario, orderScenario: { ...defaultFillScenario.orderScenario, - takerAssetAmountScenario: OrderAmountScenario.Small, + takerAssetAmountScenario: OrderAssetAmountScenario.Small, }, }; await coreCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario); @@ -71,7 +71,7 @@ describe.only('FillOrder Tests', () => { ...defaultFillScenario, orderScenario: { ...defaultFillScenario.orderScenario, - makerAssetAmountScenario: OrderAmountScenario.Small, + makerAssetAmountScenario: OrderAssetAmountScenario.Small, }, }; await coreCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario); @@ -109,7 +109,7 @@ describe.only('FillOrder Tests', () => { ...defaultFillScenario, orderScenario: { ...defaultFillScenario.orderScenario, - makerAssetAmountScenario: OrderAmountScenario.Zero, + makerAssetAmountScenario: OrderAssetAmountScenario.Zero, }, }; await coreCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario); @@ -120,7 +120,7 @@ describe.only('FillOrder Tests', () => { ...defaultFillScenario, orderScenario: { ...defaultFillScenario.orderScenario, - takerAssetAmountScenario: OrderAmountScenario.Zero, + takerAssetAmountScenario: OrderAssetAmountScenario.Zero, }, }; await coreCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario); |