Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add test case #63

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions FibonacciTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import java.math.BigInteger;
import static org.junit.Assert.assertTrue;

public class FibonacciTest{

@Test
public void test(){
int start = 10000;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make it const integer

BigInteger fib1 = new BigInteger("0");
BigInteger fib2 = new BigInteger("1");

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

for(int i = 0; i <= (start -2); i++) {
BigInteger fib3 = fib1.add(fib2);
fib1 = fib2;
fib2 = fib3;
}
assertTrue(fib3 > 0);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

start가 2 보다는 크다는 사실만 확인할 수 있는 코드같습니다.

}
}