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:
klugier 2020-09-05 23:56:21 +00:00
parent 5f3d6509e1
commit e39620c940
4 changed files with 33 additions and 15 deletions

View file

@ -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();