molgfx-core 0.2.0

The semantic scene graph: columnar tables, GPU record layouts, the borrowed coordinate seam.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use super::*;

#[test]
fn footprint_totals_use_checked_arithmetic() {
    let footprint = ChunkFootprint::new(1, 2, 3, 4);
    assert_eq!(footprint.total_bytes(), Ok(10));
}

#[test]
fn footprint_overflow_is_a_typed_error() {
    let footprint = ChunkFootprint::new(u64::MAX, 1, 0, 0);
    assert_eq!(
        footprint.total_bytes(),
        Err(DatasetError::FootprintOverflow)
    );
}