diff options
| author | Michael Mc Donnell <michael@mcdonnell.dk> | 2020-02-20 16:01:08 -0800 |
|---|---|---|
| committer | Michael Mc Donnell <michael@mcdonnell.dk> | 2020-02-21 08:04:16 -0800 |
| commit | e1c8c8cf63b48c798c1954749e58e99c6cc50093 (patch) | |
| tree | 6ea879f51f1121b58fff5587550f0ed359cb3184 /src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs | |
| parent | 212aa3ea28d91a97d1e1261709c0b6e6790788e6 (diff) | |
| download | rust-e1c8c8cf63b48c798c1954749e58e99c6cc50093.tar.gz rust-e1c8c8cf63b48c798c1954749e58e99c6cc50093.zip | |
Test `Duration::new` panics on overflow
A `Duration` is created from a second and nanoseconds variable. The documentation says: "This constructor will panic if the carry from the nanoseconds overflows the seconds counter". This was, however, not tested in the tests. I doubt the behavior will ever regress, but it is usually a good idea to test all documented behavior.
Diffstat (limited to 'src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs')
0 files changed, 0 insertions, 0 deletions
