Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Complete TDD-based unit tests #1

Closed
3 tasks done
Echelon9 opened this issue Jul 7, 2014 · 3 comments
Closed
3 tasks done

Complete TDD-based unit tests #1

Echelon9 opened this issue Jul 7, 2014 · 3 comments
Assignees

Comments

@Echelon9
Copy link
Owner

Echelon9 commented Jul 7, 2014

@Echelon9 Echelon9 self-assigned this Jul 7, 2014
@Echelon9
Copy link
Owner Author

These presently pass for all but one unit test, which relates to the BloomFilter.size() method.

InlineRunner.RunSuite Specs, ShowFailureDetails:=True, ShowPassed:=True, ShowSuiteDetails:=True

= FAIL (1 of 6 failed) = 24/09/2014 11:53:34 PM =========================
X BloomFilter
  + basic bloom filter
  + jabberwocky
  + basic uint32
  + wtf
  + works with integer types
  X size
    Expected -1 to be close to 97.014763
    Expected -1 to be close to 1007.54932
===

@Echelon9
Copy link
Owner Author

Now that the full complement of unit tests pass, it's time to build a script harness so the testing environment, dependencies and tests themselves can be run with (hopefully) one commandline invocation.

InlineRunner.RunSuite Specs, ShowFailureDetails:=True, ShowPassed:=True, ShowSuiteDetails:=True

= PASS (6 of 6 passed) = 28/10/2014 8:23:53 PM =========================
+ BloomFilter
  + basic bloom filter
  + jabberwocky
  + basic uint32
  + wtf
  + works with integer types
  + size
===

Echelon9 added a commit that referenced this issue Mar 9, 2015
Adds a unit test for known collisions with the FNV-1a hash. See Issue #1.
 
This unit test is algorithm-specific, not Bloom-filter specific. Thus the unit test is expected to fail if the underlying hash function is changed in future for any reason (i.e. to Murmur2).
@Echelon9
Copy link
Owner Author

Echelon9 commented Mar 9, 2015

Post 9d5e6fe a successful unit test run looks like:

InlineRunner.RunSuite Specs, ShowFailureDetails:=True, ShowPassed:=True, ShowSuiteDetails:=True

= PASS (7 of 7 passed) = 9/03/2015 6:22:18 PM =========================
+ BloomFilter
  + basic bloom filter
  + jabberwocky
  + basic uint32
  + wtf
  + works with integer types
  + size
  + FNV-1a hash known collisions
===

Run with Microsoft Office Excel 2007 (12.0.6715.5000) SP3 MSO (12.0.6683.5000) on Windows 7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant