Skip to content

Type mismatch silent ignored #13

Description

@cdalexndr

TestNG Version

7.4.0

Assert.assertNotEquals(0L, 0);
or a mehot returning long (primitive):
Assert.assertNotEquals(longMethod(), 0);

Expected behavior

AssertionError

Actual behavior

No error, silent assertion mismatch.
Values are compared as Objects, so Long != Integer.

Is the issue reproductible on runner?

  • Shell
  • Maven
  • Gradle
  • Ant
  • Eclipse
  • IntelliJ
  • NetBeans

Test case sample

https://github.com/cdalexndr/testng-issue-2561

Oddly, If I add the above test into the testng main repo project test, the test works.
It may also be compiler dependent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions