1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
| unit TestStringListUnt;
interface
uses
TestFrameWork,
TestCaseDfmUnt, // Détection de fuite de mémoire
Classes;
type
TTestStringList = class(TTestCaseDfm) // dérive de la classe Dfm //
published
procedure TestCreationDestruction();
end;
implementation
procedure TTestStringList.TestCreationDestruction;
var
MaListe : TStringList;
begin
MaListe := TStringList.Create;
MaListe.Free; // N'oubliez pas cette ligne !
end;
initialization
// publication pour exécution
TestFrameWork.RegisterTest(TTestStringList.Suite);
end. |
Partager