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: filters_test.go
    path of file: ./repos/gocv/cuda
    
    the code of the file until where you have to start completion: package cuda

import (
	"image"
	"testing"

	"gocv.io/x/gocv"
)

func TestGaussianFilter_Apply(t *testing.T) {
	src := gocv.IMRead("../images/face-detect.jpg", gocv.IMReadColor)
	if src.Empty() {
		t.Error("Invalid re
    
func TestSobelFilter_ApplyWithStream(t *testing.T) {
	src := gocv.IMRead("../images/face-detect.jpg", gocv.IMReadGrayScale)
	if src.Empty() {
		t.Error("Invalid read of Mat in SobelFilter test")
	}
	defer src.Close()

	cimg, dimg := NewGpuMat(), NewGpuMat()
	defer cimg.Close()
	defer dimg.Close()

	filter := NewSobelFilter(src.Type(), src.Type(), 0, 1)
	defer filter.Close()

	stream := NewStream()
	defer stream.Close()

	dest := gocv.NewMat()
	defer dest.Close()

	cimg.UploadWithStream(src, stream)
	filter.ApplyWithStream(cimg, &dimg, stream)
	dimg.DownloadWithStream(&dest, stream)

	stream.WaitForCompletion()

	if dest.Empty() {
		t.Error("Empty SobelFilter test")
	}
	if src.Rows() != dest.Rows() {
		t.Error("Invalid SobelFilter test rows")
	}
	if src.Cols() != dest.Cols() {
		t.Error("Invalid SobelFilter test cols")
	}
}