Allow test reports to specify an explicit file name and line number
using the extended okx() macro. This allows large blocks of test
report code such as tcpip_random_ok() to be implemented as functions
rather than macros.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
* Report test result
*
* @v success Test succeeded
+ * @v file File name
+ * @v line Line number
*/
-#define ok( success ) do { \
- test_ok ( (success), __FILE__, __LINE__, #success ); \
- } while ( 0 )
+#define okx( success, file, line ) \
+ test_ok ( success, file, line, #success )
+#define ok( success ) \
+ okx ( success, __FILE__, __LINE__ )
#endif /* _IPXE_TEST_H */