Skip to content

Commit

Permalink
add arc write test
Browse files Browse the repository at this point in the history
  • Loading branch information
brettfo committed Dec 4, 2022
1 parent 36a022a commit d254fc7
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/entity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2718,6 +2718,27 @@ mod tests {
}
}

#[test]
fn write_arc() {
let arc = Arc::new(Point::new(1.0, 2.0, 3.0), 4.0, 90.0, 180.0);
let ent = Entity::new(EntityType::Arc(arc));
let mut drawing = Drawing::new();
drawing.add_entity(ent);
assert_contains_pairs(
&drawing,
vec![
CodePair::new_str(100, "AcDbCircle"),
CodePair::new_f64(10, 1.0),
CodePair::new_f64(20, 2.0),
CodePair::new_f64(30, 3.0),
CodePair::new_f64(40, 4.0),
CodePair::new_str(100, "AcDbArc"),
CodePair::new_f64(50, 90.0),
CodePair::new_f64(51, 180.0),
],
);
}

#[test]
fn write_dimension() {
let dim = RadialDimension {
Expand Down

0 comments on commit d254fc7

Please sign in to comment.