Skip to content

Commit

Permalink
fpc support for underscore.delphi.springless
Browse files Browse the repository at this point in the history
  • Loading branch information
partouf committed Apr 22, 2024
1 parent c53760d commit 8e834c5
Show file tree
Hide file tree
Showing 4 changed files with 801 additions and 7 deletions.
55 changes: 55 additions & 0 deletions Tests/DUnitX.Stub.pas
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
unit DUnitX.Stub;

interface

uses
fpcunit;

type
Assert = class
public
class procedure IsTrue(const Value: Boolean);
class procedure IsFalse(const Value: Boolean);
class procedure AreEqual(const Expected, Value: Integer); overload;
class procedure AreEqual(const Expected, Value: string); overload;
class procedure Pass;
class procedure Fail;
end;

implementation

uses
testutils,
SysUtils;

class procedure Assert.IsTrue(const Value: Boolean);
begin
TAssert.AssertTrue(Value);
end;

class procedure Assert.IsFalse(const Value: Boolean);
begin
TAssert.AssertFalse(Value);
end;

class procedure Assert.AreEqual(const Expected, Value: Integer); overload;
begin
TAssert.AssertEquals(Expected, Value);
end;

class procedure Assert.AreEqual(const Expected, Value: string); overload;
begin
TAssert.AssertEquals(Expected, Value);
end;

class procedure Assert.Pass;
begin
// do nothing
end;

class procedure Assert.Fail;
begin
TAssert.Fail('Failed');
end;

end.
Loading

0 comments on commit 8e834c5

Please sign in to comment.