/
YakuninAV
/
Convertors
Обзор
Документация
Войти
/
YakuninAV
/
Convertors
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Test/DBDTestApp.lpr
106 строк
2 KB
YakuninAV
begin with gitflick
31 июл 2026, 15:21
31 июл 2026, 15:21
1dc0fc6
Код
Авторство
О чём код?
program DBDTestApp; {$I mormot.defines.inc} {$ifdef MSWINDOWS} {$apptype console} {$R mormot.win.default.manifest.res} {$endif MSWINDOWS} uses {$IFDEF UNIX}{$IFDEF UseCThreads} cthreads, {$ENDIF}{$ENDIF} Classes, SysUtils, CustApp, { you can add units after this } mormot.core.test, mormot.core.log, DBDUtf8Tests ; type { TDBDTestApplication } TDBDTestApplication = class(TCustomApplication) protected procedure DoRun; override; public constructor Create(TheOwner: TComponent); override; destructor Destroy; override; procedure WriteHelp; virtual; end; { TDBDTests } TDBDTests = class(TSynTestsLogged) published procedure CoreUTF8; end; { TDBDTests } procedure TDBDTests.CoreUTF8; begin AddCase([TDBDRusUTF8]); end; { TDBDTestApplication } procedure TDBDTestApplication.DoRun; var ErrorMsg: String; begin // quick check parameters ErrorMsg:=CheckOptions('h', 'help'); if ErrorMsg<>'' then begin ShowException(Exception.Create(ErrorMsg)); Terminate; Exit; end; // parse parameters if HasOption('h', 'help') then begin WriteHelp; Terminate; Exit; end; { add your program here } TDBDTests.RunAsConsole('DBD Regression Tests', LOG_VERBOSE); {$ifdef FPC_X64MM} WriteHeapStatus(' ', 16, 8, {compileflags=}true); {$endif FPC_X64MM} // stop program loop Terminate; end; constructor TDBDTestApplication.Create(TheOwner: TComponent); begin inherited Create(TheOwner); StopOnException:=True; end; destructor TDBDTestApplication.Destroy; begin inherited Destroy; end; procedure TDBDTestApplication.WriteHelp; begin { add your help code here } writeln('Usage: ', ExeName, ' -h'); end; var Application: TDBDTestApplication; {$R *.res} begin Application:=TDBDTestApplication.Create(nil); Application.Title:='My Application'; Application.Run; Application.Free; end.