[asterisk-commits] mnicholson: branch mnicholson/asttest r170389 - /team/mnicholson/asttest/astt...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jan 22 22:33:05 CST 2009


Author: mnicholson
Date: Thu Jan 22 22:33:05 2009
New Revision: 170389

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=170389
Log:
Added functions to the test lib

 * asttest/lib/asttest.lua: added a fail_if function and reimplemented the
 check function around it

Modified:
    team/mnicholson/asttest/asttest/lib/asttest.lua

Modified: team/mnicholson/asttest/asttest/lib/asttest.lua
URL: http://svn.digium.com/svn-view/asterisk/team/mnicholson/asttest/asttest/lib/asttest.lua?view=diff&rev=170389&r1=170388&r2=170389
==============================================================================
--- team/mnicholson/asttest/asttest/lib/asttest.lua (original)
+++ team/mnicholson/asttest/asttest/lib/asttest.lua Thu Jan 22 22:33:05 2009
@@ -61,10 +61,15 @@
 -- utility functions
 --
 
--- fail if condition is false using message as the reason
-function check(condition, message)
-	if not condition then
+-- fail if the given condition is met
+function fail_if(condition, message)
+	if condition then
 		return fail(message)
 	end
 end
 
+-- fail if condition is false using message as the reason
+function check(condition, message)
+	fail_if(not condition, message)
+end
+




More information about the asterisk-commits mailing list