StringHelpers

chisel3.testing.FileCheck.StringHelpers
implicit class StringHelpers(input: String)

Helpers to run FileCheck on a string input.

Attributes

Source
FileCheck.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def fileCheck(fileCheckArgs: String*)(check: String)(implicit testingDirectory: HasTestingDirectory): Unit

Run FileCheck on a string with some options.

Run FileCheck on a string with some options.

import chisel3.testing.FileCheck
import chisel3.testing.scalatest.TestingDirectory
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.should.Matchers

class Foo extends AnyFlatSpec with Matchers with FileCheck with TestingDirectory {

 behavior of ("Bar")

 it should "work" in {
   "Hello world!".fileCheck()(
     """|CHECK:      Hello
        |CHECK-SAME: world
        |""".stripMargin
   )
 }

}

Value parameters

check

a string of checks to pass to FileCheck

fileCheckArgs

arguments to pass directly to FileCheck

testingDirectory

an implementation of HasTestingDirectory that controls where intermediary files are written.

Attributes

Note

See FileCheck Documentation for more information.

Source
FileCheck.scala