Sha256: e7728099a6f37fb88578587b340c736e873e3fa700151d1472e3856e55671c35

Contents?: true

Size: 1.07 KB

Versions: 236

Compression:

Stored size: 1.07 KB

Contents

import org.scalatest.{FunSuite, Matchers}

class PythagoreanTripletTest extends FunSuite with Matchers {
  test("isPythagorean") {
    PythagoreanTriplet.isPythagorean((3, 4, 5)) should be (true)
    PythagoreanTriplet.isPythagorean((3, 5, 4)) should be (true)
    PythagoreanTriplet.isPythagorean((4, 3, 5)) should be (true)
    PythagoreanTriplet.isPythagorean((4, 5, 3)) should be (true)
    PythagoreanTriplet.isPythagorean((5, 3, 4)) should be (true)
    PythagoreanTriplet.isPythagorean((5, 4, 3)) should be (true)
    PythagoreanTriplet.isPythagorean((3, 3, 3)) should be (false)
    PythagoreanTriplet.isPythagorean((5, 6, 7)) should be (false)
  }

  test("pythagoreanTriplets 1 to 10") {
    pending
    PythagoreanTriplet.pythagoreanTriplets(1, 10) should be (Seq((3, 4, 5), (6, 8, 10)))
  }

  test("pythagoreanTriplets 11 to 20") {
    pending
    PythagoreanTriplet.pythagoreanTriplets(11, 20) should be (Seq((12, 16, 20)))
  }

  test("pythagoreanTriplets 56 to 95") {
    pending
    PythagoreanTriplet.pythagoreanTriplets(56, 95) should be (Seq((57, 76, 95), (60, 63, 87)))
  }
}

Version data entries

236 entries across 236 versions & 1 rubygems

Version Path
trackler-2.2.1.30 tracks/scala/exercises/pythagorean-triplet/src/test/scala/PythagoreanTripletTest.scala
trackler-2.2.1.29 tracks/scala/exercises/pythagorean-triplet/src/test/scala/PythagoreanTripletTest.scala
trackler-2.2.1.28 tracks/scala/exercises/pythagorean-triplet/src/test/scala/PythagoreanTripletTest.scala
trackler-2.2.1.27 tracks/scala/exercises/pythagorean-triplet/src/test/scala/PythagoreanTripletTest.scala
trackler-2.2.1.26 tracks/scala/exercises/pythagorean-triplet/src/test/scala/PythagoreanTripletTest.scala
trackler-2.2.1.25 tracks/scala/exercises/pythagorean-triplet/src/test/scala/PythagoreanTripletTest.scala
trackler-2.2.1.24 tracks/scala/exercises/pythagorean-triplet/src/test/scala/PythagoreanTripletTest.scala
trackler-2.2.1.23 tracks/scala/exercises/pythagorean-triplet/src/test/scala/PythagoreanTripletTest.scala
trackler-2.2.1.22 tracks/scala/exercises/pythagorean-triplet/src/test/scala/PythagoreanTripletTest.scala
trackler-2.2.1.21 tracks/scala/exercises/pythagorean-triplet/src/test/scala/PythagoreanTripletTest.scala
trackler-2.2.1.20 tracks/scala/exercises/pythagorean-triplet/src/test/scala/PythagoreanTripletTest.scala
trackler-2.2.1.19 tracks/scala/exercises/pythagorean-triplet/src/test/scala/PythagoreanTripletTest.scala
trackler-2.2.1.18 tracks/scala/exercises/pythagorean-triplet/src/test/scala/PythagoreanTripletTest.scala
trackler-2.2.1.17 tracks/scala/exercises/pythagorean-triplet/src/test/scala/PythagoreanTripletTest.scala
trackler-2.2.1.16 tracks/scala/exercises/pythagorean-triplet/src/test/scala/PythagoreanTripletTest.scala
trackler-2.2.1.15 tracks/scala/exercises/pythagorean-triplet/src/test/scala/PythagoreanTripletTest.scala
trackler-2.2.1.14 tracks/scala/exercises/pythagorean-triplet/src/test/scala/PythagoreanTripletTest.scala
trackler-2.2.1.13 tracks/scala/exercises/pythagorean-triplet/src/test/scala/PythagoreanTripletTest.scala
trackler-2.2.1.12 tracks/scala/exercises/pythagorean-triplet/src/test/scala/PythagoreanTripletTest.scala
trackler-2.2.1.11 tracks/scala/exercises/pythagorean-triplet/src/test/scala/PythagoreanTripletTest.scala