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