[M3devel] m3tests/cmp_fie vs. compare_file

Olaf Wagner wagner at elegosoft.com
Thu Jul 1 11:38:53 CEST 2010


Quoting Jay K <jay.krell at cornell.edu>:

>
> I find it confusing that m3-sys/m3tests/src/m3makefile contains both  
>  cmp_file and compare_file (unless one was a thin wrapper over the   
> other, not the case)
> Olaf you added cmp_file in   
> http://modula3.elegosoft.com/cgi-bin/cvsweb.cgi/cm3/m3-sys/m3tests/src/m3makefile.diff?r1=1.3;r2=1.4.
>
> Presumably they can be merged into one function?

compare_file() writes output and doesn't return anything meaningful
(it's a procedure), while cmp_file is a boolean state function that
doesn't write anything to stdout.

The first could be based on the second.

Of course you can find a common signature, but then you'll have to
change all occurences and add a use case parameter, which isn't nice,
too.

Perhaps you can suggest better names?

Please do not change the semantics (i.e. the use of @cmp, for example)
though, as that might break the regression tests.

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