Sha256: 7463c7e18046e8ab3dfd5d45a0c3955497019a57ae39b945c90ef999dcc771ac

Contents?: true

Size: 652 Bytes

Versions: 77

Compression:

Stored size: 652 Bytes

Contents

import org.scalatest.{Matchers, FlatSpec}

/** @version created manually **/
class MatrixTest extends FlatSpec with Matchers {
  it should "extract a row" in {
    Matrix("1 2\n10 20").rows(0) should be (Vector(1, 2))
    Matrix("1 2\n10 20\n100 200").rows(2) should be (Vector(100, 200))
  }

  it should "extract a col" in {
    pending
    Matrix("1 2\n10 20").cols(0) should be (Vector(1, 10))
    Matrix("1 2\n10 20\n100 200").cols(1) should be (Vector(2, 20, 200))
  }

  it should "support equality" in {
    pending
    Matrix("1 2\n10 20") should be (Matrix("1 2\n10 20"))
    Matrix("1 2\n10 20") should not be Matrix("20 10\n100 200")
  }
}

Version data entries

77 entries across 77 versions & 1 rubygems

Version Path
trackler-2.2.1.107 tracks/scala/exercises/matrix/src/test/scala/MatrixTest.scala
trackler-2.2.1.106 tracks/scala/exercises/matrix/src/test/scala/MatrixTest.scala
trackler-2.2.1.105 tracks/scala/exercises/matrix/src/test/scala/MatrixTest.scala
trackler-2.2.1.104 tracks/scala/exercises/matrix/src/test/scala/MatrixTest.scala
trackler-2.2.1.103 tracks/scala/exercises/matrix/src/test/scala/MatrixTest.scala
trackler-2.2.1.102 tracks/scala/exercises/matrix/src/test/scala/MatrixTest.scala
trackler-2.2.1.101 tracks/scala/exercises/matrix/src/test/scala/MatrixTest.scala
trackler-2.2.1.100 tracks/scala/exercises/matrix/src/test/scala/MatrixTest.scala
trackler-2.2.1.99 tracks/scala/exercises/matrix/src/test/scala/MatrixTest.scala
trackler-2.2.1.98 tracks/scala/exercises/matrix/src/test/scala/MatrixTest.scala
trackler-2.2.1.97 tracks/scala/exercises/matrix/src/test/scala/MatrixTest.scala
trackler-2.2.1.96 tracks/scala/exercises/matrix/src/test/scala/MatrixTest.scala
trackler-2.2.1.95 tracks/scala/exercises/matrix/src/test/scala/MatrixTest.scala
trackler-2.2.1.94 tracks/scala/exercises/matrix/src/test/scala/MatrixTest.scala
trackler-2.2.1.93 tracks/scala/exercises/matrix/src/test/scala/MatrixTest.scala
trackler-2.2.1.92 tracks/scala/exercises/matrix/src/test/scala/MatrixTest.scala
trackler-2.2.1.91 tracks/scala/exercises/matrix/src/test/scala/MatrixTest.scala
trackler-2.2.1.90 tracks/scala/exercises/matrix/src/test/scala/MatrixTest.scala
trackler-2.2.1.89 tracks/scala/exercises/matrix/src/test/scala/MatrixTest.scala
trackler-2.2.1.88 tracks/scala/exercises/matrix/src/test/scala/MatrixTest.scala