Commit bbd3a1b6 authored by vipwzw's avatar vipwzw

auto ci

parent adc9354e
......@@ -5,6 +5,7 @@
package types
import "errors"
// ErrXXX defines error message
var (
ErrGeFromBytesVartime = errors.New("ErrGeFromBytesVartime")
......
......@@ -2,50 +2,58 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package autotest
import (
"github.com/33cn/chain33/cmd/autotest/types"
)
// TokenPreCreateCase token precreatecase command
type TokenPreCreateCase struct {
types.BaseCase
//From string `toml:"from"`
//Amount string `toml:"amount"`
}
// TokenPreCreatePack defines token precreate package command
type TokenPreCreatePack struct {
types.BaseCasePack
}
// TokenFinishCreateCase token finish create case command
type TokenFinishCreateCase struct {
types.BaseCase
//From string `toml:"from"`
//Amount string `toml:"amount"`
}
// TokenFinishCreatePack token finish create pack command
type TokenFinishCreatePack struct {
types.BaseCasePack
}
// TokenRevokeCase token revoke case command
type TokenRevokeCase struct {
types.BaseCase
}
// TokenRevokePack token revoke pack command
type TokenRevokePack struct {
types.BaseCasePack
}
// SendCommand defines send command function of tokenprecreatecase
func (testCase *TokenPreCreateCase) SendCommand(packID string) (types.PackFunc, error) {
return types.DefaultSend(testCase, &TokenPreCreatePack{}, packID)
}
// SendCommand defines send command function of tokenrevokecase
func (testCase *TokenRevokeCase) SendCommand(packID string) (types.PackFunc, error) {
return types.DefaultSend(testCase, &TokenRevokePack{}, packID)
}
// SendCommand send command function of tokenfinishcreatecase
func (testCase *TokenFinishCreateCase) SendCommand(packID string) (types.PackFunc, error) {
......
......@@ -11,6 +11,7 @@ import (
"github.com/33cn/chain33/cmd/autotest/types"
)
// BuyCase defines buycase command
type BuyCase struct {
types.BaseCase
......@@ -19,19 +20,23 @@ type BuyCase struct {
TokenAmount string `toml:"tokenAmount"`
BtyAmount string `toml:"btyAmount"`
}
// BuyPack defines buypack command
type BuyPack struct {
types.BaseCasePack
}
// DependBuyCase defines depend buycase command
type DependBuyCase struct {
BuyCase
SellID string `toml:"sellID,omitempty"`
}
// DependBuyPack defines depend buy pack command
type DependBuyPack struct {
BuyPack
}
// SendCommand defines send command function of dependbuycase
func (testCase *DependBuyCase) SendCommand(packID string) (types.PackFunc, error) {
......@@ -42,6 +47,7 @@ func (testCase *DependBuyCase) SendCommand(packID string) (types.PackFunc, error
return types.DefaultSend(&testCase.BuyCase, &BuyPack{}, packID)
}
// SetDependData defines set depend data function
func (testCase *DependBuyCase) SetDependData(depData interface{}) {
......@@ -50,6 +56,7 @@ func (testCase *DependBuyCase) SetDependData(depData interface{}) {
testCase.SellID = orderInfo.sellID
}
}
// GetCheckHandlerMap defines get check handler for map
func (pack *BuyPack) GetCheckHandlerMap() interface{} {
......
......@@ -9,26 +9,31 @@ import (
"github.com/33cn/chain33/cmd/autotest/types"
)
// SellCase defines sell case command
type SellCase struct {
types.BaseCase
From string `toml:"from"`
Amount string `toml:"amount"`
}
// SellPack defines sell pack command
type SellPack struct {
types.BaseCasePack
orderInfo *SellOrderInfo
}
// SellOrderInfo sell order information
type SellOrderInfo struct {
sellID string
}
// SendCommand send command of sellcase
func (testCase *SellCase) SendCommand(packID string) (types.PackFunc, error) {
return types.DefaultSend(testCase, &SellPack{}, packID)
}
// GetCheckHandlerMap defines get check handle for map
func (pack *SellPack) GetCheckHandlerMap() interface{} {
......@@ -38,6 +43,7 @@ func (pack *SellPack) GetCheckHandlerMap() interface{} {
return funcMap
}
// GetDependData defines get depend data function
func (pack *SellPack) GetDependData() interface{} {
......
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