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

package chiselTests

import chisel3._
import scala.language.experimental.macros
import org.scalatest._
import org.scalatest.prop._
import chisel3.testers.BasicTester


/** Comprehensive test of static range parsing functionality.
  * Note: negative (failure) conditions can't be tested because they will fail at compile time,
  * before the testing environment is entered.
  */
class RangeMacroSpec extends ChiselPropSpec {
  property("Range macros should work") {
    range"(0,${1+1}]"
    range"  (  0  ,  ${1+1}  ]  "
  }
}