Сравнить коммиты
2 Коммитов
d94b3e17d9
...
68dc612a91
Автор | SHA1 | Дата |
---|---|---|
|
68dc612a91 | 2 лет назад |
|
7829d31756 | 2 лет назад |
@ -0,0 +1,10 @@
|
||||
/bin
|
||||
/obj
|
||||
/lab01.depend
|
||||
/lab01.layout
|
||||
/main.exe
|
||||
/main.o
|
||||
/unittest.depend
|
||||
/unittest.layout
|
||||
/unittest1.depend
|
||||
|
@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include <vector>
|
||||
|
||||
void
|
||||
bool
|
||||
find_minmax(const std::vector<double>& numbers, double& min1, double& max1);
|
||||
|
@ -0,0 +1,4 @@
|
||||
#pragma once
|
||||
|
||||
void
|
||||
color_find(double bin, int maxb, int& color);
|
@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<CodeBlocks_project_file>
|
||||
<FileVersion major="1" minor="6" />
|
||||
<Project>
|
||||
<Option title="unittest1" />
|
||||
<Option pch_mode="2" />
|
||||
<Option compiler="gfortran" />
|
||||
<Build>
|
||||
<Target title="Debug">
|
||||
<Option output="bin/Debug/unittest1" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="obj/Debug/" />
|
||||
<Option type="1" />
|
||||
<Option compiler="gfortran" />
|
||||
<Compiler>
|
||||
<Add option="-g" />
|
||||
</Compiler>
|
||||
</Target>
|
||||
<Target title="Release">
|
||||
<Option output="bin/Release/unittest1" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="obj/Release/" />
|
||||
<Option type="1" />
|
||||
<Option compiler="gfortran" />
|
||||
<Compiler>
|
||||
<Add option="-O2" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add option="-s" />
|
||||
</Linker>
|
||||
</Target>
|
||||
</Build>
|
||||
<Compiler>
|
||||
<Add option="-Wall" />
|
||||
</Compiler>
|
||||
<Extensions>
|
||||
<lib_finder disable_auto="1" />
|
||||
</Extensions>
|
||||
</Project>
|
||||
</CodeBlocks_project_file>
|
@ -0,0 +1,28 @@
|
||||
#define DOCTEST_CONFIG_NO_MULTITHREADING
|
||||
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
|
||||
#include "doctest.h"
|
||||
#include "svg_internal.h"
|
||||
|
||||
TEST_CASE("color standart") {
|
||||
int color = 0;
|
||||
color_find(1, 5, color);
|
||||
CHECK(color == 8);
|
||||
}
|
||||
|
||||
TEST_CASE("color equal") {
|
||||
int color = 0;
|
||||
color_find(5, 5, color);
|
||||
CHECK(color == 1);
|
||||
}
|
||||
|
||||
TEST_CASE("color sr") {
|
||||
int color = 0;
|
||||
color_find(3, 5, color);
|
||||
CHECK(color == 4);
|
||||
}
|
||||
|
||||
TEST_CASE("color nonsr") {
|
||||
int color = 0;
|
||||
color_find(7, 5, color);
|
||||
CHECK(color == 9);
|
||||
}
|
Загрузка…
Ссылка в новой задаче