Can't we just catch exceptions in the regression tests? Or is that inconvenient because all function tests are in the same cpp file? To implement your solution I guess we just need another function like the set_float_formatting() which does: format["exception"] = format["warning"] this function can be called from compiler.py when checking the options, will that work?
Kristian On 30 January 2010 00:23, <nore...@launchpad.net> wrote:
------------------------------------------------------------ revno: 1594 committer: Anders Logg <l...@simula.no> branch nick: ffc-dev timestamp: Sat 2010-01-30 00:21:06 +0100 message: Add comment about how to deal correctly with warnings vs expections. I think I figured out the correct solution, but it doesn't have to be implemented now. modified: ffc/cpp.py -- lp:~ffc-core/ffc/dev https://code.launchpad.net/~ffc-core/ffc/dev You are subscribed to branch lp:~ffc-core/ffc/dev. To unsubscribe from this branch go to https://code.launchpad.net/~ffc-core/ffc/dev/+edit-subscription. === modified file 'ffc/cpp.py' --- ffc/cpp.py 2010-01-29 23:18:30 +0000 +++ ffc/cpp.py 2010-01-29 23:21:06 +0000 @@ -18,10 +18,17 @@ # FIXME: AL: This files needs cleaning up! +# FIXME: AL: In places where we have non-implemented functions +# FIXME: print a warning message instead of throwing an exception +# FIXME: we should throw an exception and instead have a command-line +# FIXME: option for converting exceptions to warnings that can be +# FIXME: used from the regression test script. + # Formatting rules # FIXME: KBO: format is a builtin_function, i.e., we should use a different name. format = {} + # Program flow format.update({"return": lambda v: "return %s;" % str(v), "grouping": lambda v: "(%s)" % v,
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Mailing list: https://launchpad.net/~ffc Post to : ffc@lists.launchpad.net Unsubscribe : https://launchpad.net/~ffc More help : https://help.launchpad.net/ListHelp