From 2a13927e70685030b0d3597787d8d54b9d973e16 Mon Sep 17 00:00:00 2001 From: klugier Date: Sat, 5 Sep 2020 18:58:40 +0000 Subject: [PATCH] Bazzar: GoogleTestUI unique configuration flag. git-svn-id: svn://ultimatepp.org/upp/trunk@14990 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- bazaar/GoogleTestUIExample/GoogleTestUIExample.upp | 6 ++++-- bazaar/GoogleTestUIExample/TestAppWindow.cpp | 11 ++++++----- bazaar/GoogleTestUIExample/TestMain.cpp | 2 +- bazaar/GoogleTestUIExample/main.cpp | 2 +- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/bazaar/GoogleTestUIExample/GoogleTestUIExample.upp b/bazaar/GoogleTestUIExample/GoogleTestUIExample.upp index f89f8627d..b954be1fa 100644 --- a/bazaar/GoogleTestUIExample/GoogleTestUIExample.upp +++ b/bazaar/GoogleTestUIExample/GoogleTestUIExample.upp @@ -1,7 +1,9 @@ +description "Automate UI testing with Google Test\377"; + uses CtrlLib; -uses(TESTING_TEST) plugin/gtest; +uses(TESTING_GOOGLE_TEST_UI_EXAMPLE) plugin/gtest; file AppWindow.h, @@ -13,5 +15,5 @@ file mainconfig "" = "GUI", - "" = "GUI TESTING_TEST"; + "" = "GUI TESTING_GOOGLE_TEST_UI_EXAMPLE"; diff --git a/bazaar/GoogleTestUIExample/TestAppWindow.cpp b/bazaar/GoogleTestUIExample/TestAppWindow.cpp index 2430c277c..2f3012a36 100644 --- a/bazaar/GoogleTestUIExample/TestAppWindow.cpp +++ b/bazaar/GoogleTestUIExample/TestAppWindow.cpp @@ -1,4 +1,4 @@ -#ifdef flagTESTING_TEST +#ifdef flagTESTING_GOOGLE_TEST_UI_EXAMPLE #include "AppWindow.h" @@ -44,11 +44,12 @@ TEST_F(AppWindowTest, ApperanceTest) if (!FileExists(fileName)) { encoder.SaveFile(fileName, id); Cout() << "Non referal window image. Creating and failing test..\n"; - EXPECT_TRUE(false); - } else { - auto img = StreamRaster::LoadFileAny(fileName); - EXPECT_EQ(img, id); + ASSERT_TRUE(false); + return; } + + auto img = StreamRaster::LoadFileAny(fileName); + EXPECT_EQ(img, id); } #endif diff --git a/bazaar/GoogleTestUIExample/TestMain.cpp b/bazaar/GoogleTestUIExample/TestMain.cpp index 6e72601e8..e00e6d027 100644 --- a/bazaar/GoogleTestUIExample/TestMain.cpp +++ b/bazaar/GoogleTestUIExample/TestMain.cpp @@ -1,4 +1,4 @@ -#ifdef flagTESTING_TEST +#ifdef flagTESTING_GOOGLE_TEST_UI_EXAMPLE #include #include diff --git a/bazaar/GoogleTestUIExample/main.cpp b/bazaar/GoogleTestUIExample/main.cpp index 8e331f818..21c34c6eb 100644 --- a/bazaar/GoogleTestUIExample/main.cpp +++ b/bazaar/GoogleTestUIExample/main.cpp @@ -4,7 +4,7 @@ using namespace Upp; -#ifndef flagTESTING_TEST +#ifndef flagTESTING_GOOGLE_TEST_UI_EXAMPLE GUI_APP_MAIN { AppWindow().Run();