fix double precision problem
This commit is contained in:
@@ -2,8 +2,10 @@ using LibSernatur.Misc;
|
||||
|
||||
void add_percentage_tests () {
|
||||
Test.add_func ("/sernatur/test/percentage", () => {
|
||||
assert (Percentage.format_float ((float) 0.07) == "7%");
|
||||
assert (Percentage.format_float ((float) 0.43) == "43%");
|
||||
assert (Percentage.format_float ((float) 1) == "100%");
|
||||
assert (Percentage.format_double (0.07) == "7%");
|
||||
assert (Percentage.format_double (0.43) == "43%");
|
||||
assert (Percentage.format_double (1) == "100%");
|
||||
});
|
||||
|
Reference in New Issue
Block a user