about summary refs log tree commit diff
path: root/src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs
diff options
context:
space:
mode:
authorMichael Mc Donnell <michael@mcdonnell.dk>2020-02-20 16:01:08 -0800
committerMichael Mc Donnell <michael@mcdonnell.dk>2020-02-21 08:04:16 -0800
commite1c8c8cf63b48c798c1954749e58e99c6cc50093 (patch)
tree6ea879f51f1121b58fff5587550f0ed359cb3184 /src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs
parent212aa3ea28d91a97d1e1261709c0b6e6790788e6 (diff)
downloadrust-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