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

Example in 2.13 for testShout - text does not match figure #203

Open
swilliamson24060 opened this issue May 9, 2017 · 6 comments
Open

Comments

@swilliamson24060
Copy link

swilliamson24060 commented May 9, 2017

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?

@Ducasse
Copy link
Member

Ducasse commented May 9, 2017

Tx for the report.
Yes this is the same.

@Ducasse
Copy link
Member

Ducasse commented May 9, 2017

assert:= and assert:equal: do the same

@swilliamson24060
Copy link
Author

What about the parens? Do they belong or should they be omitted?

@Ducasse
Copy link
Member

Ducasse commented May 9, 2017

The parenthesis in this example do not change anything. Because keyword: (assert:) message takes precedence over binary (=)

@bencoman
Copy link
Contributor

That doesn't sound right. Otherwise...
Transcript show: 1 = 2
would output "1" instead of "false",

@cdlm
Copy link
Member

cdlm commented May 10, 2017

Stef mistyped :)
Precedence is still (in decreasing order) parentheses then unary then binary then keyword messages then left-to-right.

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

4 participants