OSDN Git Service

Merge pull request #201 from Bytom/v0.1
[bytom/vapor.git] / vendor / github.com / tendermint / abci / tests / test_app / main.go
diff --git a/vendor/github.com/tendermint/abci/tests/test_app/main.go b/vendor/github.com/tendermint/abci/tests/test_app/main.go
deleted file mode 100644 (file)
index 376c02f..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-package main
-
-import (
-       "fmt"
-       "os"
-
-       "github.com/tendermint/abci/types"
-)
-
-var abciType string
-
-func init() {
-       abciType = os.Getenv("ABCI")
-       if abciType == "" {
-               abciType = "socket"
-       }
-}
-
-func main() {
-       testCounter()
-}
-
-func testCounter() {
-       abciApp := os.Getenv("ABCI_APP")
-       if abciApp == "" {
-               panic("No ABCI_APP specified")
-       }
-
-       fmt.Printf("Running %s test with abci=%s\n", abciApp, abciType)
-       appProc := startApp(abciApp)
-       defer appProc.StopProcess(true)
-       client := startClient(abciType)
-       defer client.Stop()
-
-       setOption(client, "serial", "on")
-       commit(client, nil)
-       deliverTx(client, []byte("abc"), types.CodeType_BadNonce, nil)
-       commit(client, nil)
-       deliverTx(client, []byte{0x00}, types.CodeType_OK, nil)
-       commit(client, []byte{0, 0, 0, 0, 0, 0, 0, 1})
-       deliverTx(client, []byte{0x00}, types.CodeType_BadNonce, nil)
-       deliverTx(client, []byte{0x01}, types.CodeType_OK, nil)
-       deliverTx(client, []byte{0x00, 0x02}, types.CodeType_OK, nil)
-       deliverTx(client, []byte{0x00, 0x03}, types.CodeType_OK, nil)
-       deliverTx(client, []byte{0x00, 0x00, 0x04}, types.CodeType_OK, nil)
-       deliverTx(client, []byte{0x00, 0x00, 0x06}, types.CodeType_BadNonce, nil)
-       commit(client, []byte{0, 0, 0, 0, 0, 0, 0, 5})
-}