Skip to content
This repository has been archived by the owner on Oct 26, 2021. It is now read-only.

Commit

Permalink
Added tests for natures.multiplier and createRange
Browse files Browse the repository at this point in the history
  • Loading branch information
agarie committed Oct 13, 2011
1 parent 4b79a6e commit cbeb1b7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/ivcalc-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,10 @@ IVCalcTest.prototype.test_create_range = function () {
assertString("createRange must return a string", createRange([1,3,4,5,6,7]) );
assertEquals("createRange must return a range with the first and last elements", "1 - 3", createRange([1,2,3]) );
assertEquals("createRange must return the SAME range independently of the array's length", createRange([1,2,3]), createRange([1,2,2,2,2,2,2,3]));
};

IVCalcTest.prototype.test_natures_multiplier_return_correct_value = function () {
assertNumber("natures.multiplier must return a number", natures.multiplier("adamant", "def"));
assertEquals("natures.multiplier must return 1.1 if stat is to be boosted", 1.1, natures.multiplier("bold", "def"));
assertEquals("natures.multiplier must return 0.9 if stat is to be diminished", 0.9, natures.multiplier("jolly", "spatk"));
};

0 comments on commit cbeb1b7

Please sign in to comment.