[mapguide-commits] r9679 - in sandbox/jng/ogc_viewer_representation/Web/src: . HttpHandler WebTestRunner WebTestRunner/TestData
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Tue Jul 21 02:46:26 PDT 2020
Author: jng
Date: 2020-07-21 02:46:25 -0700 (Tue, 21 Jul 2020)
New Revision: 9679
Added:
sandbox/jng/ogc_viewer_representation/Web/src/WebTestRunner/
sandbox/jng/ogc_viewer_representation/Web/src/WebTestRunner/OgcWfsTest.cpp
sandbox/jng/ogc_viewer_representation/Web/src/WebTestRunner/TestData/
sandbox/jng/ogc_viewer_representation/Web/src/WebTestRunner/TestData/README.txt
sandbox/jng/ogc_viewer_representation/Web/src/WebTestRunner/TestListener.cpp
sandbox/jng/ogc_viewer_representation/Web/src/WebTestRunner/WebTestRunner.rc
sandbox/jng/ogc_viewer_representation/Web/src/WebTestRunner/WebTestRunner.vcxproj
sandbox/jng/ogc_viewer_representation/Web/src/WebTestRunner/WebTestRunner.vcxproj.filters
sandbox/jng/ogc_viewer_representation/Web/src/WebTestRunner/main.cpp
sandbox/jng/ogc_viewer_representation/Web/src/WebTestRunner/resource.h
Modified:
sandbox/jng/ogc_viewer_representation/Web/src/HttpHandler/HttpRequest.cpp
sandbox/jng/ogc_viewer_representation/Web/src/WebTier.sln
Log:
Add MgWebTestRunner which is a test runner for various Web Tier components that need some kind of automated test coverage. Add a test that will currently fail, but will eventually pass once we complete this feature
Modified: sandbox/jng/ogc_viewer_representation/Web/src/HttpHandler/HttpRequest.cpp
===================================================================
--- sandbox/jng/ogc_viewer_representation/Web/src/HttpHandler/HttpRequest.cpp 2020-07-21 09:29:55 UTC (rev 9678)
+++ sandbox/jng/ogc_viewer_representation/Web/src/HttpHandler/HttpRequest.cpp 2020-07-21 09:46:25 UTC (rev 9679)
@@ -230,7 +230,7 @@
STRING sServiceValue = m_requestParam->GetParameterValue(MgHttpResourceStrings::reqWmsService);
if(sServiceValue.length() != 0 && (L"WFS" == MgUtil::ToUpper(sServiceValue) || L"WMS" == MgUtil::ToUpper(sServiceValue)))
{
- sParamValue = sServiceValue;
+ sParamValue = sServiceValue;
}
else
{
Added: sandbox/jng/ogc_viewer_representation/Web/src/WebTestRunner/OgcWfsTest.cpp
===================================================================
--- sandbox/jng/ogc_viewer_representation/Web/src/WebTestRunner/OgcWfsTest.cpp (rev 0)
+++ sandbox/jng/ogc_viewer_representation/Web/src/WebTestRunner/OgcWfsTest.cpp 2020-07-21 09:46:25 UTC (rev 9679)
@@ -0,0 +1,47 @@
+//
+// Copyright (C) 2004-2020 by Autodesk, Inc.
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of version 2.1 of the GNU Lesser
+// General Public License as published by the Free Software Foundation.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+//
+
+#include "catch.hpp"
+#include "MapGuideCommon.h"
+#include "HttpHandler.h"
+
+TEST_CASE("GetWfsFeature_ViewerRepresentation", "[Wfs]")
+{
+ STRING uri = L"";
+ Ptr<MgHttpRequest> req = new MgHttpRequest(uri);
+ Ptr<MgHttpRequestParam> param = req->GetRequestParam();
+
+ param->AddParameter(L"SERVICE", L"WFS");
+ param->AddParameter(L"REQUEST", L"GETFEATURE");
+ param->AddParameter(L"VERSION", L"1.1.0");
+ param->AddParameter(L"MAXFEATURES", L"1000");
+ param->AddParameter(L"SRSNAME", L"EPSG:4326");
+ param->AddParameter(L"TYPENAME", L"ns55197509:VotingDistricts");
+ param->AddParameter(L"OUTPUTFORMAT", L"application/json");
+
+ Ptr<MgHttpResponse> resp = req->Execute();
+ Ptr<MgHttpResult> result = resp->GetResult();
+
+ STRING err = result->GetDetailedErrorMessage();
+ auto errMsg = err.c_str();
+ auto elen = err.length();
+ REQUIRE(err.empty());
+
+ Ptr<MgByteReader> reader = dynamic_cast<MgByteReader*>(result->GetResultObject());
+ REQUIRE(reader.p != nullptr);
+ REQUIRE((L"text/html" == result->GetResultContentType()));
+}
\ No newline at end of file
Added: sandbox/jng/ogc_viewer_representation/Web/src/WebTestRunner/TestData/README.txt
===================================================================
--- sandbox/jng/ogc_viewer_representation/Web/src/WebTestRunner/TestData/README.txt (rev 0)
+++ sandbox/jng/ogc_viewer_representation/Web/src/WebTestRunner/TestData/README.txt 2020-07-21 09:46:25 UTC (rev 9679)
@@ -0,0 +1 @@
+Test data for the MgWebTestRunner goes here. They will be copied (with full relative path preservation) to the binary's output directory
\ No newline at end of file
Added: sandbox/jng/ogc_viewer_representation/Web/src/WebTestRunner/TestListener.cpp
===================================================================
--- sandbox/jng/ogc_viewer_representation/Web/src/WebTestRunner/TestListener.cpp (rev 0)
+++ sandbox/jng/ogc_viewer_representation/Web/src/WebTestRunner/TestListener.cpp 2020-07-21 09:46:25 UTC (rev 9679)
@@ -0,0 +1,36 @@
+//
+// Copyright (C) 2004-2020 by Autodesk, Inc.
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of version 2.1 of the GNU Lesser
+// General Public License as published by the Free Software Foundation.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+//
+
+#define CATCH_CONFIG_EXTERNAL_INTERFACES
+#include "catch.hpp"
+
+struct TestListener : Catch::TestEventListenerBase
+{
+ using TestEventListenerBase::TestEventListenerBase; // inherit constructor
+
+ // Get rid of Wweak-tables
+ ~TestListener();
+
+ void testCaseStarting(Catch::TestCaseInfo const& _testInfo) override {
+ printf(">>> Starting test case: %s\n", _testInfo.name.c_str());
+ }
+};
+
+CATCH_REGISTER_LISTENER(TestListener)
+
+// Get rid of Wweak-tables
+TestListener::~TestListener() {}
\ No newline at end of file
Added: sandbox/jng/ogc_viewer_representation/Web/src/WebTestRunner/WebTestRunner.rc
===================================================================
--- sandbox/jng/ogc_viewer_representation/Web/src/WebTestRunner/WebTestRunner.rc (rev 0)
+++ sandbox/jng/ogc_viewer_representation/Web/src/WebTestRunner/WebTestRunner.rc 2020-07-21 09:46:25 UTC (rev 9679)
@@ -0,0 +1,60 @@
+// Microsoft Visual C++ generated resource script.
+//
+
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "winres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (United States) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+LANGUAGE 9, 3
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#include ""winres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+#endif // English (United States) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
Added: sandbox/jng/ogc_viewer_representation/Web/src/WebTestRunner/WebTestRunner.vcxproj
===================================================================
--- sandbox/jng/ogc_viewer_representation/Web/src/WebTestRunner/WebTestRunner.vcxproj (rev 0)
+++ sandbox/jng/ogc_viewer_representation/Web/src/WebTestRunner/WebTestRunner.vcxproj 2020-07-21 09:46:25 UTC (rev 9679)
@@ -0,0 +1,269 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{1e4f8ee7-3189-4ace-9103-d69a50b2102f}</ProjectGuid>
+ <RootNamespace>WebTestRunner</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\obj\$(Configuration)\WebTestRunner\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\$(Configuration)64\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\obj\$(Configuration)64\WebTestRunner\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\obj\$(Configuration)\WebTestRunner\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\$(Configuration)64\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\obj\$(Configuration)64\WebTestRunner\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">MgWebTestRunnerd</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">MgWebTestRunnerd</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MgWebTestRunner</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MgWebTestRunner</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\Oem\catch2;..\HttpHandler;..\WebSupport;..\WebApp;..\..\..\Common\MdfModel;..\..\..\Common\Foundation;..\..\..\Common\Geometry;..\..\..\Common\PlatformBase;..\..\..\Common\MapGuideCommon;..\..\..\Oem\ACE\ACE_wrappers;..\..\..\Oem\dbxml\xerces-c-src\src;..\..\..\Oem\jsoncpp\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MG_MAPAGENT_API_EXPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>Async</ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>ACEd.lib;lib_jsond.lib;MgMdfParserd.lib;MgMdfModeld.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName).exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\Oem\ACE\ACE_wrappers\lib\$(Configuration);..\..\..\Oem\dbxml\lib\$(Configuration);..\..\..\Oem\jsoncpp\lib\$(Configuration);..\..\..\common\lib\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ <PostBuildEvent>
+ <Command>IF NOT EXIST "$(TargetDir)\Resources" mkdir "$(TargetDir)\Resources"
+xcopy /r /d /y "$(ProjectDir)..\..\..\Common\MapGuideCommon\Resources\mapguide_en.res" "$(TargetDir)\Resources"
+xcopy /r /d /y "$(SolutionDir)webconfig.ini" "$(TargetDir)"
+xcopy /s /y /i "$(ProjectDir)TestData" "$(TargetDir)TestData"</Command>
+ </PostBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\Oem\catch2;..\HttpHandler;..\WebSupport;..\WebApp;..\..\..\Common\MdfModel;..\..\..\Common\Foundation;..\..\..\Common\Geometry;..\..\..\Common\PlatformBase;..\..\..\Common\MapGuideCommon;..\..\..\Oem\ACE\ACE_wrappers;..\..\..\Oem\dbxml\xerces-c-src\src;..\..\..\Oem\jsoncpp\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MG_MAPAGENT_API_EXPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>Async</ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>ACEd.lib;lib_jsond.lib;MgMdfParserd.lib;MgMdfModeld.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName).exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\Oem\ACE\ACE_wrappers\lib64\$(Configuration);..\..\..\Oem\dbxml\lib64\$(Configuration);..\..\..\Oem\jsoncpp\lib64\$(Configuration);..\..\..\Common\lib\$(Configuration)64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ <PostBuildEvent>
+ <Command>IF NOT EXIST "$(TargetDir)\Resources" mkdir "$(TargetDir)\Resources"
+xcopy /r /d /y "$(ProjectDir)..\..\..\Common\MapGuideCommon\Resources\mapguide_en.res" "$(TargetDir)\Resources"
+xcopy /r /d /y "$(SolutionDir)webconfig.ini" "$(TargetDir)"
+xcopy /s /y /i "$(ProjectDir)TestData" "$(TargetDir)TestData"</Command>
+ </PostBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\Oem\catch2;..\HttpHandler;..\WebSupport;..\WebApp;..\..\..\Common\MdfModel;..\..\..\Common\Foundation;..\..\..\Common\Geometry;..\..\..\Common\PlatformBase;..\..\..\Common\MapGuideCommon;..\..\..\Oem\ACE\ACE_wrappers;..\..\..\Oem\dbxml\xerces-c-src\src;..\..\..\Oem\jsoncpp\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MG_MAPAGENT_API_EXPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>Async</ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>ACE.lib;lib_json.lib;MgMdfParser.lib;MgMdfModel.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName).exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\Oem\ACE\ACE_wrappers\lib\$(Configuration);..\..\..\Oem\dbxml\lib\$(Configuration);..\..\..\Oem\jsoncpp\lib\$(Configuration);..\..\..\common\lib\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ <PostBuildEvent>
+ <Command>IF NOT EXIST "$(TargetDir)\Resources" mkdir "$(TargetDir)\Resources"
+xcopy /r /d /y "$(ProjectDir)..\..\..\Common\MapGuideCommon\Resources\mapguide_en.res" "$(TargetDir)\Resources"
+xcopy /r /d /y "$(SolutionDir)webconfig.ini" "$(TargetDir)"
+xcopy /s /y /i "$(ProjectDir)TestData" "$(TargetDir)TestData"</Command>
+ </PostBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\Oem\catch2;..\HttpHandler;..\WebSupport;..\WebApp;..\..\..\Common\MdfModel;..\..\..\Common\Foundation;..\..\..\Common\Geometry;..\..\..\Common\PlatformBase;..\..\..\Common\MapGuideCommon;..\..\..\Oem\ACE\ACE_wrappers;..\..\..\Oem\dbxml\xerces-c-src\src;..\..\..\Oem\jsoncpp\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MG_MAPAGENT_API_EXPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>Async</ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>ACE.lib;lib_json.lib;MgMdfParser.lib;MgMdfModel.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName).exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\Oem\ACE\ACE_wrappers\lib64\$(Configuration);..\..\..\Oem\dbxml\lib64\$(Configuration);..\..\..\Oem\jsoncpp\lib64\$(Configuration);..\..\..\common\lib\$(Configuration)64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ <PostBuildEvent>
+ <Command>IF NOT EXIST "$(TargetDir)\Resources" mkdir "$(TargetDir)\Resources"
+xcopy /r /d /y "$(ProjectDir)..\..\..\Common\MapGuideCommon\Resources\mapguide_en.res" "$(TargetDir)\Resources"
+xcopy /r /d /y "$(SolutionDir)webconfig.ini" "$(TargetDir)"
+xcopy /s /y /i "$(ProjectDir)TestData" "$(TargetDir)TestData"</Command>
+ </PostBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp" />
+ <ClCompile Include="OgcWfsTest.cpp" />
+ <ClCompile Include="TestListener.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Common\Foundation\Foundation.vcxproj">
+ <Project>{a82adc7d-4da4-42f2-9bf6-df5dcfb44425}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Common\Geometry\Geometry.vcxproj">
+ <Project>{d954daac-e305-40ce-b3f3-c229a0bef4f0}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Common\MapGuideCommon\MapGuideCommon.vcxproj">
+ <Project>{5287a594-4d4f-43fe-a281-e279ab708cf1}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Common\MdfModel\MdfModel.vcxproj">
+ <Project>{c50254f2-654a-48de-af5b-20605aef8d10}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Common\MdfParser\MdfParser.vcxproj">
+ <Project>{85882748-dd71-4d2b-9e5a-03af8c8d91b7}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Common\PlatformBase\PlatformBase.vcxproj">
+ <Project>{f7334b1b-0efa-47e3-8e66-df158e61b7e4}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\HttpHandler\HttpHandler.vcxproj">
+ <Project>{78619d0e-d3f9-4ddf-b90e-f99cb03dfc44}</Project>
+ </ProjectReference>
+ <ProjectReference Include="..\WebApp\WebApp.vcxproj">
+ <Project>{b797917b-6842-467c-8b14-e00b76a91247}</Project>
+ </ProjectReference>
+ <ProjectReference Include="..\WebSupport\WebSupport.vcxproj">
+ <Project>{795b1b0e-4ec8-469d-b641-e26324266fbf}</Project>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="resource.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="WebTestRunner.rc" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
Added: sandbox/jng/ogc_viewer_representation/Web/src/WebTestRunner/WebTestRunner.vcxproj.filters
===================================================================
--- sandbox/jng/ogc_viewer_representation/Web/src/WebTestRunner/WebTestRunner.vcxproj.filters (rev 0)
+++ sandbox/jng/ogc_viewer_representation/Web/src/WebTestRunner/WebTestRunner.vcxproj.filters 2020-07-21 09:46:25 UTC (rev 9679)
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;c++;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="TestListener.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="OgcWfsTest.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="resource.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="WebTestRunner.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file
Added: sandbox/jng/ogc_viewer_representation/Web/src/WebTestRunner/main.cpp
===================================================================
--- sandbox/jng/ogc_viewer_representation/Web/src/WebTestRunner/main.cpp (rev 0)
+++ sandbox/jng/ogc_viewer_representation/Web/src/WebTestRunner/main.cpp 2020-07-21 09:46:25 UTC (rev 9679)
@@ -0,0 +1,88 @@
+//
+// Copyright (C) 2004-2020 by Autodesk, Inc.
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of version 2.1 of the GNU Lesser
+// General Public License as published by the Free Software Foundation.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+//
+
+#define CATCH_CONFIG_RUNNER
+#include "catch.hpp"
+
+#include "MapGuideCommon.h"
+#include "WebSupport.h"
+
+// for memory leak detection
+#ifdef _WIN32
+#define _CRTDBG_MAP_ALLOC
+#include <stdlib.h>
+#include <crtdbg.h>
+#else
+#include <malloc.h>
+#endif
+
+int main(int argc, char* argv[])
+{
+#ifdef _WIN32
+ _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
+
+#ifdef _DEBUG
+ // to debug memory leaks, set a breakpoint here and set iBlock
+ // to the block allocation you want to break on
+ long iBlock = -1;
+ _CrtSetBreakAlloc(iBlock);
+#endif
+#endif
+
+ putenv("MENTOR_DICTIONARY_PATH=..\\..\\..\\Oem\\CsMap\\CsMapDev\\Dictionaries");
+
+ bool bInit = false;
+
+ {
+ MG_TRY()
+
+ MgInitializeWebTier(L"webconfig.ini");
+ bInit = true;
+
+ MG_CATCH(L"main")
+
+ if (mgException != nullptr)
+ {
+ STRING msg = mgException->GetExceptionMessage();
+ printf("Error initializing web tier: %S\n", msg.c_str());
+ }
+ }
+
+ int result = -1;
+ if (bInit)
+ {
+ Catch::Session session;
+ result = session.run(argc, argv);
+ }
+
+ {
+ MG_TRY()
+
+ MgUninitializeWebTier();
+ if (!bInit) //If init failed, ACE::init() will still have been called
+ ACE::fini();
+
+ MG_CATCH(L"main")
+
+ if (mgException != nullptr)
+ {
+ STRING msg = mgException->GetExceptionMessage();
+ printf("Error un-initializing web tier: %S\n", msg.c_str());
+ }
+ }
+ return result;
+}
\ No newline at end of file
Added: sandbox/jng/ogc_viewer_representation/Web/src/WebTestRunner/resource.h
===================================================================
--- sandbox/jng/ogc_viewer_representation/Web/src/WebTestRunner/resource.h (rev 0)
+++ sandbox/jng/ogc_viewer_representation/Web/src/WebTestRunner/resource.h 2020-07-21 09:46:25 UTC (rev 9679)
@@ -0,0 +1,14 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by WebTestRunner.rc
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 101
+#define _APS_NEXT_COMMAND_VALUE 40001
+#define _APS_NEXT_CONTROL_VALUE 1001
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
Modified: sandbox/jng/ogc_viewer_representation/Web/src/WebTier.sln
===================================================================
--- sandbox/jng/ogc_viewer_representation/Web/src/WebTier.sln 2020-07-21 09:29:55 UTC (rev 9678)
+++ sandbox/jng/ogc_viewer_representation/Web/src/WebTier.sln 2020-07-21 09:46:25 UTC (rev 9679)
@@ -98,6 +98,8 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IMake", "..\..\BuildTools\WebTools\IMake\IMake.vcxproj", "{B601F04C-0D42-4AFC-A092-B31185E2EA8C}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebTestRunner", "WebTestRunner\WebTestRunner.vcxproj", "{1E4F8EE7-3189-4ACE-9103-D69A50B2102F}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@@ -354,6 +356,14 @@
{B601F04C-0D42-4AFC-A092-B31185E2EA8C}.Release|Win32.Build.0 = Release|Win32
{B601F04C-0D42-4AFC-A092-B31185E2EA8C}.Release|x64.ActiveCfg = Release|x64
{B601F04C-0D42-4AFC-A092-B31185E2EA8C}.Release|x64.Build.0 = Release|x64
+ {1E4F8EE7-3189-4ACE-9103-D69A50B2102F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {1E4F8EE7-3189-4ACE-9103-D69A50B2102F}.Debug|Win32.Build.0 = Debug|Win32
+ {1E4F8EE7-3189-4ACE-9103-D69A50B2102F}.Debug|x64.ActiveCfg = Debug|x64
+ {1E4F8EE7-3189-4ACE-9103-D69A50B2102F}.Debug|x64.Build.0 = Debug|x64
+ {1E4F8EE7-3189-4ACE-9103-D69A50B2102F}.Release|Win32.ActiveCfg = Release|Win32
+ {1E4F8EE7-3189-4ACE-9103-D69A50B2102F}.Release|Win32.Build.0 = Release|Win32
+ {1E4F8EE7-3189-4ACE-9103-D69A50B2102F}.Release|x64.ActiveCfg = Release|x64
+ {1E4F8EE7-3189-4ACE-9103-D69A50B2102F}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
More information about the mapguide-commits
mailing list