feat: add test name to test vector meta (#214)
So we can more easily distinguish between test vectors.
This commit is contained in:
parent
de62012a7f
commit
be5bd41640
@ -91,6 +91,7 @@ func MessageTest_AccountActorCreation() error {
|
|||||||
for _, tc := range testCases {
|
for _, tc := range testCases {
|
||||||
err := func() error {
|
err := func() error {
|
||||||
td := drivers.NewTestDriver()
|
td := drivers.NewTestDriver()
|
||||||
|
td.Vector.Meta.Desc = tc.desc
|
||||||
|
|
||||||
existingAccountAddr, _ := td.NewAccountActor(tc.existingActorType, tc.existingActorBal)
|
existingAccountAddr, _ := td.NewAccountActor(tc.existingActorType, tc.existingActorBal)
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@ func MessageTest_MessageApplicationEdgecases() error {
|
|||||||
|
|
||||||
err := func(testname string) error {
|
err := func(testname string) error {
|
||||||
td := drivers.NewTestDriver()
|
td := drivers.NewTestDriver()
|
||||||
|
td.Vector.Meta.Desc = testname
|
||||||
|
|
||||||
alice, _ := td.NewAccountActor(drivers.SECP, aliceBal)
|
alice, _ := td.NewAccountActor(drivers.SECP, aliceBal)
|
||||||
|
|
||||||
@ -48,6 +49,7 @@ func MessageTest_MessageApplicationEdgecases() error {
|
|||||||
|
|
||||||
err = func(testname string) error {
|
err = func(testname string) error {
|
||||||
td := drivers.NewTestDriver()
|
td := drivers.NewTestDriver()
|
||||||
|
td.Vector.Meta.Desc = testname
|
||||||
|
|
||||||
alice, _ := td.NewAccountActor(drivers.SECP, aliceBal)
|
alice, _ := td.NewAccountActor(drivers.SECP, aliceBal)
|
||||||
|
|
||||||
@ -84,6 +86,7 @@ func MessageTest_MessageApplicationEdgecases() error {
|
|||||||
|
|
||||||
err = func(testname string) error {
|
err = func(testname string) error {
|
||||||
td := drivers.NewTestDriver()
|
td := drivers.NewTestDriver()
|
||||||
|
td.Vector.Meta.Desc = testname
|
||||||
|
|
||||||
alice, _ := td.NewAccountActor(drivers.SECP, aliceBal)
|
alice, _ := td.NewAccountActor(drivers.SECP, aliceBal)
|
||||||
preroot := td.GetStateRoot()
|
preroot := td.GetStateRoot()
|
||||||
@ -130,6 +133,7 @@ func MessageTest_MessageApplicationEdgecases() error {
|
|||||||
|
|
||||||
err = func(testname string) error {
|
err = func(testname string) error {
|
||||||
td := drivers.NewTestDriver()
|
td := drivers.NewTestDriver()
|
||||||
|
td.Vector.Meta.Desc = testname
|
||||||
|
|
||||||
alice, _ := td.NewAccountActor(drivers.SECP, aliceBal)
|
alice, _ := td.NewAccountActor(drivers.SECP, aliceBal)
|
||||||
|
|
||||||
@ -167,6 +171,7 @@ func MessageTest_MessageApplicationEdgecases() error {
|
|||||||
|
|
||||||
err = func(testname string) error {
|
err = func(testname string) error {
|
||||||
td := drivers.NewTestDriver()
|
td := drivers.NewTestDriver()
|
||||||
|
td.Vector.Meta.Desc = testname
|
||||||
|
|
||||||
const pcTimeLock = abi_spec.ChainEpoch(10)
|
const pcTimeLock = abi_spec.ChainEpoch(10)
|
||||||
const pcLane = uint64(123)
|
const pcLane = uint64(123)
|
||||||
@ -234,6 +239,7 @@ func MessageTest_MessageApplicationEdgecases() error {
|
|||||||
|
|
||||||
err = func(testname string) error {
|
err = func(testname string) error {
|
||||||
td := drivers.NewTestDriver()
|
td := drivers.NewTestDriver()
|
||||||
|
td.Vector.Meta.Desc = testname
|
||||||
|
|
||||||
alice, _ := td.NewAccountActor(drivers.SECP, aliceBal)
|
alice, _ := td.NewAccountActor(drivers.SECP, aliceBal)
|
||||||
|
|
||||||
@ -264,6 +270,8 @@ func MessageTest_MessageApplicationEdgecases() error {
|
|||||||
|
|
||||||
err = func(testname string) error {
|
err = func(testname string) error {
|
||||||
td := drivers.NewTestDriver()
|
td := drivers.NewTestDriver()
|
||||||
|
td.Vector.Meta.Desc = testname
|
||||||
|
td.Vector.Meta.Comment = "Note that this test is not a valid message, since it is using an unknown actor. However in the event that an invalid message isn't filtered by block validation we need to ensure behaviour is consistent across VM implementations."
|
||||||
|
|
||||||
alice, _ := td.NewAccountActor(drivers.SECP, aliceBal)
|
alice, _ := td.NewAccountActor(drivers.SECP, aliceBal)
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@ func MessageTest_Paych() error {
|
|||||||
|
|
||||||
err := func(testname string) error {
|
err := func(testname string) error {
|
||||||
td := drivers.NewTestDriver()
|
td := drivers.NewTestDriver()
|
||||||
|
td.Vector.Meta.Desc = testname
|
||||||
|
|
||||||
// will create and send on payment channel
|
// will create and send on payment channel
|
||||||
sender, senderID := td.NewAccountActor(drivers.SECP, initialBal)
|
sender, senderID := td.NewAccountActor(drivers.SECP, initialBal)
|
||||||
@ -63,6 +64,7 @@ func MessageTest_Paych() error {
|
|||||||
|
|
||||||
err = func(testname string) error {
|
err = func(testname string) error {
|
||||||
td := drivers.NewTestDriver()
|
td := drivers.NewTestDriver()
|
||||||
|
td.Vector.Meta.Desc = testname
|
||||||
|
|
||||||
//const pcTimeLock = abi_spec.ChainEpoch(1)
|
//const pcTimeLock = abi_spec.ChainEpoch(1)
|
||||||
const pcTimeLock = abi_spec.ChainEpoch(0)
|
const pcTimeLock = abi_spec.ChainEpoch(0)
|
||||||
@ -133,6 +135,7 @@ func MessageTest_Paych() error {
|
|||||||
|
|
||||||
err = func(testname string) error {
|
err = func(testname string) error {
|
||||||
td := drivers.NewTestDriver()
|
td := drivers.NewTestDriver()
|
||||||
|
td.Vector.Meta.Desc = testname
|
||||||
|
|
||||||
// create the payment channel
|
// create the payment channel
|
||||||
sender, _ := td.NewAccountActor(drivers.SECP, initialBal)
|
sender, _ := td.NewAccountActor(drivers.SECP, initialBal)
|
||||||
|
@ -95,6 +95,7 @@ func MessageTest_ValueTransferSimple() error {
|
|||||||
for _, tc := range testCases {
|
for _, tc := range testCases {
|
||||||
err := func(testname string) error {
|
err := func(testname string) error {
|
||||||
td := drivers.NewTestDriver()
|
td := drivers.NewTestDriver()
|
||||||
|
td.Vector.Meta.Desc = testname
|
||||||
|
|
||||||
// Create the to and from actors with balance in the state tree
|
// Create the to and from actors with balance in the state tree
|
||||||
_, _, err := td.State().CreateActor(builtin_spec.AccountActorCodeID, tc.sender, tc.senderBal, &account_spec.State{Address: tc.sender})
|
_, _, err := td.State().CreateActor(builtin_spec.AccountActorCodeID, tc.sender, tc.senderBal, &account_spec.State{Address: tc.sender})
|
||||||
@ -154,6 +155,7 @@ func MessageTest_ValueTransferAdvance() error {
|
|||||||
|
|
||||||
err := func(testname string) error {
|
err := func(testname string) error {
|
||||||
td := drivers.NewTestDriver()
|
td := drivers.NewTestDriver()
|
||||||
|
td.Vector.Meta.Desc = testname
|
||||||
|
|
||||||
alice, _ := td.NewAccountActor(drivers.SECP, aliceInitialBalance)
|
alice, _ := td.NewAccountActor(drivers.SECP, aliceInitialBalance)
|
||||||
transferAmnt := abi_spec.NewTokenAmount(10)
|
transferAmnt := abi_spec.NewTokenAmount(10)
|
||||||
@ -183,6 +185,7 @@ func MessageTest_ValueTransferAdvance() error {
|
|||||||
|
|
||||||
err = func(testname string) error {
|
err = func(testname string) error {
|
||||||
td := drivers.NewTestDriver()
|
td := drivers.NewTestDriver()
|
||||||
|
td.Vector.Meta.Desc = testname
|
||||||
|
|
||||||
alice, aliceId := td.NewAccountActor(drivers.SECP, aliceInitialBalance)
|
alice, aliceId := td.NewAccountActor(drivers.SECP, aliceInitialBalance)
|
||||||
transferAmnt := abi_spec.NewTokenAmount(10)
|
transferAmnt := abi_spec.NewTokenAmount(10)
|
||||||
@ -213,6 +216,7 @@ func MessageTest_ValueTransferAdvance() error {
|
|||||||
|
|
||||||
err = func(testname string) error {
|
err = func(testname string) error {
|
||||||
td := drivers.NewTestDriver()
|
td := drivers.NewTestDriver()
|
||||||
|
td.Vector.Meta.Desc = testname
|
||||||
|
|
||||||
alice, aliceId := td.NewAccountActor(drivers.SECP, aliceInitialBalance)
|
alice, aliceId := td.NewAccountActor(drivers.SECP, aliceInitialBalance)
|
||||||
transferAmnt := abi_spec.NewTokenAmount(10)
|
transferAmnt := abi_spec.NewTokenAmount(10)
|
||||||
@ -243,6 +247,7 @@ func MessageTest_ValueTransferAdvance() error {
|
|||||||
|
|
||||||
err = func(testname string) error {
|
err = func(testname string) error {
|
||||||
td := drivers.NewTestDriver()
|
td := drivers.NewTestDriver()
|
||||||
|
td.Vector.Meta.Desc = testname
|
||||||
|
|
||||||
alice, aliceId := td.NewAccountActor(drivers.SECP, aliceInitialBalance)
|
alice, aliceId := td.NewAccountActor(drivers.SECP, aliceInitialBalance)
|
||||||
transferAmnt := abi_spec.NewTokenAmount(10)
|
transferAmnt := abi_spec.NewTokenAmount(10)
|
||||||
@ -273,6 +278,7 @@ func MessageTest_ValueTransferAdvance() error {
|
|||||||
|
|
||||||
err = func(testname string) error {
|
err = func(testname string) error {
|
||||||
td := drivers.NewTestDriver()
|
td := drivers.NewTestDriver()
|
||||||
|
td.Vector.Meta.Desc = testname
|
||||||
|
|
||||||
alice, _ := td.NewAccountActor(drivers.SECP, aliceInitialBalance)
|
alice, _ := td.NewAccountActor(drivers.SECP, aliceInitialBalance)
|
||||||
receiver := td.Wallet().NewSECP256k1AccountAddress()
|
receiver := td.Wallet().NewSECP256k1AccountAddress()
|
||||||
@ -303,6 +309,7 @@ func MessageTest_ValueTransferAdvance() error {
|
|||||||
|
|
||||||
err = func(testname string) error {
|
err = func(testname string) error {
|
||||||
td := drivers.NewTestDriver()
|
td := drivers.NewTestDriver()
|
||||||
|
td.Vector.Meta.Desc = testname
|
||||||
|
|
||||||
alice, _ := td.NewAccountActor(drivers.SECP, aliceInitialBalance)
|
alice, _ := td.NewAccountActor(drivers.SECP, aliceInitialBalance)
|
||||||
unknown := td.Wallet().NewSECP256k1AccountAddress()
|
unknown := td.Wallet().NewSECP256k1AccountAddress()
|
||||||
@ -334,6 +341,7 @@ func MessageTest_ValueTransferAdvance() error {
|
|||||||
|
|
||||||
err = func(testname string) error {
|
err = func(testname string) error {
|
||||||
td := drivers.NewTestDriver()
|
td := drivers.NewTestDriver()
|
||||||
|
td.Vector.Meta.Desc = testname
|
||||||
|
|
||||||
sender := td.Wallet().NewSECP256k1AccountAddress()
|
sender := td.Wallet().NewSECP256k1AccountAddress()
|
||||||
receiver := td.Wallet().NewSECP256k1AccountAddress()
|
receiver := td.Wallet().NewSECP256k1AccountAddress()
|
||||||
|
Loading…
Reference in New Issue
Block a user