Skip to content

assert.IsIncreasing can return false without failing the test #1419

@brackendawson

Description

@brackendawson

go.dev/play

package main

import (
	"testing"

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

func Test(t *testing.T) {
	if !assert.IsIncreasing(t, 0) {
		t.Log("assertion is false, test should fail")
	}
}

yields

=== RUN   Test
    prog_test.go:11: assertion is false, test should fail
--- PASS: Test (0.00s)
PASS

#1124 would fix this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions