Sha256: a51ef54ff3f66129ccba45d0b62e825d78c8cc751a98420f313cb48aebebea5f
Contents?: true
Size: 1.02 KB
Versions: 34
Compression:
Stored size: 1.02 KB
Contents
import org.scalatest.{Matchers, FlatSpec} class TriangleTest extends FlatSpec with Matchers { it should "calc Equilateral" in { Triangle(2, 2, 2).triangleType should equal(TriangleType.Equilateral) } it should "calc Equilateral2" in { Triangle(10, 10, 10).triangleType should equal(TriangleType.Equilateral) } it should "calc Isosceles" in { Triangle(3, 4, 4).triangleType should equal(TriangleType.Isosceles) } it should "calc Isosceles2" in { Triangle(4, 3, 4).triangleType should equal(TriangleType.Isosceles) } it should "calc Scalene" in { Triangle(3, 4, 5).triangleType should equal(TriangleType.Scalene) } it should "calc Illogical" in { Triangle(1, 1, 50).triangleType should equal(TriangleType.Illogical) } it should "calc Illogical with zero length side" in { Triangle(0, 2, 1).triangleType should equal(TriangleType.Illogical) } it should "calc Illogical with negative length side" in { Triangle(1, 1, -1).triangleType should equal(TriangleType.Illogical) } }
Version data entries
34 entries across 34 versions & 1 rubygems