UpdatedPharoByExample
UpdatedPharoByExample copied to clipboard
Example in 2.13 for testShout - text does not match figure
The text says: We can turn our ”NoPanic” code example into the test method itself:
testShout
self assert: ('No panic' shout = 'NO PANIC!')
However, the figure shows:
testShout
self assert: 'No panic' shout = 'NO PANIC!'
The text also is confusing, or incomplete. It states that the Code Checker will inform you that the message is not implemented. It actually gives you two errors. The first is
Use assert: equals: instead of assert: and =
So for the reader, should they accept this change?
Tx for the report. Yes this is the same.
assert:= and assert:equal: do the same
What about the parens? Do they belong or should they be omitted?
The parenthesis in this example do not change anything. Because keyword: (assert:) message takes precedence over binary (=)
That doesn't sound right. Otherwise... Transcript show: 1 = 2 would output "1" instead of "false",
Stef mistyped :) Precedence is still (in decreasing order) parentheses then unary then binary then keyword messages then left-to-right.