Add mytest
This commit is contained in:
parent
5fc5095224
commit
d96b3c865b
|
@ -0,0 +1,3 @@
|
||||||
|
[Config]
|
||||||
|
BaseUrl=http://localhost:6789/tests
|
||||||
|
ExecuteTests=0
|
|
@ -71,6 +71,10 @@
|
||||||
<Filename Value="src\os\win\win.hotkey.pas"/>
|
<Filename Value="src\os\win\win.hotkey.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
</Unit>
|
</Unit>
|
||||||
|
<Unit>
|
||||||
|
<Filename Value="test\mytest.pas"/>
|
||||||
|
<IsPartOfProject Value="True"/>
|
||||||
|
</Unit>
|
||||||
</Units>
|
</Units>
|
||||||
</ProjectOptions>
|
</ProjectOptions>
|
||||||
<CompilerOptions>
|
<CompilerOptions>
|
||||||
|
@ -81,7 +85,7 @@
|
||||||
</Target>
|
</Target>
|
||||||
<SearchPaths>
|
<SearchPaths>
|
||||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||||
<OtherUnitFiles Value="src\view;src\os\win;src\components\config;src\model;src\components\hotkey"/>
|
<OtherUnitFiles Value="src\view;src\os\win;src\components\config;src\model;src\components\hotkey;test"/>
|
||||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||||
</SearchPaths>
|
</SearchPaths>
|
||||||
<Linking>
|
<Linking>
|
||||||
|
|
|
@ -10,7 +10,7 @@ uses
|
||||||
athreads,
|
athreads,
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
Interfaces, // this includes the LCL widgetset
|
Interfaces, // this includes the LCL widgetset
|
||||||
Forms, TMainForm, App, Config, ConfigVO, pair, Hotkey, win.hotkey;
|
Forms, TMainForm, App, Config, ConfigVO, pair, Hotkey, win.hotkey, MyTest;
|
||||||
|
|
||||||
{$R *.res}
|
{$R *.res}
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,7 @@ object MainUI: TMainUI
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
TextHint = 'Hi, Power tools'
|
TextHint = 'Hi, Power tools'
|
||||||
|
OnChange = MainEditChange
|
||||||
OnKeyPress = MainEditKeyPress
|
OnKeyPress = MainEditKeyPress
|
||||||
end
|
end
|
||||||
object MainTrayIcon: TTrayIcon
|
object MainTrayIcon: TTrayIcon
|
||||||
|
|
|
@ -33,6 +33,7 @@ type
|
||||||
ShowOrHideMenu: TMenuItem;
|
ShowOrHideMenu: TMenuItem;
|
||||||
TrayPopupMenu: TPopupMenu;
|
TrayPopupMenu: TPopupMenu;
|
||||||
procedure FormShortCut(var Msg: TLMKey; var Handled: boolean);
|
procedure FormShortCut(var Msg: TLMKey; var Handled: boolean);
|
||||||
|
procedure MainEditChange(Sender: TObject);
|
||||||
procedure ShowOrHideMainUI();
|
procedure ShowOrHideMainUI();
|
||||||
procedure ExitMenuClick(Sender: TObject);
|
procedure ExitMenuClick(Sender: TObject);
|
||||||
procedure MainEditKeyPress(Sender: TObject; var Key: char);
|
procedure MainEditKeyPress(Sender: TObject; var Key: char);
|
||||||
|
@ -43,6 +44,9 @@ type
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
const
|
||||||
|
DEFAULT_UI_HEIGHT = 40;
|
||||||
|
|
||||||
var
|
var
|
||||||
MainUI: TMainUI;
|
MainUI: TMainUI;
|
||||||
|
|
||||||
|
@ -69,6 +73,11 @@ begin
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TMainUI.MainEditChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TMainUI.ShowOrHideMenuClick(Sender: TObject);
|
procedure TMainUI.ShowOrHideMenuClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
MainUI.ShowOrHideMainUI();
|
MainUI.ShowOrHideMainUI();
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
unit mytest;
|
||||||
|
|
||||||
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Classes, SysUtils, fpcunit, testutils, testregistry;
|
||||||
|
|
||||||
|
type
|
||||||
|
|
||||||
|
TDemoTest = class(TTestCase)
|
||||||
|
published
|
||||||
|
procedure TestHookUp;
|
||||||
|
end;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
procedure TDemoTest.TestHookUp;
|
||||||
|
begin
|
||||||
|
Fail('Write your own test');
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
initialization
|
||||||
|
|
||||||
|
RegisterTest(TDemoTest);
|
||||||
|
end.
|
Loading…
Reference in New Issue