unit dunittests;

//
//  Utilities for writing unit tests.
//

{$MODE FPC}
{$MODESWITCH DEFAULTPARAMETERS}
{$MODESWITCH OUT}
{$MODESWITCH RESULT}

interface

function Check(Condition: Boolean; Msg: PAnsiString): Boolean;

implementation

function Check(Condition: Boolean; Msg: PAnsiString): Boolean;
begin
  if not Condition then
    Writeln(stdout, Msg);
  Exit(Condition);
end;

end.
