summaryrefslogtreecommitdiff
path: root/src/test/scala/chiselTests/Clock.scala
blob: 79dd2de4a6a2346d485c6761ae2b869758dd9c20 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// See LICENSE for license details.

package chiselTests

import org.scalatest._
import org.scalatest.prop._

import chisel3._
import chisel3.testers.BasicTester
import chisel3.util._

class ClockAsUIntTester extends BasicTester {
  assert(Bool(true).asClock.asUInt === UInt(1))
  stop()
}


class ClockSpec extends ChiselPropSpec {
  property("Bool.asClock.asUInt should pass a signal through unaltered") {
    assertTesterPasses { new ClockAsUIntTester }
  }
}