Commit de3f8b77 authored by Mathieu Giraud's avatar Mathieu Giraud
Browse files

tests: add tests

parent 2d4232e5
......@@ -33,11 +33,15 @@ QUnit.test("floatToFixed", function(assert) {
QUnit.test("test rounding functions", function(assert) {
assert.equal(floor_pow10(0.072), 0.01, "nice_floor_pow10 0.072");
assert.equal(nice_ceil(0), 0, "rounding 0");
assert.equal(nice_ceil(0.072), 0.08, "rounding 0.08");
assert.equal(nice_ceil(1.2), 1.5, "rounding 1.2");
assert.equal(nice_ceil(18), 20, "rounding 1.2");
assert.equal(nice_ceil(100), 100, "rounding 100");
assert.equal(nice_floor(0), 0, "rounding 0");
assert.equal(nice_floor(0.072), 0.07, "rounding 0.072");
assert.equal(nice_floor(100), 100, "rounding 100");
assert.equal(nice_floor(451), 400, "rounding 451");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment