Assertions are statements that check whether certain conditions are true. They are used to validate that the actual results of a code snippet match the expected outcomes. By using assertions, developers can ensure that their code behaves as intended and identify potential bugs or issues early in the development process.
The convention for passing assertion arguments is to pass the expected value as the first argument and the actual value as the second argument. This convention is based on the idea that the expected value is what the code is supposed to produce, and the actual value is what the code actually produces. By passing the expected value first, it is easier to understand the intent of the assertion and to quickly identify any errors that may be present. Additionally, many testing frameworks and libraries expect assertion arguments to be passed in this order, so following the convention can help ensure that your code works correctly with these tools.
Swap the order of the assertion arguments so that the expected value is passed as the first argument and the actual value is passed as the second argument.