combined windows and unix arch internet test, there can be only one!

This commit is contained in:
Nick Bolton 2014-03-14 18:32:34 +00:00
parent bdb2ff5967
commit ab529fae41
3 changed files with 4 additions and 51 deletions

View File

@ -17,28 +17,11 @@
file(GLOB_RECURSE headers "*.h") file(GLOB_RECURSE headers "*.h")
file(GLOB_RECURSE sources "*.cpp") file(GLOB_RECURSE sources "*.cpp")
# remove arch files (specific arch added later).
file(GLOB remove_arch "arch/*")
list(REMOVE_ITEM headers ${remove_arch})
list(REMOVE_ITEM sources ${remove_arch})
# remove platform files (specific platform added later). # remove platform files (specific platform added later).
file(GLOB remove_platform "platform/*") file(GLOB_RECURSE remove_platform "platform/*")
list(REMOVE_ITEM headers ${remove_platform}) list(REMOVE_ITEM headers ${remove_platform})
list(REMOVE_ITEM sources ${remove_platform}) list(REMOVE_ITEM sources ${remove_platform})
# arch
if (WIN32)
file(GLOB arch_sources "arch/ArchWindows*.cpp")
file(GLOB arch_headers "arch/ArchWindows*.h")
elseif (UNIX)
file(GLOB arch_sources "arch/ArchUnix*.cpp")
file(GLOB arch_headers "arch/ArchUnix*.h")
endif()
list(APPEND sources ${arch_sources})
list(APPEND headers ${arch_headers})
# platform # platform
if (WIN32) if (WIN32)
file(GLOB platform_sources "platform/MSWindows*.cpp") file(GLOB platform_sources "platform/MSWindows*.cpp")

View File

@ -15,16 +15,16 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "arch/ArchInternetUnix.h" #include "arch/Arch.h"
#include "test/global/gtest.h" #include "test/global/gtest.h"
#define TEST_URL "https://synergy-foss.org/tests/?testString" #define TEST_URL "https://synergy-foss.org/tests/?testString"
//#define TEST_URL "http://localhost/synergy/tests/?testString" //#define TEST_URL "http://localhost/synergy/tests/?testString"
TEST(CArchInternetWindowsTests, openWebPage) TEST(ArchInternetTests, get)
{ {
CArchInternetUnix internet; ARCH_INTERNET internet;
CString result = internet.get(TEST_URL); CString result = internet.get(TEST_URL);
ASSERT_EQ("Hello world!", result); ASSERT_EQ("Hello world!", result);
} }

View File

@ -1,30 +0,0 @@
/*
* synergy -- mouse and keyboard sharing utility
* Copyright (C) 2014 Bolton Software Ltd.
*
* This package is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* found in the file COPYING that should have accompanied this file.
*
* This package is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "arch/ArchInternetWindows.h"
#include "test/global/gtest.h"
#define TEST_URL "https://synergy-foss.org/tests/?testString"
//#define TEST_URL "http://localhost/synergy/tests/?testString"
TEST(CArchInternetWindowsTests, openWebPage)
{
CArchInternetWindows internet;
CString result = internet.get(TEST_URL);
ASSERT_EQ("Hello world!", result);
}