15 lines
544 B
C
15 lines
544 B
C
/*
|
|
File: assert.h
|
|
Author: Taylor Robbins
|
|
Date: 08\28\2025
|
|
*/
|
|
|
|
#ifndef _ASSERT_H
|
|
#define _ASSERT_H
|
|
|
|
#define assert(condition) do { if (!(condition)) { jsStdAssertFailure(__FILE__, __LINE__, __func__, #condition, nullptr); } } while(0)
|
|
//NOTE: assert_msg is not a standard function but we want to be able to pass a message to jsStdAssertFailure so we added this variant
|
|
#define assert_msg(condition, message) do { if (!(condition)) { jsStdAssertFailure(__FILE__, __LINE__, __func__, #condition, (message)); } } while(0)
|
|
|
|
#endif // _ASSERT_H
|