Sha256: 95d8765af0ca3e8a02e9e5b5b63ff7643d0a6c3bd0840c851322de3981a2e3e1

Contents?: true

Size: 762 Bytes

Versions: 223

Compression:

Stored size: 762 Bytes

Contents

import org.scalatest.{Matchers, FlatSpec}

class SaddlePointsSpecs extends FlatSpec with Matchers {
  it should "handle one saddle" in {
    val points = Matrix(List(List(9, 8, 7), List(5, 3, 2), List(6, 6, 7))).saddlePoints
    points should be (Set((1, 0)))
  }

  it should "handle multiple saddles" in {
    pending
    val points = Matrix(List(List(5, 3, 5, 4), List(6, 4, 7, 3), List(5, 1, 5, 3))).saddlePoints
    points should be (Set((0, 0), (0, 2), (2, 0), (2, 2)))
  }

  it should "handle no saddles" in {
    pending
    val points = Matrix(List(List(2, 1), List(1, 2))).saddlePoints
    points should be (Set())
  }

  it should "handle empty matrix" in {
    pending
    val points = Matrix(List()).saddlePoints
    points should be (Set())
  }
}

Version data entries

223 entries across 223 versions & 1 rubygems

Version Path
trackler-2.2.1.39 tracks/scala/exercises/saddle-points/src/test/scala/SaddlePointsTest.scala
trackler-2.2.1.38 tracks/scala/exercises/saddle-points/src/test/scala/SaddlePointsTest.scala
trackler-2.2.1.37 tracks/scala/exercises/saddle-points/src/test/scala/SaddlePointsTest.scala
trackler-2.2.1.36 tracks/scala/exercises/saddle-points/src/test/scala/SaddlePointsTest.scala
trackler-2.2.1.35 tracks/scala/exercises/saddle-points/src/test/scala/SaddlePointsTest.scala
trackler-2.2.1.34 tracks/scala/exercises/saddle-points/src/test/scala/SaddlePointsTest.scala
trackler-2.2.1.33 tracks/scala/exercises/saddle-points/src/test/scala/SaddlePointsTest.scala
trackler-2.2.1.32 tracks/scala/exercises/saddle-points/src/test/scala/SaddlePointsTest.scala
trackler-2.2.1.31 tracks/scala/exercises/saddle-points/src/test/scala/SaddlePointsTest.scala
trackler-2.2.1.30 tracks/scala/exercises/saddle-points/src/test/scala/SaddlePointsTest.scala
trackler-2.2.1.29 tracks/scala/exercises/saddle-points/src/test/scala/SaddlePointsTest.scala
trackler-2.2.1.28 tracks/scala/exercises/saddle-points/src/test/scala/SaddlePointsTest.scala
trackler-2.2.1.27 tracks/scala/exercises/saddle-points/src/test/scala/SaddlePointsTest.scala
trackler-2.2.1.26 tracks/scala/exercises/saddle-points/src/test/scala/SaddlePointsTest.scala
trackler-2.2.1.25 tracks/scala/exercises/saddle-points/src/test/scala/SaddlePointsTest.scala
trackler-2.2.1.24 tracks/scala/exercises/saddle-points/src/test/scala/SaddlePointsTest.scala
trackler-2.2.1.23 tracks/scala/exercises/saddle-points/src/test/scala/SaddlePointsTest.scala
trackler-2.2.1.22 tracks/scala/exercises/saddle-points/src/test/scala/SaddlePointsTest.scala
trackler-2.2.1.21 tracks/scala/exercises/saddle-points/src/test/scala/SaddlePointsTest.scala
trackler-2.2.1.20 tracks/scala/exercises/saddle-points/src/test/scala/SaddlePointsTest.scala