We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When asserting equality of 2 lists with multi-line strings the error message is a bit confusing. Consider code below:
%new-style %requires QUnit %exec-class Test class Test inherits QUnit::Test { constructor() : QUnit::Test("Test", "1.0") { addTestCase("test foo", \test_foo()); set_return_value(main()); } test_foo() { list l1 = ("hello\nworld",); list l2 = ("hello\nmars",); assertEq(l1, l2); } }
And the output:
Assertion failure at a.q:17 [Test::test_foo()] ----- >> Expected: >> -------------------- >> list: (1 element) >> [0]="hello >> world" >> -------------------- >> Actual: >> -------------------- >> list: (1 element) >> [0]="hello >> mars" >> -------------------- >> Details: >> -------------------- >> The values of [0] differ: >> expected: "hello (string) >> actual: "hello (string) >> -------------------- ----- Ran 1 test case, 1 error (1 assertion, 0 succeeded)
The details are confusing, because there is only the first line of the string. It's probably intended, because I can see that there is a shorten function: https://github.com/qorelanguage/qore/blob/develop/qlib/QUnit.qm#L1082 But is it really necessary to shorten the message?
shorten
The text was updated successfully, but these errors were encountered:
refs #2680 improved QUnit output in assertion failures for strings wi…
7fd83b4
…th special whitespace and for multi-line data structures
Merge pull request #2693 from qorelanguage/bugfix/2680_QUnit_output_fix
3d6bc37
davidnich
No branches or pull requests
When asserting equality of 2 lists with multi-line strings the error message is a bit confusing. Consider code below:
And the output:
The details are confusing, because there is only the first line of the string. It's probably intended, because I can see that there is a
shorten
function: https://github.com/qorelanguage/qore/blob/develop/qlib/QUnit.qm#L1082But is it really necessary to shorten the message?
The text was updated successfully, but these errors were encountered: