csci3081/testing/fibonacci_test.cc
Michael Zhang 1ba4536588
f
2018-01-29 17:24:20 -06:00

20 lines
441 B
C++

#include <iostream>
#include "fibonacci.h"
#include "tests.h"
void fibonacci_unittest() {
// test negative
ExpectEqual("Negative Input", fibonacci(-1), -1);
// test 0
ExpectEqual("0 Input", fibonacci(0), 0);
// test boundary
ExpectEqual("Border 1", fibonacci(1), 1);
ExpectEqual("Border 2", fibonacci(2), 2);
// test typical
ExpectEqual("Typical 5", fibonacci(5), 5);
ExpectEqual("Typical 10", fibonacci(10), 55);
}