// Code generated by testifylint/internal/testgen. DO NOT EDIT.

package requireerror

import (
	"io"
	"os"
	"testing"

	"github.com/stretchr/testify/assert"
	"github.com/stretchr/testify/require"
)

func TestRequireErrorChecker(t *testing.T) {
	var err error
	var target = new(os.PathError)

	// Invalid.
	assert.NoError(t, err) // want "require-error: for error assertions use require"
	nop()
	assert.NoErrorf(t, err, "msg with args %d %s", 42, "42")            // want "require-error: for error assertions use require"
	assert.NotErrorIs(t, err, io.EOF)                                   // want "require-error: for error assertions use require"
	assert.NotErrorIsf(t, err, io.EOF, "msg with args %d %s", 42, "42") // want "require-error: for error assertions use require"

	// Valid.
	require.NoError(t, err)
	require.NoErrorf(t, err, "msg with args %d %s", 42, "42")
	require.NotErrorIs(t, err, io.EOF)
	require.NotErrorIsf(t, err, io.EOF, "msg with args %d %s", 42, "42")
	assert.Error(t, err)
	assert.Errorf(t, err, "msg with args %d %s", 42, "42")
	assert.ErrorIs(t, err, io.EOF)
	assert.ErrorIsf(t, err, io.EOF, "msg with args %d %s", 42, "42")
	assert.ErrorAs(t, err, &target)
	assert.ErrorAsf(t, err, &target, "msg with args %d %s", 42, "42")
	assert.EqualError(t, err, "end of file")
	assert.EqualErrorf(t, err, "end of file", "msg with args %d %s", 42, "42")
	assert.ErrorContains(t, err, "end of file")
	assert.ErrorContainsf(t, err, "end of file", "msg with args %d %s", 42, "42")
	require.Error(t, err)
	require.Errorf(t, err, "msg with args %d %s", 42, "42")
	require.ErrorIs(t, err, io.EOF)
	require.ErrorIsf(t, err, io.EOF, "msg with args %d %s", 42, "42")
	require.ErrorAs(t, err, &target)
	require.ErrorAsf(t, err, &target, "msg with args %d %s", 42, "42")
	require.EqualError(t, err, "end of file")
	require.EqualErrorf(t, err, "end of file", "msg with args %d %s", 42, "42")
	require.ErrorContains(t, err, "end of file")
	require.ErrorContainsf(t, err, "end of file", "msg with args %d %s", 42, "42")
}

func nop() {} // Hack against ignoring of "NoError" sequence.
