mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-30 06:12:20 -06:00
Bazaar: GoogleTestUIExample now shows how to simulate click and mock action.
git-svn-id: svn://ultimatepp.org/upp/trunk@14992 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
5f3d6509e1
commit
e39620c940
4 changed files with 33 additions and 15 deletions
|
|
@ -7,11 +7,11 @@ AppWindow::AppWindow()
|
|||
Title("App Window");
|
||||
SetRect(0, 0, 200, 200);
|
||||
button.SetLabel("Hello world!");
|
||||
button << [=] { OnClick(); };
|
||||
button << [=] { OnButtonClick(); };
|
||||
Add(button.HSizePos(25, 25).VSizePos(50, 50));
|
||||
}
|
||||
|
||||
void AppWindow::OnClick()
|
||||
void AppWindow::OnButtonClick()
|
||||
{
|
||||
if(PromptYesNo("Button was clicked. Do you want to quit?")) {
|
||||
Break();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue