Skip to content

Result Comparison dialogue box has the 'actual' and 'expected' sections the wrong way round #42

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

Closed
SlimerDude opened this issue Jan 6, 2015 · 0 comments

Comments

@SlimerDude
Copy link
Collaborator

While the Fantom Test::verifyEq() does imply actual and expected parameter names:

Void verifyEq(Obj? a, Obj? b, Str? msg := null)

It's native Java method implementation does:

public void verifyEq(Object expected, Object actual) { verifyEq(expected, actual, null); }
public void verifyEq(Object expected, Object actual, String msg)

This is apparent when actual and expected are strings with a different number of lines:

class MyTest: Test {
    Void test1() {
        verifyEq("line1 \n line 2", "line 1")
    }
}

produces

TEST FAILED
sys::TestErr: Test failed: Expected 2 lines, actual 1 lines

Following the standard of expected being the first parameter, if I write:

class MyTest : Test {
    Void test2() {
        verifyEq("expected", "actual")
    }
}

It obviously fails, but if I double click on the failure, I get this dialogue:
expectedactual

It could be argued that Fantom should reverse its parameter list, but I don't think Brian will buy it!

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