Skip to content

Commit

Permalink
add more linkedlist tests
Browse files Browse the repository at this point in the history
  • Loading branch information
divyakoshy committed Nov 20, 2019
1 parent 270361e commit a8a6cc3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/LinkedList.ts
Expand Up @@ -139,6 +139,11 @@ contract("LinkedList", () => {
.should.be.rejectedWith(/LinkedList: invalid count/); // invalid count
})

it("should revert when given incorrect start address while retrieving elements in the list", async () => {
await linkedList.elements.call(NODE4, 1)
.should.be.rejectedWith(/LinkedList: not in list/); // invalid count
})

it("should return elements in the list", async () => {
let shifters = await linkedList.elements.call(NODE1, 1);
shifters[0].should.equal(NODE1);
Expand Down

0 comments on commit a8a6cc3

Please sign in to comment.