build: изменение кода до пункта 6 + тест на find_minmax

master
MakhnovGA 2 лет назад
Родитель 151acfad80
Сommit 83d735b09d

@ -36,6 +36,9 @@
<Unit filename="histogram.h">
<Option target="&lt;{~None~}&gt;" />
</Unit>
<Unit filename="histogram_internal.h">
<Option target="&lt;{~None~}&gt;" />
</Unit>
<Unit filename="main.cpp" />
<Unit filename="text.cpp" />
<Unit filename="text.h">

@ -0,0 +1,29 @@
# depslib dependency file v1.0
1682090855 source:c:\users\gmack\onedrive\đŕáî÷čé ńňîë\lab01\lab_01\histogram.cpp
<math.h>
<iostream>
<conio.h>
<vector>
"histogram.h"
1681931103 c:\users\gmack\onedrive\đŕáî÷čé ńňîë\lab01\lab_01\histogram.h
<vector>
1681931332 source:c:\users\gmack\onedrive\đŕáî÷čé ńňîë\lab01\lab_01\main.cpp
<math.h>
<iostream>
<conio.h>
<vector>
"histogram.h"
"text.h"
1681931523 c:\users\gmack\onedrive\đŕáî÷čé ńňîë\lab01\lab_01\text.h
<vector>
1681931475 source:c:\users\gmack\onedrive\đŕáî÷čé ńňîë\lab01\lab_01\text.cpp
<math.h>
<iostream>
<conio.h>
<vector>
"text.h"

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_layout_file>
<FileVersion major="1" minor="0" />
<ActiveTarget name="Debug" />
<File name="main.cpp" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="564" topLine="0" />
</Cursor>
</File>
<File name="histogram.cpp" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="0" />
</Cursor>
</File>
<File name="text.cpp" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="362" topLine="0" />
</Cursor>
</File>
<File name="histogram_internal.h" open="1" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="0" />
</Cursor>
</File>
<File name="histogram.h" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="0" />
</Cursor>
</File>
<File name="text.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="73" topLine="0" />
</Cursor>
</File>
</CodeBlocks_layout_file>

@ -31,6 +31,12 @@
<Compiler>
<Add option="-Wall" />
</Compiler>
<Unit filename="doctest.h">
<Option target="&lt;{~None~}&gt;" />
</Unit>
<Unit filename="histogram.cpp" />
<Unit filename="histogram_internal.h" />
<Unit filename="unittest.cpp" />
<Extensions>
<lib_finder disable_auto="1" />
</Extensions>

@ -0,0 +1,17 @@
#define DOCTEST_CONFIG_NO_MULTITHREADING
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
#include "doctest.h"
#include "histogram_internal.h"
#include <vector>
#include <iostream>
TEST_CASE("distinct positive numbers") {
double min = 0;
double max = 0;
std::vector<double>v{1};
CHECK(v.size() != 0);
CHECK(v.size() != 1);
find_minmax(v, min, max);
CHECK(min == 1);
CHECK(max == 2);
CHECK(min != max);
}

@ -0,0 +1,15 @@
# depslib dependency file v1.0
1682090965 source:c:\users\gmack\onedrive\ðàáî÷èé ñòîë\lab01\lab_01\histogram.cpp
<math.h>
<iostream>
<conio.h>
<vector>
"histogram.h"
"histogram_internal.h"
1681931103 c:\users\gmack\onedrive\ðàáî÷èé ñòîë\lab01\lab_01\histogram.h
<vector>
1682091658 c:\users\gmack\onedrive\ðàáî÷èé ñòîë\lab01\lab_01\histogram_internal.h
<vector>

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_layout_file>
<FileVersion major="1" minor="0" />
<ActiveTarget name="Debug" />
<File name="doctest.h" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="0" />
</Cursor>
</File>
<File name="histogram_internal.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="97" topLine="0" />
</Cursor>
</File>
<File name="histogram.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="23" />
</Cursor>
</File>
<File name="unittest.cpp" open="1" top="1" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="414" topLine="0" />
</Cursor>
</File>
</CodeBlocks_layout_file>
Загрузка…
Отмена
Сохранить