code: the final version of lab03 var3

main
BaranovEK 11 месяцев назад
Родитель 29099c717e
Сommit bfb3f8cf9c

@ -32,7 +32,14 @@
<Add option="-Wall" />
<Add option="-fexceptions" />
</Compiler>
<Unit filename="histogram.cpp" />
<Unit filename="histogram.h" />
<Unit filename="histogram_internal.h" />
<Unit filename="main.cpp" />
<Unit filename="svg.cpp" />
<Unit filename="svg.h" />
<Unit filename="text.cpp" />
<Unit filename="text.h" />
<Extensions />
</Project>
</CodeBlocks_project_file>

@ -7,7 +7,7 @@
1716797551 c:\users\lenov\desktop\lab03\histogram.h
<vector>
1716817439 source:c:\users\lenov\desktop\lab03\main.cpp
1717268069 source:c:\users\lenov\desktop\lab03\main.cpp
<iostream>
<vector>
"histogram.h"
@ -17,15 +17,15 @@
1716798974 c:\users\lenov\desktop\lab03\text.h
<vector>
1716799035 source:c:\users\lenov\desktop\lab03\text.cpp
1717261318 source:c:\users\lenov\desktop\lab03\text.cpp
<iostream>
"text.h"
<vector>
1716817390 c:\users\lenov\desktop\lab03\svg.h
1716819918 c:\users\lenov\desktop\lab03\svg.h
<vector>
1716817410 source:c:\users\lenov\desktop\lab03\svg.cpp
1716819750 source:c:\users\lenov\desktop\lab03\svg.cpp
<iostream>
<vector>
<string>

@ -25,6 +25,10 @@ input_data() {
cin>> in.bin_count;
cerr << "Enter column hight: ";
cin >> in.COLUMN_HIGHT;
while (in.COLUMN_HIGHT <=0 ){
cerr << "The height of the column can only be positive, try again: ";
cin >> in.COLUMN_HIGHT;
}
return in;
}

@ -31,6 +31,13 @@
<Compiler>
<Add option="-Wall" />
</Compiler>
<Unit filename="doctest.h" />
<Unit filename="histogram.cpp" />
<Unit filename="histogram.h" />
<Unit filename="svg.cpp" />
<Unit filename="svg.h" />
<Unit filename="unittest.cbp" />
<Unit filename="unittest.cpp" />
<Extensions>
<lib_finder disable_auto="1" />
</Extensions>

@ -37,10 +37,17 @@ TEST_CASE("same numbers") {
TEST_CASE("distinct positive numbers") {
double COLUMN_height = 400;
TEST_CASE("Image height < column height") {
double COLUMN_height = 220000;
COLUMN_hight_function(COLUMN_height ,5,{23,5,54,6,7});
CHECK(COLUMN_height == 140 );
}
TEST_CASE("Image height > column height ") {
double COLUMN_height = 100;
COLUMN_hight_function(COLUMN_height ,5,{23,5,54,6,7});
CHECK(COLUMN_height == 150 );
CHECK(COLUMN_height == 100 );
}

@ -7,7 +7,7 @@
1716797551 c:\users\lenov\desktop\lab03\histogram.h
<vector>
1716819750 source:c:\users\lenov\desktop\lab03\unittest.cpp
1716828332 source:c:\users\lenov\desktop\lab03\unittest.cpp
"doctest.h"
"histogram_internal.h"
"svg.h"

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_layout_file>
<FileVersion major="1" minor="0" />
<ActiveTarget name="Debug" />
</CodeBlocks_layout_file>
Загрузка…
Отмена
Сохранить