You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: bloc_cryptor_test.go
    path of file: ./repos/gmsm/sm4/padding
    
    the code of the file until where you have to start completion: package padding

import (
	"bytes"
	"crypto/cipher"
	"crypto/rand"
	"fmt"
	"github.com/tjfoc/gmsm/sm4"
	"testing"
)

func TestP7BlockDecrypt(t *testing.T) {
	src := bytes.Repeat([]byte{7}, 16)

	srcIn := bytes.NewBuffer(src)
	encOut := bytes.NewBuffer(make([]byte, 0, 1024))

	key := make([]byte, 16)
	iv := make([]byte, 16)
	_, _ = rand.Read(key)
	_, _ = rand.Read(iv)
	fmt.Printf("key: %02X\n", key)
	fmt.Printf("iv : %02X\n", iv)
	block, err := sm4.NewCipher(key)
	if err != nil {
		t.Fatal(err)
	}
	encrypt
    
func TestP7BlockDecrypt(t *testing.T) {
	src := bytes.Repeat([]byte{7}, 16)

	srcIn := bytes.NewBuffer(src)
	encOut := bytes.NewBuffer(make([]byte, 0, 1024))

	key := make([]byte, 16)
	iv := make([]byte, 16)
	_, _ = rand.Read(key)
	_, _ = rand.Read(iv)
	fmt.Printf("key: %02X\n", key)
	fmt.Printf("iv : %02X\n", iv)
	block, err := sm4.NewCipher(key)
	if err != nil {
		t.Fatal(err)
	}
	encrypter := cipher.NewCBCEncrypter(block, iv)

	err = P7BlockEnc(encrypter, srcIn, encOut)
	if err != nil {
		t.Fatal(err)
	}
	fmt.Printf("原文: %02X\n", src)
	fmt.Printf("加密: %02X\n", encOut.Bytes())

	decrypter := cipher.NewCBCDecrypter(block, iv)
	decOut := bytes.NewBuffer(make([]byte, 0, 1024))
	err = P7BlockDecrypt(decrypter, encOut, decOut)
	if err != nil {
		t.Fatal(err)
	}

	fmt.Printf("解密: %02X\n", decOut.Bytes())
	if !bytes.Equal(src, decOut.Bytes()) {
		t.Fatalf("实际解密结果: %02X, 期待结果: %02X", decOut.Bytes(), src)
	}
}