25 lines
418 B
C++
25 lines
418 B
C++
#include "s0509_fibonacci_number.hpp"
|
|
|
|
#include <gtest/gtest.h>
|
|
|
|
TEST(Problem509, Case1) {
|
|
int n{2};
|
|
int expected{1};
|
|
S0509 solution;
|
|
EXPECT_EQ(solution.fib(n), expected);
|
|
}
|
|
|
|
TEST(Problem509, Case2) {
|
|
int n{3};
|
|
int expected{2};
|
|
S0509 solution;
|
|
EXPECT_EQ(solution.fib(n), expected);
|
|
}
|
|
|
|
TEST(Problem509, Case3) {
|
|
int n{4};
|
|
int expected{3};
|
|
S0509 solution;
|
|
EXPECT_EQ(solution.fib(n), expected);
|
|
}
|