mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 00:14:32 -08:00
[kutil] Add sorted insert to kutil::vector
Added a sorted insert to vector, as well as cleaning up and extending the removal functions.
This commit is contained in:
@@ -5,22 +5,12 @@
|
||||
#include <vector>
|
||||
#include "kutil/linked_list.h"
|
||||
#include "catch.hpp"
|
||||
#include "container_helpers.h"
|
||||
|
||||
using namespace kutil;
|
||||
|
||||
const int test_list_size = 100;
|
||||
|
||||
struct unsortableT {
|
||||
int value;
|
||||
};
|
||||
|
||||
struct sortableT {
|
||||
int value;
|
||||
int compare(const sortableT *other) {
|
||||
return value - other->value;
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
class ListVectorCompare :
|
||||
public Catch::MatcherBase<std::vector<list_node<T>>>
|
||||
|
||||
Reference in New Issue
Block a user