[Pharo-users] still failing test
sergi.reyner at gmail.com
Sun Mar 30 14:06:00 EDT 2014
2014-03-30 18:55 GMT+01:00 Roelof Wobben <r.wobben at home.nl>:
> self assert: ('Don''t panic' shout = 'DON""T PANIC!')
You properly doubled the single quote inside the first string. However, you
used two double quotes inside the second string; replace them with two
You also have an exclamation sign in the second string which is not in the
first one. Remove it and the test will pass. Note that the exclamation mark
in the following method is inside a comment:
After that I added this as described in the book.
> ^ self asUppercase. "!"
This is fine. The ending period is not needed, though. Periods work as
statement separators in Smalltalk, not terminators as semicolons in C, for
If you really want to have an exclamation mark added to the string, you
should implement shout as this:
^ self asUppercase , '!'
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pharo-users