• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

facet-rs / facet / 19902770885
58%

Build:
DEFAULT BRANCH: main
Ran 03 Dec 2025 05:25PM UTC
Jobs 1
Files 171
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

03 Dec 2025 05:23PM UTC coverage: 59.013% (+0.1%) from 58.902%
19902770885

push

github

fasterthanlime
Add floating-point tolerance options to assert_same via builder pattern

Implements #1009: Adds a new `SameOptions` builder and `assert_same_with!`
macro to support floating-point tolerance in structural comparisons.

Key changes:
- Add `SameOptions` struct with `float_tolerance(f64)` builder method
- Add `check_same_with()` function that accepts options
- Add `assert_same_with!` and `debug_assert_same_with!` macros
- Update `Differ` to hold options and use tolerance when comparing floats
- Support tolerance for both f32 and f64 scalar types
- Support tolerance in DynamicValue number comparisons

Example usage:
```rust
use facet_assert::{assert_same_with, SameOptions};

let a = 1.0000001_f64;
let b = 1.0000002_f64;

// With tolerance:
assert_same_with!(a, b, SameOptions::new().float_tolerance(1e-6));
```

The builder pattern allows for future extensibility without breaking changes.

110 of 121 new or added lines in 2 files covered. (90.91%)

20694 of 35067 relevant lines covered (59.01%)

537.93 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
4
94.81
-0.27% facet-assert/src/lib.rs
7
53.13
2.53% facet-assert/src/same.rs
Jobs
ID Job ID Ran Files Coverage
1 19902770885.1 03 Dec 2025 05:25PM UTC 171
59.01
GitHub Action Run
Source Files on build 19902770885
  • Tree
  • List 171
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 08974f64 on github
  • Prev Build on main (#19894536989)
  • Next Build on main (#19903754435)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc