summaryrefslogtreecommitdiff
path: root/src/test/scala/chiselTests/util/CatSpec.scala
blob: 5565ca512ba3ba967b50727bd93753913743bb1d (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
29
30
31
32
33
34
// SPDX-License-Identifier: Apache-2.0

package chiselTests.util

import chisel3._
import chisel3.stage.ChiselStage
import chisel3.util.Cat

import chiselTests.ChiselFlatSpec

object CatSpec {

  class JackIsATypeSystemGod extends Module {
    val in  = IO(Input (Vec(0, UInt(8.W))))
    val out = IO(Output(UInt(8.W)))

    out := Cat(in)
  }

}

class CatSpec extends ChiselFlatSpec {

  import CatSpec._

  behavior of "util.Cat"

  it should "not fail to elaborate a zero-element Vec" in {

    ChiselStage.elaborate(new JackIsATypeSystemGod)

  }

}