Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In the TCK parameters to Assert.assertEquals are reversed in some cases #221

Open
tjquinno opened this issue Jul 15, 2024 · 0 comments
Open

Comments

@tjquinno
Copy link

tjquinno commented Jul 15, 2024

Describe the bug

At least some code in the TCKs reverses the expected and actual parameters in the Assert.assertEquals method invocations.

One example:

Assert.assertEquals(BAGGAGE_VALUE, server.getAttributes().get(BAGGAGE_VALUE_ATTR));
Assert.assertEquals(BAGGAGE_METADATA, server.getAttributes().get(BAGGAGE_METADATA_ATTR));

The first parameter should be the actual value and the second the expected value

https://javadoc.io/static/org.testng/testng/7.10.2/org/testng/asserts/Assertion.html#assertEquals(boolean,boolean)

public static void assertEquals(int actual, int expected )

but they are reversed here (and possibly elsewhere).

If the implementation works correctly then the assertion passes anyway, so this is not a big problem but should be addressed eventually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant