mirror of
https://github.com/cpm-cmake/CPM.cmake.git
synced 2025-11-19 16:57:56 -05:00
* Added GTest (googletest) Example The examples tests the Fibonacci library similar to the doctest example. * Update examples/gtest/CMakeLists.txt Co-Authored-By: Lars Melchior <TheLartians@users.noreply.github.com>
14 lines
335 B
C++
14 lines
335 B
C++
#include <gtest/gtest.h>
|
|
#include <fibonacci.h>
|
|
|
|
TEST(FibonacciTests, BasicChecks)
|
|
{
|
|
ASSERT_TRUE(fibonnacci(0) == 0);
|
|
ASSERT_TRUE(fibonnacci(1) == 1);
|
|
ASSERT_TRUE(fibonnacci(2) == 1);
|
|
ASSERT_TRUE(fibonnacci(3) == 2);
|
|
ASSERT_TRUE(fibonnacci(4) == 3);
|
|
ASSERT_TRUE(fibonnacci(5) == 5);
|
|
ASSERT_TRUE(fibonnacci(13) == 233);
|
|
}
|