Add testcase to Ceil Algorithm (#3183)

Co-authored-by: Yang Libin <contact@yanglibin.info>
This commit is contained in:
Ankush Banik
2022-07-07 11:54:24 +05:30
committed by GitHub
parent 8c8a61a224
commit 826b612d0d
2 changed files with 17 additions and 8 deletions

View File

@ -4,14 +4,6 @@ import java.util.Random;
public class Ceil {
public static void main(String[] args) {
Random random = new Random();
for (int i = 1; i <= 1000; ++i) {
double randomNumber = random.nextDouble();
assert ceil(randomNumber) == Math.ceil(randomNumber);
}
}
/**
* Returns the smallest (closest to negative infinity)
*