EuTest

EuTest is bundled with binary releases of Euphoria. It enables one to test Euphoria but more importantly to test their own code. An example test case is as simple as:


t_simple_math.e


include std/unittest.e 
 
test_equal("1+1 is 2, right?", 2, 1+1) 
test_equal("2+2 is 18, right?", 18, 2+2) 
 
test_report() 

running


C:\MyLib\tests> eutest t_simple_math.e 
interpreting t_simple_math.e: 
  passed: 1+1 is 2, right? 
  failed: 2+2 is 18, right?, expected: 18 but got: 4 
  2 tests run, 1 passed, 1 failed, 50.0% success 


If your directory has many t_*.e files, you can simply run eutest with out any parameters and it'll execute all test files in the current directory.

Not Categorized, Please Help

Search



Quick Links

User menu

Not signed in.

Misc Menu