Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
vidjil
vidjil
Commits
ce9c38ea
Commit
ce9c38ea
authored
Oct 18, 2017
by
Mathieu Giraud
Browse files
tests: add tests
See
#2731
.
parent
65de6d61
Changes
1
Hide whitespace changes
Inline
Side-by-side
browser/test/QUnit/testFiles/tools_test.js
View file @
ce9c38ea
...
...
@@ -45,6 +45,12 @@ QUnit.test("test rounding functions", function(assert) {
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
"
);
assert
.
equal
(
nice_number_digits
(
42
,
1
),
0
,
"
nice_number_digits 42
"
);
assert
.
equal
(
nice_number_digits
(
45.1
,
2
),
0
,
"
nice_number_digits 45.1
"
);
assert
.
equal
(
nice_number_digits
(
4.51
,
2
),
1
,
"
nice_number_digits 4.51
"
);
assert
.
equal
(
nice_number_digits
(
0.4
,
2
),
2
,
"
nice_number_digits 0.4
"
);
assert
.
equal
(
nice_number_digits
(
0.045
,
2
),
3
,
"
nice_number_digits 0.045
"
);
}
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment