From d69c289e172562039bcbe987657280332ab6315e Mon Sep 17 00:00:00 2001 From: Paul Baltescu Date: Fri, 22 Feb 2013 11:59:17 +0000 Subject: Remove original version of the intersector. --- extractor/veb_test.cc | 56 --------------------------------------------------- 1 file changed, 56 deletions(-) delete mode 100644 extractor/veb_test.cc (limited to 'extractor/veb_test.cc') diff --git a/extractor/veb_test.cc b/extractor/veb_test.cc deleted file mode 100644 index c40c9f28..00000000 --- a/extractor/veb_test.cc +++ /dev/null @@ -1,56 +0,0 @@ -#include - -#include -#include - -#include "veb.h" - -using namespace std; - -namespace { - -class VEBTest : public ::testing::Test { - protected: - void VEBSortTester(vector values, int max_value) { - shared_ptr veb = VEB::Create(max_value); - for (int value: values) { - veb->Insert(value); - } - - sort(values.begin(), values.end()); - EXPECT_EQ(values.front(), veb->GetMinimum()); - EXPECT_EQ(values.back(), veb->GetMaximum()); - for (size_t i = 0; i + 1 < values.size(); ++i) { - EXPECT_EQ(values[i + 1], veb->GetSuccessor(values[i])); - } - EXPECT_EQ(-1, veb->GetSuccessor(values.back())); - } -}; - -TEST_F(VEBTest, SmallRange) { - vector values{8, 13, 5, 1, 4, 15, 2, 10, 6, 7}; - VEBSortTester(values, 16); -} - -TEST_F(VEBTest, MediumRange) { - vector values{167, 243, 88, 12, 137, 199, 212, 45, 150, 189}; - VEBSortTester(values, 255); -} - -TEST_F(VEBTest, LargeRangeSparse) { - vector values; - for (size_t i = 0; i < 100; ++i) { - values.push_back(i * 1000000); - } - VEBSortTester(values, 100000000); -} - -TEST_F(VEBTest, LargeRangeDense) { - vector values; - for (size_t i = 0; i < 1000000; ++i) { - values.push_back(i); - } - VEBSortTester(values, 1000000); -} - -} // namespace -- cgit v1.2.3