Commit ab51aa67 authored by Ari Trachtenberg's avatar Ari Trachtenberg
Browse files

bugs

parent f03a0894
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ static bool sameFilter(const Bloom<length>& a, const Bloom<length>& b) {
bool test_0() {
  const char* T = "Empty bloom should not contain an arbitrary fresh item";

  myBloom<16> bloom;
  MyBloom<16> bloom;

  // For an empty Bloom filter, exists should definitely be false
  // because no bits have been set yet.
@@ -51,7 +51,7 @@ bool test_0() {
bool test_1() {
  const char* T = "Inserted items should always exist";

  myBloom<16> bloom;
  MyBloom<16> bloom;

  bloom.insert("apple");
  bloom.insert("banana");
@@ -76,7 +76,7 @@ bool test_1() {
bool test_2() {
  const char* T = "Bloom reconstructed from filter should preserve membership";

  myBloom<16> original;
  MyBloom<16> original;
  original.insert("dog");
  original.insert("cat");
  original.insert("mouse");
@@ -113,7 +113,7 @@ bool test_2() {
bool test_3() {
  const char* T = "makeBloom() should create an empty bloom";

  myBloom<16> original;
  MyBloom<16> original;
  original.insert("apple");

  unique_ptr< Bloom<16> > fresh = original.makeBloom();
@@ -134,7 +134,7 @@ bool test_3() {
bool test_4() {
  const char* T = "Earlier inserted items should still exist after later insertions";

  myBloom<32> bloom;
  MyBloom<32> bloom;

  bloom.insert("alpha");
  bloom.insert("beta");
@@ -170,7 +170,7 @@ bool test_5() {

  const char* T = "Bloom filter should have no false negatives";

  myBloom<32> bf;
  MyBloom<32> bf;

  // elements inserted
  std::vector<std::string> inserted = {