Documentation
¶
Overview ¶
Some functions to facilitate ALU testing
Index ¶
- func RunALUTest(t *testing.T, tc ALUTestCase, result ALUTest, expected ALUTest)
- func RunFullRandomALUTests(t *testing.T, n int, result ALUTest)
- func RunRandomALUTest(t *testing.T, op int, result ALUTest, expected ALUTest)
- func RunRandomALUTests(t *testing.T, n int, op int, result ALUTest, expected ALUTest)
- type ALUTest
- type ALUTestCase
- func Add(tc ALUTestCase) ALUTestCase
- func And(tc ALUTestCase) ALUTestCase
- func Cmp(tc ALUTestCase) ALUTestCase
- func GetALUExpectedResult(tc ALUTestCase) ALUTestCase
- func NewALUTestCase(a int, b int, ci bool, op int) ALUTestCase
- func NewRandomALUTestCase(op int) ALUTestCase
- func Not(tc ALUTestCase) ALUTestCase
- func Or(tc ALUTestCase) ALUTestCase
- func ShiftLeft(tc ALUTestCase) ALUTestCase
- func ShiftRight(tc ALUTestCase) ALUTestCase
- func XOr(tc ALUTestCase) ALUTestCase
- func Zero(tc ALUTestCase) ALUTestCase
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunALUTest ¶
func RunALUTest(t *testing.T, tc ALUTestCase, result ALUTest, expected ALUTest)
func RunRandomALUTest ¶
Types ¶
type ALUTest ¶
type ALUTest func(ALUTestCase) ALUTestCase
type ALUTestCase ¶
func GetALUExpectedResult ¶
func GetALUExpectedResult(tc ALUTestCase) ALUTestCase
func NewALUTestCase ¶
func NewALUTestCase(a int, b int, ci bool, op int) ALUTestCase
func NewRandomALUTestCase ¶
func NewRandomALUTestCase(op int) ALUTestCase
func ShiftRight ¶
func ShiftRight(tc ALUTestCase) ALUTestCase
Click to show internal directories.
Click to hide internal directories.