Родитель
5f528767f2
Сommit
0a815d481d
@ -0,0 +1,8 @@
|
||||
#ifndef HISTOGRAM_INTERNAL_H_INCLUDED
|
||||
#define HISTOGRAM_INTERNAL_H_INCLUDED
|
||||
|
||||
#include <vector>
|
||||
|
||||
void find_minmax(const std::vector <double> &numbers, double &min, double &max)
|
||||
|
||||
#endif // HISTOGRAM_INTERNAL_H_INCLUDED
|
@ -0,0 +1,12 @@
|
||||
#define DOCTEST_CONFIG_NO_MULTITHREADING
|
||||
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
|
||||
#include "doctest.h"
|
||||
#include "histogram_internal.h"
|
||||
|
||||
TEST_CASE("distinct positive numbers") {
|
||||
double min = 0;
|
||||
double max = 0;
|
||||
find_minmax({1, 2}, min, max);
|
||||
CHECK(min == 1);
|
||||
CHECK(max == 2);
|
||||
}
|
Загрузка…
Ссылка в новой задаче