aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/test
diff options
context:
space:
mode:
authorRemco Bloemen <remco@wicked.ventures>2018-05-28 19:07:04 +0800
committerGreg Hysen <greg.hysen@gmail.com>2018-06-08 06:38:47 +0800
commit76b918d40e3bb485cdd45149888f012d9ec2b67f (patch)
tree8a9e47b9db5ffb74e545f2dc3f39a811f0d88f01 /packages/contracts/test
parentf5bc0b205c217eac8abdfee9dcdb3c4d21b5c31e (diff)
downloaddexon-0x-contracts-76b918d40e3bb485cdd45149888f012d9ec2b67f.tar.gz
dexon-0x-contracts-76b918d40e3bb485cdd45149888f012d9ec2b67f.tar.zst
dexon-0x-contracts-76b918d40e3bb485cdd45149888f012d9ec2b67f.zip
Convert Solidity tests to vectors
Diffstat (limited to 'packages/contracts/test')
-rw-r--r--packages/contracts/test/libraries/lib_mem.ts35
1 files changed, 6 insertions, 29 deletions
diff --git a/packages/contracts/test/libraries/lib_mem.ts b/packages/contracts/test/libraries/lib_mem.ts
index c884d5fea..24f933ad8 100644
--- a/packages/contracts/test/libraries/lib_mem.ts
+++ b/packages/contracts/test/libraries/lib_mem.ts
@@ -57,7 +57,12 @@ describe('LibMem', () => {
// Test vectors: destination, source, length, job description
const tests: Array<[number, number, number, string]> = [
- [1, 5, 4, 'four bytes within one word'],
+ [128, 0, 0, 'zero bytes'],
+ [128, 0, 1, 'one byte'],
+ [128, 0, 11, 'eleven bytes'],
+ [128, 0, 32, 'one word'],
+ [128, 0, 72, 'two words and eight bytes'],
+ [128, 0, 100, 'three words and four bytes']
];
// Construct test cases
@@ -74,33 +79,5 @@ describe('LibMem', () => {
expect(result).to.deep.equal(expected);
}),
);
-
- 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 );
- });
});
});