[M3devel] Extending the tests, was: Re: M3Path.FixPath rewrite?

Olaf Wagner wagner at elegosoft.com
Tue Feb 26 11:36:07 CET 2008


Quoting Jay <jayk123 at hotmail.com>:

> M3Path.FixPath had some flaws, mainly:  it uses a fixed size array   
> to store the locations of path separators  in the presence of too   
> many separators, it'd ignore stuff  every occurence of . or ..   
> causes it to restart its work (after removing it)
> I have written a new version with these aspects fixed.
> Anyone care to try it out?
> diff and m3path.m3 attached.
> There's a small test harness built in, disabled.
> You can feed strings through the old and new and compare.
> They don't always match. I think my results are "more correct".

Sorry, it will take some time till I can test these.

Why don't you add the test to the package test framework
in m3-sys/cm3/tests/src/TestM3Path or similar?
Provide a list of input paths and expected output in files;
this will make things easier to understand for others.
If you add the tests first and wait one day until checking in
your change we can see the impacts in the package test results
in our tinderbox.

Generally I think we should start adding tests for everything we
change; there's so much breakage that can be avoided this way.

Olaf
-- 
Olaf Wagner -- elego Software Solutions GmbH
                Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany
phone: +49 30 23 45 86 96  mobile: +49 177 2345 869  fax: +49 30 23 45 86 95
    http://www.elegosoft.com | Geschäftsführer: Olaf Wagner | Sitz: Berlin
Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194




More information about the M3devel mailing list