OSDN Git Service

Merge pull request #201 from Bytom/v0.1
[bytom/vapor.git] / vendor / github.com / btcsuite / btcd / btcjson / chainsvrwsresults_test.go
diff --git a/vendor/github.com/btcsuite/btcd/btcjson/chainsvrwsresults_test.go b/vendor/github.com/btcsuite/btcd/btcjson/chainsvrwsresults_test.go
deleted file mode 100644 (file)
index b1e1745..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright (c) 2017 The btcsuite developers
-// Copyright (c) 2017 The Decred developers
-// Use of this source code is governed by an ISC
-// license that can be found in the LICENSE file.
-
-package btcjson_test
-
-import (
-       "encoding/json"
-       "testing"
-
-       "github.com/btcsuite/btcd/btcjson"
-)
-
-// TestChainSvrWsResults ensures any results that have custom marshalling
-// work as inteded.
-func TestChainSvrWsResults(t *testing.T) {
-       t.Parallel()
-
-       tests := []struct {
-               name     string
-               result   interface{}
-               expected string
-       }{
-               {
-                       name: "RescannedBlock",
-                       result: &btcjson.RescannedBlock{
-                               Hash:         "blockhash",
-                               Transactions: []string{"serializedtx"},
-                       },
-                       expected: `{"hash":"blockhash","transactions":["serializedtx"]}`,
-               },
-       }
-
-       t.Logf("Running %d tests", len(tests))
-       for i, test := range tests {
-               marshalled, err := json.Marshal(test.result)
-               if err != nil {
-                       t.Errorf("Test #%d (%s) unexpected error: %v", i,
-                               test.name, err)
-                       continue
-               }
-               if string(marshalled) != test.expected {
-                       t.Errorf("Test #%d (%s) unexpected marhsalled data - "+
-                               "got %s, want %s", i, test.name, marshalled,
-                               test.expected)
-                       continue
-               }
-       }
-}