diff --git a/lab3_personal/personal_unittest.cbp b/lab3_personal/personal_unittest.cbp new file mode 100644 index 0000000..ed270fe --- /dev/null +++ b/lab3_personal/personal_unittest.cbp @@ -0,0 +1,40 @@ + + + + + + diff --git a/lab3_personal/personal_unittest.cpp b/lab3_personal/personal_unittest.cpp new file mode 100644 index 0000000..4a8c982 --- /dev/null +++ b/lab3_personal/personal_unittest.cpp @@ -0,0 +1,18 @@ +#define DOCTEST_CONFIG_NO_MULTITHREADING +#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN +#include "doctest.h" +#include "styled_text_func_internal.h" +#include + +TEST_CASE("Some mistakes in words") { + std::string text_style = styled_text_func (); + CHECK(text_style == "underline"); +} +TEST_CASE("Not using any style") { + std::string text_style = styled_text_func (); + CHECK(text_style == "none"); +} +TEST_CASE("Using 'none' as style after answering 'Yes'") { + std::string text_style = styled_text_func (); + CHECK(text_style == "none"); +} diff --git a/lab3_personal/styled_text_func_internal.h b/lab3_personal/styled_text_func_internal.h new file mode 100644 index 0000000..1919042 --- /dev/null +++ b/lab3_personal/styled_text_func_internal.h @@ -0,0 +1,5 @@ +#pragma once +#include + +std::string +styled_text_func ();