Skip to content
Snippets Groups Projects
Commit 1e2e2ec1 authored by MrGVSV's avatar MrGVSV
Browse files

Added test case for multiplication

parent 75400218
No related branches found
No related tags found
No related merge requests found
...@@ -161,4 +161,18 @@ mod tests { ...@@ -161,4 +161,18 @@ mod tests {
let edge: Edge<f32> = expected.0.into(); let edge: Edge<f32> = expected.0.into();
assert_eq!(expected, edge.into_tuple()); assert_eq!(expected, edge.into_tuple());
} }
#[test]
fn multiplication_should_work_on_edges() {
let expected = (10.0, 20.0, 30.0, 40.0);
let mut corner= Edge::new(1.0, 2.0, 3.0, 4.0);
// Basic multiplication
let multiplied = corner * 10.0;
assert_eq!(expected, multiplied.into_tuple());
// Multiply and assign
corner *= 10.0;
assert_eq!(expected, corner.into_tuple());
}
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment