Skip to content

Commit

Permalink
add test for getMaxSubSum
Browse files Browse the repository at this point in the history
  • Loading branch information
dagolinuxoid committed Nov 26, 2018
1 parent 1ba2ebb commit 7dc3cda
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,8 @@ describe("getMaxSubSum", function() {
it("maximal subsum of [-1, -2] equals 0", function() {
assert.equal(getMaxSubSum([-1, -2]), 0);
});
});

it("maximal subsum of [2, -8, 5, -1, 2, -3, 2] equals 6", function() {
assert.equal(getMaxSubSum([2, -8, 5, -1, 2, -3, 2]), 6);
});
});

0 comments on commit 7dc3cda

Please sign in to comment.