livesplit-core 0.13.0

livesplit-core is a library that provides a lot of functionality for creating a speedrun timer.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::run::{ComparisonError, Run};

#[test]
fn adding_a_new_comparison_works() {
    let mut run = Run::new();
    let c = run.add_custom_comparison("My Comparison");
    assert_eq!(c, Ok(()));
}

#[test]
fn adding_a_duplicate_fails() {
    let mut run = Run::new();
    let c = run.add_custom_comparison("Best Segments");
    assert_eq!(c, Err(ComparisonError::DuplicateName));
}