cadmpeg-ir 0.6.2

CAD data model, validation, diffing, and codec API for cadmpeg.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// SPDX-License-Identifier: Apache-2.0

use super::{AnnotationBuilder, Exactness};

const ID: &str = "test:model:point#exactness";

#[test]
fn entity_exactness_moves_an_owned_identity() {
    let identity = ID.to_owned();
    let pointer = identity.as_ptr();
    let mut builder = AnnotationBuilder::new();
    builder.exactness_owned(identity, Exactness::Derived);
    let (identity, note) = builder.annotations().exactness().first_key_value().unwrap();
    assert_eq!(identity.as_ptr(), pointer);
    assert_eq!(identity, ID);
    assert_eq!(note.entity(), Exactness::Derived);
}