build: обновление файлов

master
IvanovDA 12 месяцев назад
Родитель 5fc0143694
Сommit 617664ec0e

@ -3,7 +3,7 @@
#include "histogram.h" #include "histogram.h"
using namespace std; using namespace std;
void bool
find_minmax(const vector<double>& numbers, double& min, double& max) { find_minmax(const vector<double>& numbers, double& min, double& max) {
min = numbers[0]; min = numbers[0];
for (size_t i = 1; i < numbers.size(); i++) { for (size_t i = 1; i < numbers.size(); i++) {

@ -2,5 +2,5 @@
#include <vector> #include <vector>
void bool
find_minmax(const std::vector<double>& numbers, double& min, double& max); find_minmax(const std::vector<double>& numbers, double& min, double& max);

@ -2,6 +2,9 @@
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN #define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
#include "doctest.h" #include "doctest.h"
#include "histogram_internal.h" #include "histogram_internal.h"
#include "svg.h"
#include <string>
#include <fstream>
TEST_CASE("distinct positive numbers") { TEST_CASE("distinct positive numbers") {
double min = 0; double min = 0;
@ -23,4 +26,23 @@ TEST_CASE("all numbers are same") {
find_minmax({ 1, 1, 1, 1, 1, 1, 1, }, min, max); find_minmax({ 1, 1, 1, 1, 1, 1, 1, }, min, max);
CHECK(min == 1); CHECK(min == 1);
CHECK(max == 1); CHECK(max == 1);
}
TEST_CASE("all numbers are same") {
double min = 0;
double max = 0;
CHECK(!find_minmax({}, min, max));
}
TEST_CASE("histogram for exclusive variant is correct") {
std::fstream in, compare;
std::string line, compline;
bool flag = 0;
in.open("result.txt");
compare.open("compare.txt");
while (std::getline(in, line) && std::getline(compare, compline) && !flag) {
if (line != compline) {
flag = 1;
}
}
CHECK(flag == 0);
} }

Двоичный файл не отображается.

@ -1,2 +1,21 @@
 unittest.cpp  histogram.cpp
cs-project3.vcxproj -> C:\Users\justygrass\Desktop\progs\2_sem\3la\cs-project3\unittest\x64\Debug\cs-project3.exe unittest.cpp
C:\Users\justygrass\Desktop\progs\2_sem\3la\cs-project3\unittest\cs-project3\doctest.h(1527,9): warning C4805: ==: небезопасное смешение типа "bool" и типа "T" в операции
C:\Users\justygrass\Desktop\progs\2_sem\3la\cs-project3\unittest\cs-project3\doctest.h(1527,9): warning C4805: with
C:\Users\justygrass\Desktop\progs\2_sem\3la\cs-project3\unittest\cs-project3\doctest.h(1527,9): warning C4805: [
C:\Users\justygrass\Desktop\progs\2_sem\3la\cs-project3\unittest\cs-project3\doctest.h(1527,9): warning C4805: T=int
C:\Users\justygrass\Desktop\progs\2_sem\3la\cs-project3\unittest\cs-project3\doctest.h(1527,9): warning C4805: ]
(компиляция исходного файла "unittest.cpp")
C:\Users\justygrass\Desktop\progs\2_sem\3la\cs-project3\unittest\cs-project3\doctest.h(1527,9):
контекст создания экземпляра шаблона (сначала самый старый)
C:\Users\justygrass\Desktop\progs\2_sem\3la\cs-project3\unittest\cs-project3\unittest.cpp(47,5):
выполняется компиляция ссылки на экземпляр шаблон функции "doctest::detail::Result doctest::detail::Expression_lhs<bool &>::operator ==<int>(R &&)"
with
[
R=int
]
C:\Users\justygrass\Desktop\progs\2_sem\3la\cs-project3\unittest\cs-project3\unittest.cpp(47,5):
см. первую ссылку на "doctest::detail::Expression_lhs<bool &>::operator ==" в "DOCTEST_ANON_FUNC_13"
Создание кода...
C:\Users\justygrass\Desktop\progs\2_sem\3la\cs-project3\unittest\cs-project3\histogram.cpp(17,1): error C4716: find_minmax: должна возвращать значение

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичные данные
unittest/cs-project3/x64/Debug/histogram.obj

Двоичный файл не отображается.

Двоичные данные
unittest/cs-project3/x64/Debug/unittest.obj

Двоичный файл не отображается.

Двоичные данные
unittest/cs-project3/x64/Debug/vc143.idb

Двоичный файл не отображается.

Двоичные данные
unittest/cs-project3/x64/Debug/vc143.pdb

Двоичный файл не отображается.

Двоичные данные
unittest/x64/Debug/cs-project3.pdb

Двоичный файл не отображается.
Загрузка…
Отмена
Сохранить