瀏覽代碼

Modify BS_TEST_ASSERT to use __FUNCTION__ as a description

Marc Legendre 9 年之前
父節點
當前提交
08f6ff3d36
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      Source/BansheeUtility/Include/BsTestSuite.h

+ 2 - 2
Source/BansheeUtility/Include/BsTestSuite.h

@@ -13,7 +13,7 @@ namespace BansheeEngine
 	 */
 	 */
 
 
 /** Tests if condition is true, and reports unit test failure if it fails. */
 /** Tests if condition is true, and reports unit test failure if it fails. */
-#define BS_TEST_ASSERT(expr) assertment((expr), "", __FILE__, __LINE__); 
+#define BS_TEST_ASSERT(expr) assertment((expr), __FUNCTION__, __FILE__, __LINE__); 
 
 
 /** Tests if condition is true, and reports unit test failure with a message if it fails. */
 /** Tests if condition is true, and reports unit test failure with a message if it fails. */
 #define BS_TEST_ASSERT_MSG(expr, msg) assertment((expr), msg, __FILE__, __LINE__); 
 #define BS_TEST_ASSERT_MSG(expr, msg) assertment((expr), msg, __FILE__, __LINE__); 
@@ -94,4 +94,4 @@ namespace BansheeEngine
 #define BS_ADD_TEST(func) addTest(static_cast<Func>(&func), #func);
 #define BS_ADD_TEST(func) addTest(static_cast<Func>(&func), #func);
 
 
 	/** @} */
 	/** @} */
-}
+}