mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-04 04:04:00 +00:00
## Description This PR removes simple prefix from all types in the crypto/merkle directory. The two proto types `Proof` & `ProofOp` have been moved to the `proto/crypto/merkle` directory. proto messge `Proof` was renamed to `ProofOps` and `SimpleProof` message to `Proof`. Closes: #2755
21 lines
452 B
Go
21 lines
452 B
Go
package armor
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestArmor(t *testing.T) {
|
|
blockType := "MINT TEST"
|
|
data := []byte("somedata")
|
|
armorStr := EncodeArmor(blockType, nil, data)
|
|
|
|
// Decode armorStr and test for equivalence.
|
|
blockType2, _, data2, err := DecodeArmor(armorStr)
|
|
require.Nil(t, err, "%+v", err)
|
|
assert.Equal(t, blockType, blockType2)
|
|
assert.Equal(t, data, data2)
|
|
}
|