Β
Β
νλ‘μ νΈ κ΅¬μ±
- λ€μμ λͺ λ Ήμ΄λ₯Ό μ€ννμ¬ νλ‘μ νΈλ₯Ό ꡬμ±νλ€
git clone -b minimal https://github.com/SwimingKim/programmers_slam_project_template.git cd programmers_slam_project_template python3 buildDeps.py --password ${PASSWORD} code . # open in vscode
Β
Β
CMake λΉλ λ° μ€ν
- νλ¨μ CMakeλ₯Ό μ ννμ¬
GCC
λ₯Ό νμ±ννλ€

Release
νΉμDebug
λ₯Ό μ ννλ€

- νλ¨μ
Build
λ²νΌμ λλ¬μ CMakeλ₯Ό λΉλνλ€

- [all] μ΅μ
μ μ ννμ¬
unit_tests
μ νμ±ννλ€

- νλ¨μ μ€ν λ²νΌμ λλ¬μ
unit_tests
μ μ€ννλ€

- μ μμ μΌλ‘ μ€ννλ κ²μ νμΈνλ€

Β
Β
TDD μ½λ μμ±
- modules/module1/test/sample.cpp νμΌμ λ€μμ μ½λλ₯Ό μμ±νλ€
#include "gtest/gtest.h" TEST(Test_Name_Major, Test_Name_Minor) { constexpr bool evaluation = true; EXPECT_EQ(evaluation, true); EXPECT_EQ(1, 2); EXPECT_TRUE(2 > 3); EXPECT_NEAR(3, -2, 3); }
- ν μ€νΈκ° μ€ν¨λλ κ²μ νμΈνλ€

- λ€μ μ½λλ‘ λ³κ²½νλ€
#include "gtest/gtest.h" TEST(Test_Name_Major, Test_Name_Minor) { constexpr bool evaluation = true; EXPECT_EQ(evaluation, true); EXPECT_EQ(2, 2); EXPECT_TRUE(2 < 3); EXPECT_NEAR(3, -2, 6); }
- ν μ€νΈκ° μ±κ³΅νλ κ²μ νμΈνλ€

Β
Β
μ°Έκ³
Β