Initial Course
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
#include "constexpr_frontier.hpp"
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
TEST(ConstexprFrontier, Factorial) {
|
||||
EXPECT_EQ(cpp26::compile_time_factorial(5), 120);
|
||||
}
|
||||
|
||||
TEST(ConstexprFrontier, CompileTimeSum) {
|
||||
EXPECT_EQ(cpp26::compile_time_sum({1, 2, 3, 4, 5}), 15);
|
||||
}
|
||||
|
||||
TEST(ConstexprFrontier, IsSorted) {
|
||||
EXPECT_TRUE(cpp26::is_sorted({1, 2, 3, 4, 5}));
|
||||
EXPECT_FALSE(cpp26::is_sorted({1, 3, 2, 4, 5}));
|
||||
}
|
||||
Reference in New Issue
Block a user