> I get three fails of your 'meta' tests:
>
> #testIdentifier - 'Got ''$a'', but expected ''a'''
> #testCamelCase - '#normalizeCamelCase: is not idempotent'   (puts in an
> extra space) 'Camel  Case' vs 'Camel Case'
> #testSelector - '#normalizeSelector: is not idempotent'

Are you sure you have the latest code loaded
(Refactoring-Spelling-lr.19)? Because I fixed those bugs.

> also in the original tests on real classes
>
> RBArgumentVariableNamesSpellingClass>>argumentVariableNamesSpelling: rong
> <- not flagged
>        ^self

'rong' is in the dictionary as a correct word thus it is correct. The
tests that work on code should only test the extraction of text from
code, not other things like the spell checker itself. That's why I
moved such tests to a separate class (RBSpellCheckerTest).

Of course you can argue that it is a bug to have 'rong' in the
dictionary. Could be that this was part of some slang or abbreviations
dictionary I've included. I bet nobody wants to go through this list
of almost a million words and check them all?

> 'IT' 'OK and 'don't' are all flagged - don't is not flagged. Is this your
> preferred behaviour?

They are all not flagged on my machine. Neither with the internal nor
with the mac spelling.

> What do you think about including the 'real' tests as well as the meta
> tests?

I don't like it at all. I hate the situation we currently have with
Slime. We will have to fix that. People run the rules on the complete
image and then they suddenly have dozens of errors that do not matter.

> Real tests also have the benefit of serving as examples to people who are
> trying to use tests to understand the system. And there might be a risk that
> a meta test passes without testing the real live situation.

These are negative examples. You don't want to show a newbie negative
examples. It is also dangerous in books to show examples of how not to
do it. People don't always understand/read everything and just copy
and past whatever they see.

After all these are not meta-examples, these are just like the real
examples. Except that the code is only present in the image while the
tests run.

Lukas

-- 
Lukas Renggli
http://www.lukas-renggli.ch

_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to