diff options
| author | Jim Lawson | 2015-11-04 15:47:08 -0800 |
|---|---|---|
| committer | Jim Lawson | 2015-11-04 15:47:08 -0800 |
| commit | 56db490d1395aa5603e2688906d5a4f227b187e1 (patch) | |
| tree | 007eabb2dd6aaf2da34d9152ceccc9cbbbfc4266 /src/test/scala/chiselTests/Harness.scala | |
| parent | 9e58aef3abf1e7139d8e6b1068937dfcbb5c9ae3 (diff) | |
| parent | 0300b7db3e87da860c2a70b7f990ebf1c59e8029 (diff) | |
Merge pull request #56 from ucb-bar/stylefix
Style fixes for test code
Diffstat (limited to 'src/test/scala/chiselTests/Harness.scala')
| -rw-r--r-- | src/test/scala/chiselTests/Harness.scala | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/test/scala/chiselTests/Harness.scala b/src/test/scala/chiselTests/Harness.scala index 98ad3b11..31a219e4 100644 --- a/src/test/scala/chiselTests/Harness.scala +++ b/src/test/scala/chiselTests/Harness.scala @@ -1,13 +1,15 @@ +// See LICENSE for license details. + package chiselTests import Chisel.testers.BasicTester import org.scalatest._ import org.scalatest.prop._ import java.io.File -class HarnessSpec extends ChiselPropSpec +class HarnessSpec extends ChiselPropSpec with Chisel.BackendCompilationUtilities { - def makeTrivialVerilog = makeHarness((prefix: String) => s""" + def makeTrivialVerilog: (File => File) = makeHarness((prefix: String) => s""" module ${prefix}; initial begin $$display("$prefix!"); @@ -16,7 +18,7 @@ module ${prefix}; endmodule """, ".v") _ - def makeFailingVerilog = makeHarness((prefix: String) => s""" + def makeFailingVerilog: (File => File) = makeHarness((prefix: String) => s""" module $prefix; initial begin assert (1 == 0) else $$error("My specific, expected error message!"); @@ -26,7 +28,7 @@ module $prefix; endmodule """, ".v") _ - def makeCppHarness = makeHarness((prefix: String) => s""" + def makeCppHarness: (File => File) = makeHarness((prefix: String) => s""" #include "V$prefix.h" #include "verilated.h" @@ -72,4 +74,4 @@ int main(int argc, char **argv, char **env) { assert(!executeExpectingFailure(prefix, dir, "A string that doesn't match any test output")) } } - + |
