Initial Course

This commit is contained in:
David Gil de Gómez Pérez
2026-08-11 17:40:36 +03:00
commit 9aed1d1d86
202 changed files with 3420 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
#include "concepts.hpp"
#include <gtest/gtest.h>
TEST(Concepts, DoubleValue) {
EXPECT_EQ(cpp20::double_value(21), 42);
}
TEST(Concepts, Clamp01) {
EXPECT_DOUBLE_EQ(cpp20::clamp01(1.5), 1.0);
EXPECT_DOUBLE_EQ(cpp20::clamp01(-0.5), 0.0);
}
TEST(Concepts, UppercaseCopy) {
EXPECT_EQ(cpp20::uppercase_copy(std::string{"hello"}), "HELLO");
}
TEST(Concepts, SumIntegral) {
EXPECT_EQ(cpp20::sum_integral({1, 2, 3}), 6);
}