Skip to content

Commit

Permalink
test: improve coverage for unit/unit.mbt
Browse files Browse the repository at this point in the history
**Disclaimer:** This PR was generated by an LLM agent as part of an experiment.

## Summary

```
coverage of `unit/unit.mbt`: 66.7% -> 100%
```
  • Loading branch information
rami3l committed Jan 23, 2025
1 parent 1c00d13 commit f6095c3
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions unit/unit_test.mbt
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,16 @@ test {
let unit = ()
assert_eq!(unit.hash(), 0)
}

test "Unit hash_combine test" {
let hasher = Hasher::new()
let _ = Hash::hash_combine((), hasher)
let hash1 = hasher.finalize()
let hasher2 = Hasher::new()
assert_not_eq!(hash1, hasher2.finalize())
}

test "Unit::default returns unit value" {
let unit = Unit::default()
inspect!(unit, content="()")
}

0 comments on commit f6095c3

Please sign in to comment.