Skip to content

Commit

Permalink
Add a test of repeatedly toString calls
Browse files Browse the repository at this point in the history
  • Loading branch information
Atry committed Feb 11, 2018
1 parent 6baefba commit 7314d1a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Tensors/src/test/scala/com/thoughtworks/compute/TensorsSpec.scala
Expand Up @@ -26,6 +26,16 @@ class TensorsSpec extends AsyncFreeSpec with Matchers {
}
))

"repeatedly toString" in {
doTensors.map { tensors =>
val tensor = tensors.Tensor(42.0f)
for (i <- 0 until 1000) {
tensor.toString should be("42.0")
}
succeed
}
}.run.toScalaFuture

"create a tensor of a constant" in {
doTensors.flatMap { tensors =>
val shape = Array(2, 3, 5)
Expand Down

0 comments on commit 7314d1a

Please sign in to comment.