Last active
April 10, 2021 08:40
-
-
Save mmaridev/d4eb9c594ac54cc0be5d35b3216f5ccf to your computer and use it in GitHub Desktop.
add test for perimeter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
void trianglePerimeterTest() { | |
// Copyright (C) Marco Marinello <[email protected]> | |
assertTrue(new Triangle(new Point(6,4), new Point(14,4), new Point(6,10)).perimeter() == 24); | |
assertTrue(new Triangle(new Point(6,10), new Point(6,4), new Point(14,4)).perimeter() == 24); | |
assertTrue(new Triangle(new Point(14,4), new Point(6,10), new Point(6,4)).perimeter() == 24); | |
assertTrue(new Triangle(new Point(30,15), new Point(45,35), new Point(60,15)).perimeter() == 80); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
nice one 👍