6.14. testing

The testing module simplifies writing and running tests in an ad-hoc fashion.

typeOne

this type is used for discovering leaks and double frees. It holds an integer value as well as a pointer to a single reference on the heap which is 1 as long as the object exists, otherwise 0. The refcount is leaked in order to not cause segfaults when a double free occurs.

In addition, a global refcounter is updated which can be checked for balance.

inline__!= ( cls T )
inline__< ( cls T )
inline__<= ( cls T )
inline__== ( cls T )
inline__> ( cls T )
inline__>= ( cls T )
fn__drop ( self )
fn__repr ( self )
inline__typecall ( cls value )
fncheck ( self )
fnrefcount ()
fntest-refcount-balanced ()
fnvalue ( self )
sugar(features ... )
sugar(test ... )
sugar(test-compiler-error ... )
sugar(test-error ... )
sugar(test-modules ... )