lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> Good enough for me - but then if the behaviour is undefined, why is it
> in the tests? :)

Another non-written rule in Lua is that, even for undefined behavior,
the interpreter should not crash. So, the tests must cover undefined
cases too.

Moreover, Lua uses whitebox testing. Many tests in Lua assume specific
behaviors that we know it is true for that specific implementation. (For
instance, several tests assume specific wordings for error messages.)
This test style allows much more strict tests, which are not possible
testing only the specification.

-- Roberto