File: simple_arithmetic.rs

package info (click to toggle)
rust-datetime 0.5.2-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 728 kB
  • sloc: ruby: 18; makefile: 6
file content (13 lines) | stat: -rw-r--r-- 250 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
extern crate datetime;
use datetime::{Instant, Duration};


#[test]
fn addition() {
    assert_eq!(Instant::at(10), Instant::at(3) + Duration::of(7))
}

#[test]
fn subtraction() {
    assert_eq!(Instant::at(20), Instant::at(50) - Duration::of(30))
}