WARNING! Access to this system is limited to authorised users only.
Unauthorised users may be subject to prosecution.
Unauthorised access to this system is a criminal offence under Australian law (Federal Crimes Act 1914 Part VIA)
It is a criminal offence to:
(1) Obtain access to data without authority. -Penalty 2 years imprisonment.
(2) Damage, delete, alter or insert data without authority. -Penalty 10 years imprisonment.
User activity is monitored and recorded. Anyone using this system expressly consents to such monitoring and recording.

To protect your data, the CISO officer has suggested users to enable 2FA as soon as possible.
Currently 2.6% of users enabled 2FA.

Commit 2787bfa8 authored by Kunshan Wang's avatar Kunshan Wang
Browse files

Making reader specs abstract.

parent 207c26b2
package uvm.ir.textinput
import org.scalatest._
import uvm._
trait AbstractReaderSpec extends FlatSpec with Matchers {
def parseFile(fileName: String): Bundle
def theSubject: String
behavior of theSubject
it should "read simple type definitions" in {
val b = parseFile("tests/uvm-parsing-test/types.uir")
}
it should "read simple constant definitions" in {
val b = parseFile("tests/uvm-parsing-test/constants.uir")
}
it should "read simple function definitions" in {
val b = parseFile("tests/uvm-parsing-test/functions.uir")
}
it should "read simple instruction definitions" in {
val b = parseFile("tests/uvm-parsing-test/instructions.uir")
}
}
\ No newline at end of file
package uvm.ir.textinput
import org.scalatest.FlatSpec
import org.scalatest.Matchers
import org.scalatest._
import uvm.Bundle
class UvmIRReaderSpec extends FlatSpec with Matchers {
class UvmIRReaderSpec extends AbstractReaderSpec {
override def theSubject = "UvmIRReader"
def parseFile(fileName: String): Bundle = {
override def parseFile(fileName: String): Bundle = {
UvmIRReader.read(new java.io.FileReader(fileName))
}
"The IRParser" should "parse simple type definitions" in {
parseFile("tests/uvm-parsing-test/types.uir")
}
it should "parse simple constant definitions" in {
parseFile("tests/uvm-parsing-test/constants.uir")
}
it should "parse simple function definitions" in {
parseFile("tests/uvm-parsing-test/functions.uir")
}
it should "parse simple instruction definitions" in {
parseFile("tests/uvm-parsing-test/instructions.uir")
}
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment