aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/test/libraries
diff options
context:
space:
mode:
authorGreg Hysen <greg.hysen@gmail.com>2018-05-25 01:56:47 +0800
committerGreg Hysen <greg.hysen@gmail.com>2018-06-08 06:36:18 +0800
commit3d65341080177bdd436e7628a76e65774b947a38 (patch)
tree22214bf411e1cd564a5af5f50c5d8e02cfe7b875 /packages/contracts/test/libraries
parent80215ea1818874bcd3661259df6f2d3279cc59f2 (diff)
downloaddexon-sol-tools-3d65341080177bdd436e7628a76e65774b947a38.tar
dexon-sol-tools-3d65341080177bdd436e7628a76e65774b947a38.tar.gz
dexon-sol-tools-3d65341080177bdd436e7628a76e65774b947a38.tar.bz2
dexon-sol-tools-3d65341080177bdd436e7628a76e65774b947a38.tar.lz
dexon-sol-tools-3d65341080177bdd436e7628a76e65774b947a38.tar.xz
dexon-sol-tools-3d65341080177bdd436e7628a76e65774b947a38.tar.zst
dexon-sol-tools-3d65341080177bdd436e7628a76e65774b947a38.zip
Tests for libMem
Diffstat (limited to 'packages/contracts/test/libraries')
-rw-r--r--packages/contracts/test/libraries/lib_mem.ts68
1 files changed, 68 insertions, 0 deletions
diff --git a/packages/contracts/test/libraries/lib_mem.ts b/packages/contracts/test/libraries/lib_mem.ts
new file mode 100644
index 000000000..c861484f3
--- /dev/null
+++ b/packages/contracts/test/libraries/lib_mem.ts
@@ -0,0 +1,68 @@
+import { LogWithDecodedArgs, TransactionReceiptWithDecodedLogs, ZeroEx } from '0x.js';
+import { BlockchainLifecycle, devConstants, web3Factory } from '@0xproject/dev-utils';
+import { BigNumber } from '@0xproject/utils';
+import { Web3Wrapper } from '@0xproject/web3-wrapper';
+import BN = require('bn.js');
+import * as chai from 'chai';
+import ethUtil = require('ethereumjs-util');
+import * as Web3 from 'web3';
+
+import { TestLibMemContract } from '../../src/contract_wrappers/generated/test_lib_mem';
+import { artifacts } from '../../src/utils/artifacts';
+import { chaiSetup } from '../../src/utils/chai_setup';
+import { constants } from '../../src/utils/constants';
+import { AssetProxyId } from '../../src/utils/types';
+import { provider, txDefaults, web3Wrapper } from '../../src/utils/web3_wrapper';
+
+chaiSetup.configure();
+const expect = chai.expect;
+const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
+
+describe.only('LibMem', () => {
+ let owner: string;
+ let testLibMem: TestLibMemContract;
+
+ before(async () => {
+ // Setup accounts & addresses
+ const accounts = await web3Wrapper.getAvailableAddressesAsync();
+ owner = accounts[0];
+ // Deploy TestLibMem
+ testLibMem = await TestLibMemContract.deployFrom0xArtifactAsync(artifacts.TestLibMem, provider, txDefaults);
+ });
+ beforeEach(async () => {
+ await blockchainLifecycle.startAsync();
+ });
+ afterEach(async () => {
+ await blockchainLifecycle.revertAsync();
+ });
+
+ describe('LibMem', () => {
+ it('should )', async () => {
+ await testLibMem.test1.sendTransactionAsync();
+ });
+
+ it('should )', async () => {
+ await testLibMem.test2.sendTransactionAsync();
+ });
+
+ it('should )', async () => {
+ await testLibMem.test3.sendTransactionAsync();
+ });
+
+ it('should )', async () => {
+ await testLibMem.test4.sendTransactionAsync();
+ });
+
+ it('should )', async () => {
+ await testLibMem.test5.sendTransactionAsync();
+ });
+
+ it('should )', async () => {
+ await testLibMem.test6.sendTransactionAsync();
+ });
+
+ it('should )', async () => {
+ return expect(testLibMem.test7.sendTransactionAsync()).to.be.rejectedWith(constants.REVERT);
+ });
+ });
+});