summaryrefslogtreecommitdiff
path: root/src/test/scala/chiselTests
diff options
context:
space:
mode:
authorducky2015-12-11 15:26:47 -0800
committerducky2015-12-11 15:26:47 -0800
commit3e34e66416e86286c4396941c665cf9b0d28f050 (patch)
treee1bf7395536231ae22b587f31c66b00e4e5d9436 /src/test/scala/chiselTests
parent8582ab12c288d8177c8b4a8a6172b58691cc6430 (diff)
Add stop() in BasicTester as a replacement for io.done
Diffstat (limited to 'src/test/scala/chiselTests')
-rw-r--r--src/test/scala/chiselTests/Stop.scala18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/test/scala/chiselTests/Stop.scala b/src/test/scala/chiselTests/Stop.scala
new file mode 100644
index 00000000..7ce9461b
--- /dev/null
+++ b/src/test/scala/chiselTests/Stop.scala
@@ -0,0 +1,18 @@
+// See LICENSE for license details.
+
+package chiselTests
+
+import org.scalatest._
+import Chisel._
+import Chisel.testers.BasicTester
+
+class StopTester() extends BasicTester {
+ io.done := Bool(false)
+ stop()
+}
+
+class StopSpec extends ChiselFlatSpec {
+ "stop()" should "stop and succeed the testbench" in {
+ assert(execute{ new StopTester })
+ }
+}