MaxMartST / OOP

Курс по объектно ориентированному программированию
1 stars 0 forks source link

Замечания по программе Vector3d #11

Open alexey-malov opened 4 years ago

alexey-malov commented 4 years ago
1>C:\teaching\oop-ips\martynenko\OOP\Lw 5\task_1.2\pch.h(8,10): fatal error C1083: Cannot open include file: 'boost/algorithm/string.hpp': No such file or directory
alexey-malov commented 4 years ago
2>------ Build started: Project: unit_tests_for_task_1.2, Configuration: Debug Win32 ------
2>CVector3D.cpp
2>The contents of <execution> are available only with C++17 or later.
1>CVector3D.cpp
1>The contents of <execution> are available only with C++17 or later.
2>unit_tests.cpp
1>main.cpp
1>The contents of <execution> are available only with C++17 or later.
2>The contents of <execution> are available only with C++17 or later.
alexey-malov commented 4 years ago
TEST_CASE("Vector assignment addition")
{
    CVector3D x(1, 0, 0);
    CVector3D y(1, 0, 0);

    (x += y) += y;
    CHECK(x == CVector3D(3, 0, 0));
}
alexey-malov commented 4 years ago
alexey-malov commented 4 years ago
TEST_CASE("Vector normalization")
{
    CVector3D v(0, 5, 0);
    v.Normalize();
    CHECK(v == CVector3D(0, 1, 0));
}
alexey-malov commented 4 years ago

https://github.com/MaxMartST/OOP/blob/44e545cc08403452a816780155653f1e93b74458/Lw%205/task_1.2/CVector3D.cpp#L145-L148

alexey-malov commented 4 years ago

https://github.com/MaxMartST/OOP/blob/44e545cc08403452a816780155653f1e93b74458/Lw%205/unit_tests_for_task_1.2/unit_tests.cpp#L146-L156

alexey-malov commented 4 years ago

https://github.com/MaxMartST/OOP/blob/9b2522262b7db7e8121f87dc01fbdf7da20bc28b/Lw%205/task_1.2/CVector3D.cpp#L139-L142

alexey-malov commented 4 years ago

https://github.com/MaxMartST/OOP/blob/9b2522262b7db7e8121f87dc01fbdf7da20bc28b/Lw%205/task_1.2/CVector3D.cpp#L112-L116