This is an example on how to use the sort method.
#include "Test.h"
class SortTestCase : public Test
{
bool TestSort() {
std::vector<double> in = { -1.0, 2, 5, 3, 9, 0, 4 };
std::vector<double> expected = { -1, 0, 2, 3, 4, 5, 9 };
AssertEqual(
sort(in), expected);
return true;
}
public:
virtual void run() { TestSort(); }
};
int main() {
SortTestCase().run();
return 0;
}
std::vector< T > sort(const std::vector< T > &in)
Definition: sorting.h:33