I modified it by making "Expression" into "Not Expression", and then by adding "RaiseError", and it is cross platform compatible as I am raising an error that works on Windows, Linux, and Mac.
Code: Select all
Macro DoubleQuote
"
EndMacro
Macro Assert(Expression)
CompilerIf #PB_Compiler_Debugger ; Only enable assert in debug mode
If Not Expression
Debug "Assert (Line " + #PB_Compiler_Line + "): " + DoubleQuote#Expression#DoubleQuote
RaiseError(#PB_OnError_Breakpoint)
EndIf
CompilerEndIf
EndMacro
Code: Select all
CompilerIf #DEBUG_PROCESS
IncludeFile "test.pb"
RunTests()
CompilerEndIf
RunProgram()