23int test_data[] = {8, 1, 2, -4, 7, 9, 65536, 4, 9, 0};
29 std::locale::global(std::locale(
""));
50 std::sort(v->begin(), v->end());
52 EXPECT_LT((*v)[0].key(), v->back().key());
53 for (
unsigned i = 0;
i < v->size(); ++
i) {
56 if (
i + 1 < v->size() && (*v)[
i + 1].key() == (*v)[
i].key()) {
57 while (
i + 1 < v->size() && (*v)[
i + 1].key() == (*v)[
i].key()) {
87 PushTestData(&heap, &v);
88 VerifyHeapVectorMatch(&heap, &v);
98 PushTestData(&heap, &v);
100 std::sort(v.begin(), v.end());
101 for (
int i = 0;
i < 5; ++
i) {
106 PushTestData(&heap, &v);
108 VerifyHeapVectorMatch(&heap, &v);
117 PushTestData(&heap, &v);
124 std::sort(v.begin(), v.end());
125 v.resize(v.size() - 1);
127 VerifyHeapVectorMatch(&heap, &v);
137 std::vector<PtrPair> v;
144 h_pair.data().Connect(&v_pair.data());
154 auto *pair_ptr =
reinterpret_cast<PtrPair *
>(v[0].data().OtherEnd());
155 pair_ptr->key() = v[0].key();
159 pair_ptr =
reinterpret_cast<PtrPair *
>(v[1].data().OtherEnd());
160 pair_ptr->key() = v[1].key();
164 std::sort(v.begin(), v.end());
178static void ConstRefTest(
const DoublePtr& ptr1) {
179 DoublePtr ptr2(ptr1);
180 EXPECT_EQ(&ptr2, ptr2.OtherEnd()->OtherEnd());
#define EXPECT_EQ(val1, val2)
#define EXPECT_GT(val1, val2)
#define EXPECT_TRUE(condition)
#define EXPECT_FALSE(condition)
#define EXPECT_LT(val1, val2)
constexpr size_t countof(T const (&)[N]) noexcept
TEST_F(EuroText, FastLatinOCR)
bool PopWorst(Pair *entry)
const Pair & PeekTop() const
void Reshuffle(Pair *pair)
DoublePtr * OtherEnd() const
void Connect(DoublePtr *other)
void VerifyHeapVectorMatch(GenericHeap< IntKDPair > *heap, KDVector *v)
void PushTestData(GenericHeap< IntKDPair > *heap, KDVector *v)