From 6662073facd8f64a85bd64084a310b2953c2c48b Mon Sep 17 00:00:00 2001 From: "Artyom (StepanovAV)" Date: Mon, 22 Apr 2024 19:35:38 +0300 Subject: [PATCH] =?UTF-8?q?code:=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D1=8B=20=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=BD=D1=8B=D0=B5=20=D0=BC=D0=BE=D0=B4=D1=83=D0=BB?= =?UTF-8?q?=D1=8C=D0=BD=D1=8B=D0=B5=20=D1=82=D0=B5=D1=81=D1=82=D1=8B=20?= =?UTF-8?q?=D0=B4=D0=BB=D1=8F=20=D0=BF=D0=B5=D1=80=D1=81=D0=BE=D0=BD=D0=B0?= =?UTF-8?q?=D0=BB=D1=8C=D0=BD=D0=BE=D0=B3=D0=BE=20=D0=B2=D0=B0=D1=80=D0=B8?= =?UTF-8?q?=D0=B0=D0=BD=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lab3_personal/personal_unittest.cbp | 40 +++++++++++++++++++++++ lab3_personal/personal_unittest.cpp | 18 ++++++++++ lab3_personal/styled_text_func_internal.h | 5 +++ 3 files changed, 63 insertions(+) create mode 100644 lab3_personal/personal_unittest.cbp create mode 100644 lab3_personal/personal_unittest.cpp create mode 100644 lab3_personal/styled_text_func_internal.h 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 ();