Skip to content

NotEqual tests equality for different types #388

@momoneko

Description

@momoneko

NotEqual does not complain when you try to test values of different types.

For example, if I run go test with this code, it passes just fine.

package main

import (
	"testing"

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

func TestBeep(t *testing.T) {
	assert.NotEqual(t, 1, "Hello")
}

It should loudly complain, or, even better, not compile.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions