Jump to content

Unit Testing


photo

Recommended Posts

Posted

Hi,

 

Has anyone had experience with creating unit tests for Unigine script?  

 

We are running into some issues with creating tests since they are integrated at compile time where as unigine scripts are runtime

 

Thanks,

Simon

Posted

I do a bit of it

The basic method I used is

namespace [namespace] {

  void init() {
    // actual init code

#ifdef UNITTEST
    unittest();
#endif
  }

  void unittest {
    // unit tests for this namespace
  }

}
×
×
  • Create New...