blob: e6f5d22239d650f387f0428446d7847f83ef9733 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
// See LICENSE for license details.
package chiselTests
import org.scalatest._
import Chisel._
import Chisel.testers.BasicTester
class SinglePrintfTester() extends BasicTester {
printf("done=%x", io.done)
io.done := Bool(true)
io.error := Bool(false)
}
class MultiPrintfTester() extends BasicTester {
printf("done=%x error=%x", io.done, io.error)
io.done := Bool(true)
io.error := Bool(false)
}
class PrintfSpec extends ChiselFlatSpec {
"A printf with a single argument" should "run" in {
assert(execute{ new SinglePrintfTester })
}
"A printf with multiple arguments" should "run" in {
assert(execute{ new MultiPrintfTester })
}
}
|