On 14/10/2010, at 5:22 PM, BGB wrote:

> sadly, if the tests prevented the project from building or running if they 
> failed, this would essentially leave the tests always (or almost always) 
> evaluating to true as the only really reasonable outcome in most cases...
> 
> granted, testing could have separate "warning" and "error" conditions, where 
> a warning condition is a test which fails, but the code can still be run 
> (only something minor has broken, or correct behavior remains as a future 
> goal), and an error condition is where "something has just gone horribly 
> wrong here", with the assumption that the test itself can be used to help 
> debug the problem.
> 
> 
> often, it is still needed to run even known broken code in order to help 
> better isolate the problem.
> now, preventing doing an official release with broken code is an altogether 
> different issue...

Unfortunately I've failed at communicating what I'm trying to say to you. I'm 
sorry.

Basically, I want something like Cucumber baked in at the lowest level 
possible. (cukes.info/)

In order to do this, I am suggesting that languages gain a checksum. This means 
that at a compiler-level, the code won't compile until your acceptance-tests 
pass. It verifies this because the testing suite builds out a checksum value 
and stamps it on the code to say it's okay and has worked. This checksum can be 
verified because it is computed at various levels of source-code (ie the 
method, the class, the entire source tree) and this checksum should be unique 
for every version of your code that exists because of the fact that the version 
will be different than other versions.

The assumption here is that behaviour-verification is a very good thing.

As we ALL DO IT ALL THE TIME for EVERYTHING, I'd say you cannot argue that it's 
not a good thing. The further assumption is that the describing and 
codification of this in (executable) human-natural-language (ie English most of 
the time, but not necessarily always English) is a good thing.

I personally think it is, or at least it should be a switchable module in every 
compiler / interpreter.

I'm interested if others think so, too?

Julian.
_______________________________________________
fonc mailing list
fonc@vpri.org
http://vpri.org/mailman/listinfo/fonc

Reply via email to