我不确定如何使用 DUnitX 将一些字符串输出到控制台窗口,所以这是我的尝试:
unit Unit1;
interface
uses
DUnitX.TestFramework;
type
[TestFixture]
TMyTestObject = class(TObject)
public
// Sample Methods
// Simple single Test
// Test with TestCase Attribute to supply parameters.
[Test]
[TestCase('TestA','1,2,3')]
[TestCase('TestB','3,4,7')]
procedure Test1(AValue1, AValue2, _Result : Integer);
end;
procedure TMyTestObject.Test1(AValue1, AValue2, _Result: Integer);
begin
TDUnitX.CurrentRunner.Log(TLogLevel.Information, 'Information');
end;
initialization
TDUnitX.RegisterTestFixture(TMyTestObject);
end.
什么都没有打印出来,所以我应该怎么写呢?