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

import (
	"errors"
	"strings"
	"testing"

	"github.com/cilium/ebpf/internal/testutils/fdtrace"
)

func TestMain(m *testing.M) {
	fdtrace.TestMain(m)
}

func TestFeatureTest(t *testing.T) {
	var called bool

	fn := NewFeatureTest("foo", "1.0", func() error {
		called = true
		return nil
	})

	if called {
		t.Error("Function was called too early")
	}

	err := fn()
	if !called {
		t.Error("Function wasn't called")
	}

	if err != nil {
		t.Error("Unexpected negative resu
    
func TestFeatureTest(t *testing.T) {
	var called bool

	fn := NewFeatureTest("foo", "1.0", func() error {
		called = true
		return nil
	})

	if called {
		t.Error("Function was called too early")
	}

	err := fn()
	if !called {
		t.Error("Function wasn't called")
	}

	if err != nil {
		t.Error("Unexpected negative result:", err)
	}

	fn = NewFeatureTest("bar", "2.1.1", func() error {
		return ErrNotSupported
	})

	err = fn()
	if err == nil {
		t.Fatal("Unexpected positive result")
	}

	fte, ok := err.(*UnsupportedFeatureError)
	if !ok {
		t.Fatal("Result is not a *UnsupportedFeatureError")
	}

	if !strings.Contains(fte.Error(), "2.1.1") {
		t.Error("UnsupportedFeatureError.Error doesn't contain version")
	}

	if !errors.Is(err, ErrNotSupported) {
		t.Error("UnsupportedFeatureError is not ErrNotSupported")
	}

	err2 := fn()
	if err != err2 {
		t.Error("Didn't cache an error wrapping ErrNotSupported")
	}

	fn = NewFeatureTest("bar", "2.1.1", func() error {
		return errors.New("foo")
	})

	err1, err2 := fn(), fn()
	if err1 == err2 {
		t.Error("Cached result of unsuccessful execution")
	}
}