Skip to content

Commit

Permalink
Merge pull request exercism#852 from CGMossa/patch-1
Browse files Browse the repository at this point in the history
triangle: added tests for only one side being zero
  • Loading branch information
coriolinus authored Aug 14, 2019
2 parents cb8c39d + d77a1ed commit 53573f8
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions exercises/triangle/tests/triangle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,30 @@ fn zero_length_sides_are_illegal() {
assert!(triangle.is_none());
}

#[test]
#[ignore]
fn one_length_zero_side_first() {
let sides = [0, 2, 2];
let triangle = Triangle::build(sides);
assert!(triangle.is_none());
}

#[test]
#[ignore]
fn one_length_zero_side_second() {
let sides = [2, 0, 2];
let triangle = Triangle::build(sides);
assert!(triangle.is_none());
}

#[test]
#[ignore]
fn one_length_zero_side_third() {
let sides = [2, 2, 0];
let triangle = Triangle::build(sides);
assert!(triangle.is_none());
}

#[test]
#[ignore]
fn equilateral_triangles_have_equal_sides() {
Expand Down

0 comments on commit 53573f8

Please sign in to comment.