chisel3.testing.scalatest

Members list

Type members

Classlikes

A trait that provides FileCheck APIs and integration with Scalatest.

A trait that provides FileCheck APIs and integration with Scalatest.

Example usage:

import chisel3.testing.scalatest.FileCheck.scalatest
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matches.should.Matchers

class Foo extends AnyFlatSpec with Matchers with FileCheck {
 /** This has access to all FileCheck APIs like `fileCheck`. */
}

Attributes

See also
Source
package.scala
Supertypes
trait TestSuiteMixin
trait SuiteMixin
trait FileCheck
class Object
trait Matchable
class Any
Show all
Self type
TestSuite
trait HasConfigMap extends TestSuiteMixin

A Scalatest test suite mix-in that provides access to command line options.

A Scalatest test suite mix-in that provides access to command line options.

This expose any keys/values passed using the -D<key>=<value command line option to the test via a Map.

For example, you can invoke Scalatest passing the foo=bar option like so:

./mill 'chisel[].test.testOnly' fooTest -Dfoo=bar

Inside your test, if the configMap member function is accessed this will return:

Map(foo -> bar)

This is intended to be a building block of more complicated tests that want to customize their execution via the command line. It is advisable to use this sparingly as tests are generally not intended to change when you run them.

Attributes

Source
HasConfigMap.scala
Supertypes
trait TestSuiteMixin
trait SuiteMixin
class Object
trait Matchable
class Any
Known subtypes
Self type
TestSuite
trait TestingDirectory extends TestSuiteMixin

A mix-in for a Scalatest test suite that will setup the output directory for you. E.g., this will create output directories for your tests like the following:

A mix-in for a Scalatest test suite that will setup the output directory for you. E.g., this will create output directories for your tests like the following:

<buildDir>
└── <suite-name>
   └── <scope-1-name>
       └── ...
           └── <scope-n-name>
               ├── <test-1-name>
               ├── ...
               └── <test-n-name>

You may change the buildDir by overridding a method of the same name in this trait.

Attributes

Source
WithTestingDirectory.scala
Supertypes
trait TestSuiteMixin
trait SuiteMixin
class Object
trait Matchable
class Any
Known subtypes
trait FileCheck
Self type
TestSuite