diff options
author | Hsuan Lee <boczeratul@gmail.com> | 2019-03-06 17:46:50 +0800 |
---|---|---|
committer | Hsuan Lee <boczeratul@gmail.com> | 2019-03-06 17:46:50 +0800 |
commit | 35703539d0f2b4ddb3b11d0de8c9634af59ab71f (patch) | |
tree | ae3731221dbbb3a6fa40060a8d916cfd3f738289 /packages/sol-tracing-utils/test/utils_test.ts | |
parent | 92a1fde5b1ecd81b07cdb5bf0c9c1cd3544799db (diff) | |
download | dexon-0x-contracts-stable.tar dexon-0x-contracts-stable.tar.gz dexon-0x-contracts-stable.tar.bz2 dexon-0x-contracts-stable.tar.lz dexon-0x-contracts-stable.tar.xz dexon-0x-contracts-stable.tar.zst dexon-0x-contracts-stable.zip |
Deploy @dexon-foundation/0x.jsstable
Diffstat (limited to 'packages/sol-tracing-utils/test/utils_test.ts')
-rw-r--r-- | packages/sol-tracing-utils/test/utils_test.ts | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/packages/sol-tracing-utils/test/utils_test.ts b/packages/sol-tracing-utils/test/utils_test.ts deleted file mode 100644 index 6fc8fcfe1..000000000 --- a/packages/sol-tracing-utils/test/utils_test.ts +++ /dev/null @@ -1,53 +0,0 @@ -import * as chai from 'chai'; -import * as dirtyChai from 'dirty-chai'; -import 'mocha'; - -import { utils } from '../src/utils'; - -chai.use(dirtyChai); -const expect = chai.expect; - -describe('utils', () => { - describe('#compareLineColumn', () => { - it('correctly compares LineColumns', () => { - expect(utils.compareLineColumn({ line: 1, column: 3 }, { line: 1, column: 4 })).to.be.lessThan(0); - expect(utils.compareLineColumn({ line: 1, column: 4 }, { line: 1, column: 3 })).to.be.greaterThan(0); - expect(utils.compareLineColumn({ line: 1, column: 3 }, { line: 1, column: 3 })).to.be.equal(0); - expect(utils.compareLineColumn({ line: 0, column: 2 }, { line: 1, column: 0 })).to.be.lessThan(0); - expect(utils.compareLineColumn({ line: 1, column: 0 }, { line: 0, column: 2 })).to.be.greaterThan(0); - }); - }); - - describe('#isRangeInside', () => { - it('returns true if inside', () => { - expect( - utils.isRangeInside( - { start: { line: 1, column: 3 }, end: { line: 1, column: 4 } }, - { start: { line: 1, column: 2 }, end: { line: 1, column: 5 } }, - ), - ).to.be.true(); - }); - it('returns true if the same', () => { - expect( - utils.isRangeInside( - { start: { line: 1, column: 3 }, end: { line: 1, column: 4 } }, - { start: { line: 1, column: 3 }, end: { line: 1, column: 4 } }, - ), - ).to.be.true(); - }); - it('returns false if not inside', () => { - expect( - utils.isRangeInside( - { start: { line: 1, column: 3 }, end: { line: 1, column: 4 } }, - { start: { line: 1, column: 4 }, end: { line: 1, column: 4 } }, - ), - ).to.be.false(); - expect( - utils.isRangeInside( - { start: { line: 1, column: 3 }, end: { line: 1, column: 4 } }, - { start: { line: 1, column: 4 }, end: { line: 1, column: 5 } }, - ), - ).to.be.false(); - }); - }); -}); |