This test offers the same functionality as `TestAddItem`.
Reviewed-on: #8
Co-authored-by: M.V. Hutz <git@maximhutz.me>
Co-committed-by: M.V. Hutz <git@maximhutz.me>
Currently, the `Table.Drop()` function is deprecated because it is not implemented yet. Let's add that functionality.
- Adds true drop functionality to the table, through `Table.Drop()`.
- Adds tests for functionality.
- Rewrites fuzz test using `go_fuzz_utils`, to test arbitrary usage patterns.
- Rewrite `bucket` to allow a capacity of zero.
- Rename `Table.Capacity()` to `Table.TotalCapacity()`, to reflect to different between the capacity of the buckets vs. the whole table.
- Enforce 100% mutation test coverage.
Reviewed-on: #6
Co-authored-by: M.V. Hutz <git@maximhutz.me>
Co-committed-by: M.V. Hutz <git@maximhutz.me>
Currently, there is no CI job to lint the Makefile. This adds one.
Reviewed-on: #5
Co-authored-by: M.V. Hutz <git@maximhutz.me>
Co-committed-by: M.V. Hutz <git@maximhutz.me>
Currently, the `Makefile` is not well structured, and does not follow best practices. With the help of [`checkmake`](https://github.com/checkmake/checkmake), the Makefile can be forced to follow them.
### Decisions
- Added CI job `lint-makefile`, which forces the Makefile to conform to standards.
- The `make help` was set as the default target. This is common practice in the industry.
- The `make help` uses `grep` | `awk` to create a command table from `##` comments after each target. It seems a bit icky, but it is something that Docker, Kubernetes, and Helm all do.
Reviewed-on: #4
Co-authored-by: M.V. Hutz <git@maximhutz.me>
Co-committed-by: M.V. Hutz <git@maximhutz.me>
## Description
The current CI workflow was auto-generated by Claude, and is really not intuitive. Fixing it up to make it work better.
- Add names for jobs in workflow.
- Rename workflow to `ci.yml`.
- Added `go mod tidy` as a tasks in the `lint` job.
### Decisions
- Chose not to use emojis for workflow or job names. While they look nice, they are unprofessional, and harder to `grep`.
Reviewed-on: #3
Co-authored-by: M.V. Hutz <git@maximhutz.me>
Co-committed-by: M.V. Hutz <git@maximhutz.me>
The `ExampleEqualFunc_badEqualFunc` was non-deterministic, because the hashes used in the `CustomTable` could (by chance) map "Rob" and "Robert" to the same slot.
- Updated the test to use a deterministic hash.
Reviewed-on: #2
Co-authored-by: M.V. Hutz <git@maximhutz.me>
Co-committed-by: M.V. Hutz <git@maximhutz.me>
Moved the implementation of this hash table from `tools/dsa` #1.
Reviewed-on: #1
Co-authored-by: M.V. Hutz <git@maximhutz.me>
Co-committed-by: M.V. Hutz <git@maximhutz.me>