diff options
author | Jose <jose@zeroc.com> | 2012-07-13 00:18:06 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2012-07-13 00:18:06 +0200 |
commit | 70802b63320582f0afa8229659ea9fe4a21d02ec (patch) | |
tree | eb455947cc774cc558f96b8d7c78373d2a6f1c2b /cpp/test | |
parent | ICE-4839 - Glacier2 sessionHelper IceSSL plug-in (diff) | |
download | ice-70802b63320582f0afa8229659ea9fe4a21d02ec.tar.bz2 ice-70802b63320582f0afa8229659ea9fe4a21d02ec.tar.xz ice-70802b63320582f0afa8229659ea9fe4a21d02ec.zip |
WinRT support
Diffstat (limited to 'cpp/test')
93 files changed, 3430 insertions, 309 deletions
diff --git a/cpp/test/Ice/Makefile.mak b/cpp/test/Ice/Makefile.mak index 4b903650283..4b61e7d7d66 100644 --- a/cpp/test/Ice/Makefile.mak +++ b/cpp/test/Ice/Makefile.mak @@ -18,33 +18,33 @@ SUBDIRS = proxy \ inheritance \
facets \
objects \
- faultTolerance \
location \
adapterDeactivation \
- slicing \
- gc \
- checksum \
+ ami \
+ invoke \
dispatcher \
hold \
binding \
retry \
timeout \
- servantLocator \
- interceptor \
- stringConverter \
- background \
udp \
- defaultServant \
- defaultValue \
- threadPoolPriority \
stream \
-!if "$(CPP_COMPILER)" != "VC60"
+!if "$(WINRT)" != "yes"
SUBDIRS = $(SUBDIRS) \
- ami \
+ gc \
+ slicing \
+ faultTolerance \
+ checksum \
+ stringConverter \
+ background \
+ threadPoolPriority
custom \
- invoke \
- properties
+ properties \
+ servantLocator \
+ defaultServant \
+ interceptor \
+ defaultValue \
!endif
$(EVERYTHING)::
diff --git a/cpp/test/Ice/adapterDeactivation/Client.cpp b/cpp/test/Ice/adapterDeactivation/Client.cpp index b682a0a4fbf..9bc445e585a 100644 --- a/cpp/test/Ice/adapterDeactivation/Client.cpp +++ b/cpp/test/Ice/adapterDeactivation/Client.cpp @@ -10,29 +10,52 @@ #include <Ice/Application.h> #include <TestCommon.h> #include <Test.h> +#include <string> +#include <iostream> + +DEFINE_TEST("client") using namespace std; using namespace Ice; using namespace Test; -class TestClient : public Application -{ -public: - - virtual int run(int, char*[]); -}; - int -main(int argc, char* argv[]) +run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) { - TestClient app; - return app.main(argc, argv); + TestIntfPrx allTests(const CommunicatorPtr&); + TestIntfPrx obj = allTests(communicator); + return EXIT_SUCCESS; } int -TestClient::run(int argc, char* argv[]) +main(int argc, char* argv[]) { - TestIntfPrx allTests(const CommunicatorPtr&); - TestIntfPrx obj = allTests(communicator()); - return EXIT_SUCCESS; + int status; + Ice::CommunicatorPtr communicator; + + try + { + communicator = Ice::initialize(argc, argv); + status = run(argc, argv, communicator); + } + catch(const Ice::Exception& ex) + { + cerr << ex << endl; + status = EXIT_FAILURE; + } + + if(communicator) + { + try + { + communicator->destroy(); + } + catch(const Ice::Exception& ex) + { + cerr << ex << endl; + status = EXIT_FAILURE; + } + } + + return status; } diff --git a/cpp/test/Ice/adapterDeactivation/Collocated.cpp b/cpp/test/Ice/adapterDeactivation/Collocated.cpp index db661130750..5f8f66605ba 100644 --- a/cpp/test/Ice/adapterDeactivation/Collocated.cpp +++ b/cpp/test/Ice/adapterDeactivation/Collocated.cpp @@ -12,35 +12,56 @@ #include <TestCommon.h> #include <Test.h> +DEFINE_TEST("collocated") + using namespace std; using namespace Ice; using namespace Test; -class TestServer : public Application -{ -public: - - virtual int run(int, char*[]); -}; - -int -main(int argc, char* argv[]) -{ - TestServer app; - return app.main(argc, argv); -} - int -TestServer::run(int argc, char* argv[]) +run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) { - communicator()->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010"); - Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("TestAdapter"); + communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010"); + Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); ServantLocatorPtr locator = new ServantLocatorI; adapter->addServantLocator(locator, ""); TestIntfPrx allTests(const CommunicatorPtr&); - allTests(communicator()); + allTests(communicator); adapter->waitForDeactivate(); return EXIT_SUCCESS; } + +int +main(int argc, char* argv[]) +{ + int status; + Ice::CommunicatorPtr communicator; + + try + { + communicator = Ice::initialize(argc, argv); + status = run(argc, argv, communicator); + } + catch(const Ice::Exception& ex) + { + cerr << ex << endl; + status = EXIT_FAILURE; + } + + if(communicator) + { + try + { + communicator->destroy(); + } + catch(const Ice::Exception& ex) + { + cerr << ex << endl; + status = EXIT_FAILURE; + } + } + + return status; +} diff --git a/cpp/test/Ice/adapterDeactivation/Makefile.mak b/cpp/test/Ice/adapterDeactivation/Makefile.mak index c0bc82df8c1..7ef038bb072 100644 --- a/cpp/test/Ice/adapterDeactivation/Makefile.mak +++ b/cpp/test/Ice/adapterDeactivation/Makefile.mak @@ -9,11 +9,19 @@ top_srcdir = ..\..\..
-CLIENT = client.exe
-SERVER = server.exe
-COLLOCATED = collocated.exe
+!if "$(WINRT)" != "yes"
+NAME_PREFIX =
+EXT = .exe
+!else
+NAME_PREFIX = Ice_adapterDeactivation_
+EXT = .dll
+!endif
+
+CLIENT = $(NAME_PREFIX)client
+SERVER = $(NAME_PREFIX)server
+COLLOCATED = $(NAME_PREFIX)collocated
-TARGETS = $(CLIENT) $(SERVER) $(COLLOCATED)
+TARGETS = $(CLIENT)$(EXT) $(SERVER)$(EXT) $(COLLOCATED)$(EXT)
COBJS = Test.obj \
Client.obj \
@@ -38,24 +46,30 @@ SRCS = $(COBJS:.obj=.cpp) \ CPPFLAGS = -I. -I../../include $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN
+!if "$(WINRT)" != "yes"
+LD_TESTFLAGS = $(LD_EXEFLAGS) $(SETARGV)
+!else
+LD_TESTFLAGS = $(LD_DLLFLAGS) /export:dllMain
+!endif
+
!if "$(GENERATE_PDB)" == "yes"
-CPDBFLAGS = /pdb:$(CLIENT:.exe=.pdb)
-SPDBFLAGS = /pdb:$(SERVER:.exe=.pdb)
-COPDBFLAGS = /pdb:$(COLLOCATED:.exe=.pdb)
+CPDBFLAGS = /pdb:$(CLIENT).pdb
+SPDBFLAGS = /pdb:$(SERVER).pdb
+COPDBFLAGS = /pdb:$(COLLOCATED).pdb
!endif
-$(CLIENT): $(COBJS)
- $(LINK) $(LD_EXEFLAGS) $(CPDBFLAGS) $(SETARGV) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
+$(CLIENT)$(EXT): $(COBJS)
+ $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
$(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
-$(SERVER): $(SOBJS)
- $(LINK) $(LD_EXEFLAGS) $(SPDBFLAGS) $(SETARGV) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
+$(SERVER)$(EXT): $(SOBJS)
+ $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
$(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
-$(COLLOCATED): $(COLOBJS)
- $(LINK) $(LD_EXEFLAGS) $(COPDBFLAGS) $(SETARGV) $(COLOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
+$(COLLOCATED)$(EXT): $(COLOBJS)
+ $(LINK) $(LD_TESTFLAGS) $(COPDBFLAGS) $(COLOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
$(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
diff --git a/cpp/test/Ice/adapterDeactivation/Server.cpp b/cpp/test/Ice/adapterDeactivation/Server.cpp index bfb0ba05c12..e9ab9171ffd 100644 --- a/cpp/test/Ice/adapterDeactivation/Server.cpp +++ b/cpp/test/Ice/adapterDeactivation/Server.cpp @@ -11,32 +11,53 @@ #include <ServantLocatorI.h> #include <TestCommon.h> +DEFINE_TEST("server") + using namespace std; using namespace Ice; -class TestServer : public Application -{ -public: - - virtual int run(int, char*[]); -}; - -int -main(int argc, char* argv[]) -{ - TestServer app; - return app.main(argc, argv); -} - int -TestServer::run(int argc, char* argv[]) +run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) { - communicator()->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010:udp"); - Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("TestAdapter"); + communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010:udp"); + Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); ServantLocatorPtr locator = new ServantLocatorI; - adapter->addServantLocator(locator, ""); adapter->activate(); + TEST_READY adapter->waitForDeactivate(); return EXIT_SUCCESS; } + +int +main(int argc, char* argv[]) +{ + int status; + Ice::CommunicatorPtr communicator; + + try + { + communicator = Ice::initialize(argc, argv); + status = run(argc, argv, communicator); + } + catch(const Ice::Exception& ex) + { + cerr << ex << endl; + status = EXIT_FAILURE; + } + + if(communicator) + { + try + { + communicator->destroy(); + } + catch(const Ice::Exception& ex) + { + cerr << ex << endl; + status = EXIT_FAILURE; + } + } + + return status; +} diff --git a/cpp/test/Ice/ami/Client.cpp b/cpp/test/Ice/ami/Client.cpp index c6774b607ac..8f4319fc795 100644 --- a/cpp/test/Ice/ami/Client.cpp +++ b/cpp/test/Ice/ami/Client.cpp @@ -11,6 +11,8 @@ #include <TestCommon.h> #include <Test.h> +DEFINE_TEST("client") + using namespace std; int diff --git a/cpp/test/Ice/ami/Makefile.mak b/cpp/test/Ice/ami/Makefile.mak index 14343d3dbc3..d28a4900a3f 100644 --- a/cpp/test/Ice/ami/Makefile.mak +++ b/cpp/test/Ice/ami/Makefile.mak @@ -9,10 +9,18 @@ top_srcdir = ..\..\..
-CLIENT = client.exe
-SERVER = server.exe
+!if "$(WINRT)" != "yes"
+NAME_PREFIX =
+EXT = .exe
+!else
+NAME_PREFIX = Ice_ami_
+EXT = .dll
+!endif
+
+CLIENT = $(NAME_PREFIX)client
+SERVER = $(NAME_PREFIX)server
-TARGETS = $(CLIENT) $(SERVER)
+TARGETS = $(CLIENT)$(EXT) $(SERVER)$(EXT)
COBJS = Test.obj \
Client.obj \
@@ -29,18 +37,24 @@ SRCS = $(COBJS:.obj=.cpp) \ CPPFLAGS = -I. -I../../include $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN
+!if "$(WINRT)" != "yes"
+LD_TESTFLAGS = $(LD_EXEFLAGS) $(SETARGV)
+!else
+LD_TESTFLAGS = $(LD_DLLFLAGS) /export:dllMain
+!endif
+
!if "$(GENERATE_PDB)" == "yes"
-CPDBFLAGS = /pdb:$(CLIENT:.exe=.pdb)
-SPDBFLAGS = /pdb:$(SERVER:.exe=.pdb)
+CPDBFLAGS = /pdb:$(CLIENT).pdb
+SPDBFLAGS = /pdb:$(SERVER).pdb
!endif
-$(CLIENT): $(COBJS)
- $(LINK) $(LD_EXEFLAGS) $(CPDBFLAGS) $(SETARGV) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
+$(CLIENT)$(EXT): $(COBJS)
+ $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
$(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
-$(SERVER): $(SOBJS)
- $(LINK) $(LD_EXEFLAGS) $(SPDBFLAGS) $(SETARGV) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
+$(SERVER)$(EXT): $(SOBJS)
+ $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
$(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
diff --git a/cpp/test/Ice/ami/Server.cpp b/cpp/test/Ice/ami/Server.cpp index eb0c8f39160..d480ee85390 100644 --- a/cpp/test/Ice/ami/Server.cpp +++ b/cpp/test/Ice/ami/Server.cpp @@ -8,8 +8,11 @@ // ********************************************************************** #include <Ice/Ice.h> +#include <TestCommon.h> #include <TestI.h> +DEFINE_TEST("server") + using namespace std; int @@ -30,6 +33,8 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) adapter2->add(testController, communicator->stringToIdentity("testController")); adapter2->activate(); + TEST_READY + communicator->waitForShutdown(); return EXIT_SUCCESS; } diff --git a/cpp/test/Ice/binding/Client.cpp b/cpp/test/Ice/binding/Client.cpp index 936ddf29102..f8aa8a77a3a 100644 --- a/cpp/test/Ice/binding/Client.cpp +++ b/cpp/test/Ice/binding/Client.cpp @@ -11,6 +11,8 @@ #include <TestCommon.h> #include <Test.h> +DEFINE_TEST("client") + using namespace std; int diff --git a/cpp/test/Ice/binding/Makefile.mak b/cpp/test/Ice/binding/Makefile.mak index 14343d3dbc3..4a7fa619a81 100644 --- a/cpp/test/Ice/binding/Makefile.mak +++ b/cpp/test/Ice/binding/Makefile.mak @@ -9,10 +9,18 @@ top_srcdir = ..\..\..
-CLIENT = client.exe
-SERVER = server.exe
+!if "$(WINRT)" != "yes"
+NAME_PREFIX =
+EXT = .exe
+!else
+NAME_PREFIX = Ice_binding_
+EXT = .dll
+!endif
+
+CLIENT = $(NAME_PREFIX)client
+SERVER = $(NAME_PREFIX)server
-TARGETS = $(CLIENT) $(SERVER)
+TARGETS = $(CLIENT)$(EXT) $(SERVER)$(EXT)
COBJS = Test.obj \
Client.obj \
@@ -29,18 +37,24 @@ SRCS = $(COBJS:.obj=.cpp) \ CPPFLAGS = -I. -I../../include $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN
+!if "$(WINRT)" != "yes"
+LD_TESTFLAGS = $(LD_EXEFLAGS) $(SETARGV)
+!else
+LD_TESTFLAGS = $(LD_DLLFLAGS) /export:dllMain
+!endif
+
!if "$(GENERATE_PDB)" == "yes"
-CPDBFLAGS = /pdb:$(CLIENT:.exe=.pdb)
-SPDBFLAGS = /pdb:$(SERVER:.exe=.pdb)
+CPDBFLAGS = /pdb:$(CLIENT).pdb
+SPDBFLAGS = /pdb:$(SERVER).pdb
!endif
-$(CLIENT): $(COBJS)
- $(LINK) $(LD_EXEFLAGS) $(CPDBFLAGS) $(SETARGV) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
+$(CLIENT)$(EXT): $(COBJS)
+ $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
$(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
-$(SERVER): $(SOBJS)
- $(LINK) $(LD_EXEFLAGS) $(SPDBFLAGS) $(SETARGV) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
+$(SERVER)$(EXT): $(SOBJS)
+ $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
$(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
diff --git a/cpp/test/Ice/binding/Server.cpp b/cpp/test/Ice/binding/Server.cpp index 0f913377504..a5251728ce3 100644 --- a/cpp/test/Ice/binding/Server.cpp +++ b/cpp/test/Ice/binding/Server.cpp @@ -8,8 +8,11 @@ // ********************************************************************** #include <Ice/Ice.h> +#include <TestCommon.h> #include <TestI.h> +DEFINE_TEST("server") + using namespace std; int @@ -21,6 +24,8 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) adapter->add(new RemoteCommunicatorI(), id); adapter->activate(); + TEST_READY + // Disable ready print for further adapters. communicator->getProperties()->setProperty("Ice.PrintAdapterReady", "0"); diff --git a/cpp/test/Ice/defaultValue/Makefile.mak b/cpp/test/Ice/defaultValue/Makefile.mak index f6bed986542..c36c0e709c2 100644 --- a/cpp/test/Ice/defaultValue/Makefile.mak +++ b/cpp/test/Ice/defaultValue/Makefile.mak @@ -19,7 +19,7 @@ LOBJS = Test.obj COBJS = Client.obj \
AllTests.obj
-
+
SRCS = $(LOBJS:.obj=.cpp) \
$(COBJS:.obj=.cpp)
@@ -37,7 +37,7 @@ SLICE2CPPFLAGS = --dll-export TEST_API $(SLICE2CPPFLAGS) LINKWITH = $(LIBS)
$(LIBNAME): $(DLLNAME)
-
+
$(DLLNAME): $(LOBJS)
$(LINK) $(BASE):0x22000000 $(LD_DLLFLAGS) $(PDBFLAGS) $(LOBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH)
move $(DLLNAME:.dll=.lib) $(LIBNAME)
diff --git a/cpp/test/Ice/dispatcher/Client.cpp b/cpp/test/Ice/dispatcher/Client.cpp index a3bf114ccf1..da86ee480af 100644 --- a/cpp/test/Ice/dispatcher/Client.cpp +++ b/cpp/test/Ice/dispatcher/Client.cpp @@ -12,6 +12,8 @@ #include <Test.h> #include <Dispatcher.h> +DEFINE_TEST("client") + using namespace std; int diff --git a/cpp/test/Ice/dispatcher/Makefile.mak b/cpp/test/Ice/dispatcher/Makefile.mak index 20375556902..a40efbec458 100644 --- a/cpp/test/Ice/dispatcher/Makefile.mak +++ b/cpp/test/Ice/dispatcher/Makefile.mak @@ -9,10 +9,18 @@ top_srcdir = ..\..\..
-CLIENT = client.exe
-SERVER = server.exe
+!if "$(WINRT)" != "yes"
+NAME_PREFIX =
+EXT = .exe
+!else
+NAME_PREFIX = Ice_dispatcher_
+EXT = .dll
+!endif
+
+CLIENT = $(NAME_PREFIX)client
+SERVER = $(NAME_PREFIX)server
-TARGETS = $(CLIENT) $(SERVER)
+TARGETS = $(CLIENT)$(EXT) $(SERVER)$(EXT)
COBJS = Test.obj \
Client.obj \
@@ -31,18 +39,24 @@ SRCS = $(COBJS:.obj=.cpp) \ CPPFLAGS = -I. -I../../include $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN
+!if "$(WINRT)" != "yes"
+LD_TESTFLAGS = $(LD_EXEFLAGS) $(SETARGV)
+!else
+LD_TESTFLAGS = $(LD_DLLFLAGS) /export:dllMain
+!endif
+
!if "$(GENERATE_PDB)" == "yes"
-CPDBFLAGS = /pdb:$(CLIENT:.exe=.pdb)
-SPDBFLAGS = /pdb:$(SERVER:.exe=.pdb)
+CPDBFLAGS = /pdb:$(CLIENT).pdb
+SPDBFLAGS = /pdb:$(SERVER).pdb
!endif
-$(CLIENT): $(COBJS)
- $(LINK) $(LD_EXEFLAGS) $(CPDBFLAGS) $(SETARGV) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
+$(CLIENT)$(EXT): $(COBJS)
+ $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
$(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
-$(SERVER): $(SOBJS)
- $(LINK) $(LD_EXEFLAGS) $(SPDBFLAGS) $(SETARGV) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
+$(SERVER)$(EXT): $(SOBJS)
+ $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
$(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
diff --git a/cpp/test/Ice/dispatcher/Server.cpp b/cpp/test/Ice/dispatcher/Server.cpp index 517103c3898..e517301982b 100644 --- a/cpp/test/Ice/dispatcher/Server.cpp +++ b/cpp/test/Ice/dispatcher/Server.cpp @@ -9,8 +9,11 @@ #include <Ice/Ice.h> #include <TestI.h> +#include <TestCommon.h> #include <Dispatcher.h> +DEFINE_TEST("server") + using namespace std; int @@ -30,7 +33,9 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) adapter2->add(testController, communicator->stringToIdentity("testController")); adapter2->activate(); - + + TEST_READY + communicator->waitForShutdown(); return EXIT_SUCCESS; } diff --git a/cpp/test/Ice/exceptions/Client.cpp b/cpp/test/Ice/exceptions/Client.cpp index 690b1f75f5e..93f08ea904c 100644 --- a/cpp/test/Ice/exceptions/Client.cpp +++ b/cpp/test/Ice/exceptions/Client.cpp @@ -11,6 +11,8 @@ #include <TestCommon.h> #include <Test.h> +DEFINE_TEST("client") + using namespace std; using namespace Test; diff --git a/cpp/test/Ice/exceptions/Collocated.cpp b/cpp/test/Ice/exceptions/Collocated.cpp index 797a9fc1802..9218c15a392 100644 --- a/cpp/test/Ice/exceptions/Collocated.cpp +++ b/cpp/test/Ice/exceptions/Collocated.cpp @@ -8,8 +8,11 @@ // ********************************************************************** #include <Ice/Ice.h> +#include <TestCommon.h> #include <TestI.h> +DEFINE_TEST("collocated"); + using namespace std; using namespace Test; diff --git a/cpp/test/Ice/exceptions/Makefile.mak b/cpp/test/Ice/exceptions/Makefile.mak index 1de0e30bfe1..9fb8ad0a707 100644 --- a/cpp/test/Ice/exceptions/Makefile.mak +++ b/cpp/test/Ice/exceptions/Makefile.mak @@ -9,12 +9,20 @@ top_srcdir = ..\..\..
-CLIENT = client.exe
-SERVER = server.exe
-SERVERAMD = serveramd.exe
-COLLOCATED = collocated.exe
+!if "$(WINRT)" != "yes"
+NAME_PREFIX =
+EXT = .exe
+!else
+NAME_PREFIX = Ice_exceptions_
+EXT = .dll
+!endif
+
+CLIENT = $(NAME_PREFIX)client
+SERVER = $(NAME_PREFIX)server
+SERVERAMD = $(NAME_PREFIX)serveramd
+COLLOCATED = $(NAME_PREFIX)collocated
-TARGETS = $(CLIENT) $(SERVER) $(SERVERAMD) $(COLLOCATED)
+TARGETS = $(CLIENT)$(EXT) $(SERVER)$(EXT) $(SERVERAMD)$(EXT) $(COLLOCATED)$(EXT)
OBJS = ExceptionsI.obj
@@ -45,30 +53,36 @@ SRCS = $(OBJS:.obj=.cpp) \ CPPFLAGS = -I. -I../../include $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN
+!if "$(WINRT)" != "yes"
+LD_TESTFLAGS = $(LD_EXEFLAGS) $(SETARGV)
+!else
+LD_TESTFLAGS = $(LD_DLLFLAGS) /export:dllMain
+!endif
+
!if "$(GENERATE_PDB)" == "yes"
-CPDBFLAGS = /pdb:$(CLIENT:.exe=.pdb)
-SPDBFLAGS = /pdb:$(SERVER:.exe=.pdb)
-SAPDBFLAGS = /pdb:$(SERVERAMD:.exe=.pdb)
-COPDBFLAGS = /pdb:$(COLLOCATED:.exe=.pdb)
+CPDBFLAGS = /pdb:$(CLIENT).pdb
+SPDBFLAGS = /pdb:$(SERVER).pdb
+SAPDBFLAGS = /pdb:$(SERVERAMD).pdb
+COPDBFLAGS = /pdb:$(COLLOCATED).pdb
!endif
-$(CLIENT): $(COBJS) $(OBJS)
- $(LINK) $(LD_EXEFLAGS) $(CPDBFLAGS) $(SETARGV) $(COBJS) $(OBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
+$(CLIENT)$(EXT): $(COBJS) $(OBJS)
+ $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(OBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
$(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
-$(SERVER): $(SOBJS) $(OBJS)
- $(LINK) $(LD_EXEFLAGS) $(SPDBFLAGS) $(SETARGV) $(SOBJS) $(OBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
+$(SERVER)$(EXT): $(SOBJS) $(OBJS)
+ $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(OBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
$(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
-$(SERVERAMD): $(SAMDOBJS) $(OBJS)
- $(LINK) $(LD_EXEFLAGS) $(SAPDBFLAGS) $(SETARGV) $(SAMDOBJS) $(OBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
+$(SERVERAMD)$(EXT): $(SAMDOBJS) $(OBJS)
+ $(LINK) $(LD_TESTFLAGS) $(SAPDBFLAGS) $(SAMDOBJS) $(OBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
$(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
-$(COLLOCATED): $(COLOBJS) $(OBJS)
- $(LINK) $(LD_EXEFLAGS) $(COPDBFLAGS) $(SETARGV) $(COLOBJS) $(OBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
+$(COLLOCATED)$(EXT): $(COLOBJS) $(OBJS)
+ $(LINK) $(LD_TESTFLAGS) $(COPDBFLAGS) $(COLOBJS) $(OBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
$(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
diff --git a/cpp/test/Ice/exceptions/Server.cpp b/cpp/test/Ice/exceptions/Server.cpp index 3a7b64d0c7f..4e70b5a51f3 100644 --- a/cpp/test/Ice/exceptions/Server.cpp +++ b/cpp/test/Ice/exceptions/Server.cpp @@ -8,8 +8,11 @@ // ********************************************************************** #include <Ice/Ice.h> +#include <TestCommon.h> #include <TestI.h> +DEFINE_TEST("server"); + using namespace std; int @@ -22,6 +25,7 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) Ice::ObjectPtr object = new ThrowerI(); adapter->add(object, communicator->stringToIdentity("thrower")); adapter->activate(); + TEST_READY communicator->waitForShutdown(); return EXIT_SUCCESS; } diff --git a/cpp/test/Ice/exceptions/ServerAMD.cpp b/cpp/test/Ice/exceptions/ServerAMD.cpp index 1d4c745adfd..767c7ac0c83 100644 --- a/cpp/test/Ice/exceptions/ServerAMD.cpp +++ b/cpp/test/Ice/exceptions/ServerAMD.cpp @@ -8,8 +8,11 @@ // ********************************************************************** #include <Ice/Ice.h> +#include <TestCommon.h> #include <TestAMDI.h> +DEFINE_TEST("serveramd"); + using namespace std; int @@ -22,6 +25,7 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) Ice::ObjectPtr object = new ThrowerI(); adapter->add(object, communicator->stringToIdentity("thrower")); adapter->activate(); + TEST_READY communicator->waitForShutdown(); return EXIT_SUCCESS; } diff --git a/cpp/test/Ice/facets/Client.cpp b/cpp/test/Ice/facets/Client.cpp index 25b5b2eb885..60ecbd0eeb1 100644 --- a/cpp/test/Ice/facets/Client.cpp +++ b/cpp/test/Ice/facets/Client.cpp @@ -11,6 +11,8 @@ #include <TestCommon.h> #include <Test.h> +DEFINE_TEST("client") + using namespace std; using namespace Test; diff --git a/cpp/test/Ice/facets/Collocated.cpp b/cpp/test/Ice/facets/Collocated.cpp index da189c8e5f2..e7cfd352c08 100644 --- a/cpp/test/Ice/facets/Collocated.cpp +++ b/cpp/test/Ice/facets/Collocated.cpp @@ -8,8 +8,11 @@ // ********************************************************************** #include <Ice/Ice.h> +#include <TestCommon.h> #include <TestI.h> +DEFINE_TEST("server") + using namespace std; using namespace Test; diff --git a/cpp/test/Ice/facets/Makefile.mak b/cpp/test/Ice/facets/Makefile.mak index 1cc31ab300a..182396baafb 100644 --- a/cpp/test/Ice/facets/Makefile.mak +++ b/cpp/test/Ice/facets/Makefile.mak @@ -9,11 +9,19 @@ top_srcdir = ..\..\..
-CLIENT = client.exe
-SERVER = server.exe
-COLLOCATED = collocated.exe
+!if "$(WINRT)" != "yes"
+NAME_PREFIX =
+EXT = .exe
+!else
+NAME_PREFIX = Ice_facets_
+EXT = .dll
+!endif
+
+CLIENT = $(NAME_PREFIX)client
+SERVER = $(NAME_PREFIX)server
+COLLOCATED = $(NAME_PREFIX)collocated
-TARGETS = $(CLIENT) $(SERVER) $(COLLOCATED)
+TARGETS = $(CLIENT)$(EXT) $(SERVER)$(EXT) $(COLLOCATED)$(EXT)
COBJS = Test.obj \
Client.obj \
@@ -36,24 +44,30 @@ SRCS = $(COBJS:.obj=.cpp) \ CPPFLAGS = -I. -I../../include $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN
+!if "$(WINRT)" != "yes"
+LD_TESTFLAGS = $(LD_EXEFLAGS) $(SETARGV)
+!else
+LD_TESTFLAGS = $(LD_DLLFLAGS) /export:dllMain
+!endif
+
!if "$(GENERATE_PDB)" == "yes"
-CPDBFLAGS = /pdb:$(CLIENT:.exe=.pdb)
-SPDBFLAGS = /pdb:$(SERVER:.exe=.pdb)
-COPDBFLAGS = /pdb:$(COLLOCATED:.exe=.pdb)
+CPDBFLAGS = /pdb:$(CLIENT).pdb
+SPDBFLAGS = /pdb:$(SERVER).pdb
+COPDBFLAGS = /pdb:$(COLLOCATED).pdb
!endif
-$(CLIENT): $(COBJS)
- $(LINK) $(LD_EXEFLAGS) $(CPDBFLAGS) $(SETARGV) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
+$(CLIENT)$(EXT): $(COBJS)
+ $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
$(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
-$(SERVER): $(SOBJS)
- $(LINK) $(LD_EXEFLAGS) $(SPDBFLAGS) $(SETARGV) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
+$(SERVER)$(EXT): $(SOBJS)
+ $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
$(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
-$(COLLOCATED): $(COLOBJS)
- $(LINK) $(LD_EXEFLAGS) $(COPDBFLAGS) $(SETARGV) $(COLOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
+$(COLLOCATED)$(EXT): $(COLOBJS)
+ $(LINK) $(LD_TESTFLAGS) $(COPDBFLAGS) $(COLOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
$(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
diff --git a/cpp/test/Ice/facets/Server.cpp b/cpp/test/Ice/facets/Server.cpp index 4ef44bc4caa..e12f51ff762 100644 --- a/cpp/test/Ice/facets/Server.cpp +++ b/cpp/test/Ice/facets/Server.cpp @@ -8,8 +8,11 @@ // ********************************************************************** #include <Ice/Ice.h> +#include <TestCommon.h> #include <TestI.h> +DEFINE_TEST("server") + using namespace std; int @@ -24,7 +27,7 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) adapter->addFacet(f, communicator->stringToIdentity("d"), "facetEF"); Ice::ObjectPtr h = new HI(communicator); adapter->addFacet(h, communicator->stringToIdentity("d"), "facetGH"); - + TEST_READY adapter->activate(); communicator->waitForShutdown(); diff --git a/cpp/test/Ice/hold/Client.cpp b/cpp/test/Ice/hold/Client.cpp index 46b44b32b3d..f7b1c12df2d 100644 --- a/cpp/test/Ice/hold/Client.cpp +++ b/cpp/test/Ice/hold/Client.cpp @@ -11,6 +11,8 @@ #include <TestCommon.h> #include <Test.h> +DEFINE_TEST("client") + using namespace std; using namespace Test; diff --git a/cpp/test/Ice/hold/Makefile.mak b/cpp/test/Ice/hold/Makefile.mak index 14343d3dbc3..3c5d3a72db2 100644 --- a/cpp/test/Ice/hold/Makefile.mak +++ b/cpp/test/Ice/hold/Makefile.mak @@ -9,10 +9,18 @@ top_srcdir = ..\..\..
-CLIENT = client.exe
-SERVER = server.exe
+!if "$(WINRT)" != "yes"
+NAME_PREFIX =
+EXT = .exe
+!else
+NAME_PREFIX = Ice_hold_
+EXT = .dll
+!endif
+
+CLIENT = $(NAME_PREFIX)client
+SERVER = $(NAME_PREFIX)server
-TARGETS = $(CLIENT) $(SERVER)
+TARGETS = $(CLIENT)$(EXT) $(SERVER)$(EXT)
COBJS = Test.obj \
Client.obj \
@@ -29,18 +37,24 @@ SRCS = $(COBJS:.obj=.cpp) \ CPPFLAGS = -I. -I../../include $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN
+!if "$(WINRT)" != "yes"
+LD_TESTFLAGS = $(LD_EXEFLAGS) $(SETARGV)
+!else
+LD_TESTFLAGS = $(LD_DLLFLAGS) /export:dllMain
+!endif
+
!if "$(GENERATE_PDB)" == "yes"
-CPDBFLAGS = /pdb:$(CLIENT:.exe=.pdb)
-SPDBFLAGS = /pdb:$(SERVER:.exe=.pdb)
+CPDBFLAGS = /pdb:$(CLIENT).pdb
+SPDBFLAGS = /pdb:$(SERVER).pdb
!endif
-$(CLIENT): $(COBJS)
- $(LINK) $(LD_EXEFLAGS) $(CPDBFLAGS) $(SETARGV) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
+$(CLIENT)$(EXT): $(COBJS)
+ $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
$(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
-$(SERVER): $(SOBJS)
- $(LINK) $(LD_EXEFLAGS) $(SPDBFLAGS) $(SETARGV) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
+$(SERVER)$(EXT): $(SOBJS)
+ $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
$(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
diff --git a/cpp/test/Ice/hold/Server.cpp b/cpp/test/Ice/hold/Server.cpp index 2b8641f0190..9de73fabed2 100644 --- a/cpp/test/Ice/hold/Server.cpp +++ b/cpp/test/Ice/hold/Server.cpp @@ -8,8 +8,11 @@ // ********************************************************************** #include <Ice/Ice.h> +#include <TestCommon.h> #include <TestI.h> +DEFINE_TEST("server") + using namespace std; int @@ -36,6 +39,8 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) adapter1->activate(); adapter2->activate(); + TEST_READY + communicator->waitForShutdown(); timer->destroy(); diff --git a/cpp/test/Ice/info/Client.cpp b/cpp/test/Ice/info/Client.cpp index 936ddf29102..f8aa8a77a3a 100644 --- a/cpp/test/Ice/info/Client.cpp +++ b/cpp/test/Ice/info/Client.cpp @@ -11,6 +11,8 @@ #include <TestCommon.h> #include <Test.h> +DEFINE_TEST("client") + using namespace std; int diff --git a/cpp/test/Ice/info/Makefile.mak b/cpp/test/Ice/info/Makefile.mak index 17f16502602..e13d2019e6b 100644 --- a/cpp/test/Ice/info/Makefile.mak +++ b/cpp/test/Ice/info/Makefile.mak @@ -9,10 +9,18 @@ top_srcdir = ..\..\..
-CLIENT = client.exe
-SERVER = server.exe
+!if "$(WINRT)" != "yes"
+NAME_PREFIX =
+EXT = .exe
+!else
+NAME_PREFIX = Ice_info_
+EXT = .dll
+!endif
+
+CLIENT = $(NAME_PREFIX)client
+SERVER = $(NAME_PREFIX)server
-TARGETS = $(CLIENT) $(SERVER)
+TARGETS = $(CLIENT)$(EXT) $(SERVER)$(EXT)
COBJS = Test.obj \
TestI.obj \
@@ -30,18 +38,24 @@ SRCS = $(COBJS:.obj=.cpp) \ CPPFLAGS = -I. -I../../include $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN
+!if "$(WINRT)" != "yes"
+LD_TESTFLAGS = $(LD_EXEFLAGS) $(SETARGV)
+!else
+LD_TESTFLAGS = $(LD_DLLFLAGS) /export:dllMain
+!endif
+
!if "$(GENERATE_PDB)" == "yes"
-CPDBFLAGS = /pdb:$(CLIENT:.exe=.pdb)
-SPDBFLAGS = /pdb:$(SERVER:.exe=.pdb)
+CPDBFLAGS = /pdb:$(CLIENT).pdb
+SPDBFLAGS = /pdb:$(SERVER).pdb
!endif
-$(CLIENT): $(COBJS)
- $(LINK) $(LD_EXEFLAGS) $(CPDBFLAGS) $(SETARGV) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) icessl$(LIBSUFFIX).lib
+$(CLIENT)$(EXT): $(COBJS)
+ $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
$(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
-$(SERVER): $(SOBJS)
- $(LINK) $(LD_EXEFLAGS) $(SPDBFLAGS) $(SETARGV) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) icessl$(LIBSUFFIX).lib
+$(SERVER)$(EXT): $(SOBJS)
+ $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
$(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
diff --git a/cpp/test/Ice/info/Server.cpp b/cpp/test/Ice/info/Server.cpp index 0db8c76f43a..07e6d2c2a39 100644 --- a/cpp/test/Ice/info/Server.cpp +++ b/cpp/test/Ice/info/Server.cpp @@ -8,8 +8,11 @@ // ********************************************************************** #include <Ice/Ice.h> +#include <TestCommon.h> #include <TestI.h> +DEFINE_TEST("server"); + using namespace std; int @@ -19,7 +22,7 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); adapter->add(new TestI, communicator->stringToIdentity("test")); adapter->activate(); - + TEST_READY communicator->waitForShutdown(); return EXIT_SUCCESS; } diff --git a/cpp/test/Ice/inheritance/Client.cpp b/cpp/test/Ice/inheritance/Client.cpp index 878d93e3afb..065178b3289 100644 --- a/cpp/test/Ice/inheritance/Client.cpp +++ b/cpp/test/Ice/inheritance/Client.cpp @@ -11,6 +11,8 @@ #include <TestCommon.h> #include <Test.h> +DEFINE_TEST("client") + using namespace std; using namespace Test; diff --git a/cpp/test/Ice/inheritance/Collocated.cpp b/cpp/test/Ice/inheritance/Collocated.cpp index 63dd23a349a..ab71ae7d1b1 100644 --- a/cpp/test/Ice/inheritance/Collocated.cpp +++ b/cpp/test/Ice/inheritance/Collocated.cpp @@ -8,8 +8,11 @@ // ********************************************************************** #include <Ice/Ice.h> +#include <TestCommon.h> #include <TestI.h> +DEFINE_TEST("collocated") + using namespace std; using namespace Test; @@ -20,7 +23,7 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); Ice::ObjectPtr object = new InitialI(adapter); adapter->add(object, communicator->stringToIdentity("initial")); - + InitialPrx allTests(const Ice::CommunicatorPtr&); allTests(communicator); diff --git a/cpp/test/Ice/inheritance/Makefile.mak b/cpp/test/Ice/inheritance/Makefile.mak index 1cc31ab300a..d8cc71a346e 100644 --- a/cpp/test/Ice/inheritance/Makefile.mak +++ b/cpp/test/Ice/inheritance/Makefile.mak @@ -9,11 +9,19 @@ top_srcdir = ..\..\..
-CLIENT = client.exe
-SERVER = server.exe
-COLLOCATED = collocated.exe
+!if "$(WINRT)" != "yes"
+NAME_PREFIX =
+EXT = .exe
+!else
+NAME_PREFIX = Ice_inheritance_
+EXT = .dll
+!endif
+
+CLIENT = $(NAME_PREFIX)client
+SERVER = $(NAME_PREFIX)server
+COLLOCATED = $(NAME_PREFIX)collocated
-TARGETS = $(CLIENT) $(SERVER) $(COLLOCATED)
+TARGETS = $(CLIENT)$(EXT) $(SERVER)$(EXT) $(COLLOCATED)$(EXT)
COBJS = Test.obj \
Client.obj \
@@ -36,24 +44,30 @@ SRCS = $(COBJS:.obj=.cpp) \ CPPFLAGS = -I. -I../../include $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN
+!if "$(WINRT)" != "yes"
+LD_TESTFLAGS = $(LD_EXEFLAGS) $(SETARGV)
+!else
+LD_TESTFLAGS = $(LD_DLLFLAGS) /export:dllMain
+!endif
+
!if "$(GENERATE_PDB)" == "yes"
-CPDBFLAGS = /pdb:$(CLIENT:.exe=.pdb)
-SPDBFLAGS = /pdb:$(SERVER:.exe=.pdb)
-COPDBFLAGS = /pdb:$(COLLOCATED:.exe=.pdb)
+CPDBFLAGS = /pdb:$(CLIENT).pdb
+SPDBFLAGS = /pdb:$(SERVER).pdb
+COPDBFLAGS = /pdb:$(COLLOCATED).pdb
!endif
-$(CLIENT): $(COBJS)
- $(LINK) $(LD_EXEFLAGS) $(CPDBFLAGS) $(SETARGV) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
+$(CLIENT)$(EXT): $(COBJS)
+ $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
$(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
-$(SERVER): $(SOBJS)
- $(LINK) $(LD_EXEFLAGS) $(SPDBFLAGS) $(SETARGV) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
+$(SERVER)$(EXT): $(SOBJS)
+ $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
$(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
-$(COLLOCATED): $(COLOBJS)
- $(LINK) $(LD_EXEFLAGS) $(COPDBFLAGS) $(SETARGV) $(COLOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
+$(COLLOCATED)$(EXT): $(COLOBJS)
+ $(LINK) $(LD_TESTFLAGS) $(COPDBFLAGS) $(COLOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
$(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
diff --git a/cpp/test/Ice/inheritance/Server.cpp b/cpp/test/Ice/inheritance/Server.cpp index 5b9fc4b4244..a459a744e3e 100644 --- a/cpp/test/Ice/inheritance/Server.cpp +++ b/cpp/test/Ice/inheritance/Server.cpp @@ -8,8 +8,11 @@ // ********************************************************************** #include <Ice/Ice.h> +#include <TestCommon.h> #include <TestI.h> +DEFINE_TEST("server") + using namespace std; int @@ -20,6 +23,7 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) Ice::ObjectPtr object = new InitialI(adapter); adapter->add(object, communicator->stringToIdentity("initial")); adapter->activate(); + TEST_READY communicator->waitForShutdown(); return EXIT_SUCCESS; } diff --git a/cpp/test/Ice/interceptor/Makefile.mak b/cpp/test/Ice/interceptor/Makefile.mak index 603e6c43774..d8e86399124 100644 --- a/cpp/test/Ice/interceptor/Makefile.mak +++ b/cpp/test/Ice/interceptor/Makefile.mak @@ -33,7 +33,7 @@ CPPFLAGS = -I. -I../../include $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN !if "$(GENERATE_PDB)" == "yes"
PDBFLAGS = /pdb:$(DLLNAME:.dll=.pdb)
-CPDBFLAGS = /pdb:$(CLIENT:.exe=.pdb)
+CPDBFLAGS = /pdb:$(CLIENT:.exe=.pdb)
!endif
SLICE2CPPFLAGS = --dll-export INTERCEPTOR_TEST_API $(SLICE2CPPFLAGS)
diff --git a/cpp/test/Ice/invoke/Client.cpp b/cpp/test/Ice/invoke/Client.cpp index 9d457da663f..c6e1d63da19 100644 --- a/cpp/test/Ice/invoke/Client.cpp +++ b/cpp/test/Ice/invoke/Client.cpp @@ -11,6 +11,8 @@ #include <TestCommon.h> #include <Test.h> +DEFINE_TEST("client") + using namespace std; int diff --git a/cpp/test/Ice/invoke/Makefile.mak b/cpp/test/Ice/invoke/Makefile.mak index 6a287a1bb94..10aa670e23d 100644 --- a/cpp/test/Ice/invoke/Makefile.mak +++ b/cpp/test/Ice/invoke/Makefile.mak @@ -9,10 +9,18 @@ top_srcdir = ..\..\..
-CLIENT = client.exe
-SERVER = server.exe
+!if "$(WINRT)" != "yes"
+NAME_PREFIX =
+EXT = .exe
+!else
+NAME_PREFIX = Ice_invoke_
+EXT = .dll
+!endif
+
+CLIENT = $(NAME_PREFIX)client
+SERVER = $(NAME_PREFIX)server
-TARGETS = $(CLIENT) $(SERVER)
+TARGETS = $(CLIENT)$(EXT) $(SERVER)$(EXT)
COBJS = Test.obj \
Client.obj \
@@ -30,18 +38,24 @@ SRCS = $(COBJS:.obj=.cpp) \ CPPFLAGS = -I. -I../../include $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN
SLICE2CPPFLAGS = --stream $(SLICE2CPPFLAGS)
+!if "$(WINRT)" != "yes"
+LD_TESTFLAGS = $(LD_EXEFLAGS) $(SETARGV)
+!else
+LD_TESTFLAGS = $(LD_DLLFLAGS) /export:dllMain
+!endif
+
!if "$(GENERATE_PDB)" == "yes"
-CPDBFLAGS = /pdb:$(CLIENT:.exe=.pdb)
-SPDBFLAGS = /pdb:$(SERVER:.exe=.pdb)
+CPDBFLAGS = /pdb:$(CLIENT).pdb
+SPDBFLAGS = /pdb:$(SERVER).pdb
!endif
-$(CLIENT): $(COBJS)
- $(LINK) $(LD_EXEFLAGS) $(CPDBFLAGS) $(SETARGV) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
+$(CLIENT)$(EXT): $(COBJS)
+ $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
$(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
-$(SERVER): $(SOBJS)
- $(LINK) $(LD_EXEFLAGS) $(SPDBFLAGS) $(SETARGV) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
+$(SERVER)$(EXT): $(SOBJS)
+ $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
$(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
diff --git a/cpp/test/Ice/invoke/Server.cpp b/cpp/test/Ice/invoke/Server.cpp index 5a7af226c21..a82bf1256d2 100644 --- a/cpp/test/Ice/invoke/Server.cpp +++ b/cpp/test/Ice/invoke/Server.cpp @@ -8,9 +8,12 @@ // ********************************************************************** #include <Ice/Ice.h> +#include <TestCommon.h> #include <IceUtil/Options.h> #include <BlobjectI.h> +DEFINE_TEST("server") + using namespace std; class ServantLocatorI : public Ice::ServantLocator @@ -90,6 +93,8 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) adapter->addServantLocator(new ServantLocatorI(array, async), ""); adapter->activate(); + TEST_READY + communicator->waitForShutdown(); return EXIT_SUCCESS; } diff --git a/cpp/test/Ice/location/Client.cpp b/cpp/test/Ice/location/Client.cpp index 93ea4db8096..b3a385c8207 100644 --- a/cpp/test/Ice/location/Client.cpp +++ b/cpp/test/Ice/location/Client.cpp @@ -11,6 +11,8 @@ #include <TestCommon.h> #include <Test.h> +DEFINE_TEST("client") + using namespace std; int diff --git a/cpp/test/Ice/location/Makefile.mak b/cpp/test/Ice/location/Makefile.mak index 4855962b667..e5c57b5c990 100644 --- a/cpp/test/Ice/location/Makefile.mak +++ b/cpp/test/Ice/location/Makefile.mak @@ -9,10 +9,18 @@ top_srcdir = ..\..\..
-CLIENT = client.exe
-SERVER = server.exe
+!if "$(WINRT)" != "yes"
+NAME_PREFIX =
+EXT = .exe
+!else
+NAME_PREFIX = Ice_location_
+EXT = .dll
+!endif
+
+CLIENT = $(NAME_PREFIX)client
+SERVER = $(NAME_PREFIX)server
-TARGETS = $(CLIENT) $(SERVER)
+TARGETS = $(CLIENT)$(EXT) $(SERVER)$(EXT)
COBJS = Test.obj \
Client.obj \
@@ -30,18 +38,24 @@ SRCS = $(COBJS:.obj=.cpp) \ CPPFLAGS = -I. -I../../include $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN
+!if "$(WINRT)" != "yes"
+LD_TESTFLAGS = $(LD_EXEFLAGS) $(SETARGV)
+!else
+LD_TESTFLAGS = $(LD_DLLFLAGS) /export:dllMain
+!endif
+
!if "$(GENERATE_PDB)" == "yes"
-CPDBFLAGS = /pdb:$(CLIENT:.exe=.pdb)
-SPDBFLAGS = /pdb:$(SERVER:.exe=.pdb)
+CPDBFLAGS = /pdb:$(CLIENT).pdb
+SPDBFLAGS = /pdb:$(SERVER).pdb
!endif
-$(CLIENT): $(COBJS)
- $(LINK) $(LD_EXEFLAGS) $(CPDBFLAGS) $(SETARGV) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
+$(CLIENT)$(EXT): $(COBJS)
+ $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
$(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
-$(SERVER): $(SOBJS)
- $(LINK) $(LD_EXEFLAGS) $(SPDBFLAGS) $(SETARGV) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
+$(SERVER)$(EXT): $(SOBJS)
+ $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
$(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
diff --git a/cpp/test/Ice/location/Server.cpp b/cpp/test/Ice/location/Server.cpp index 3f5bf0f29d2..61a8c38e680 100644 --- a/cpp/test/Ice/location/Server.cpp +++ b/cpp/test/Ice/location/Server.cpp @@ -9,8 +9,11 @@ #include <Ice/Ice.h> #include <ServerLocator.h> +#include <TestCommon.h> #include <TestI.h> +DEFINE_TEST("server") + using namespace std; int @@ -45,6 +48,7 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator, adapter->add(locator, communicator->stringToIdentity("locator")); adapter->activate(); + TEST_READY communicator->waitForShutdown(); return EXIT_SUCCESS; diff --git a/cpp/test/Ice/objects/Client.cpp b/cpp/test/Ice/objects/Client.cpp index 8d217849c0b..0e8aef5be86 100644 --- a/cpp/test/Ice/objects/Client.cpp +++ b/cpp/test/Ice/objects/Client.cpp @@ -11,6 +11,8 @@ #include <TestCommon.h> #include <TestI.h> +DEFINE_TEST("client") + using namespace std; using namespace Test; diff --git a/cpp/test/Ice/objects/Collocated.cpp b/cpp/test/Ice/objects/Collocated.cpp index dc1c99de7f1..360b9dfc7e0 100644 --- a/cpp/test/Ice/objects/Collocated.cpp +++ b/cpp/test/Ice/objects/Collocated.cpp @@ -8,8 +8,11 @@ // ********************************************************************** #include <Ice/Ice.h> +#include <TestCommon.h> #include <TestI.h> +DEFINE_TEST("collocated") + using namespace std; using namespace Test; diff --git a/cpp/test/Ice/objects/Makefile.mak b/cpp/test/Ice/objects/Makefile.mak index bb60d674704..a03336648fd 100644 --- a/cpp/test/Ice/objects/Makefile.mak +++ b/cpp/test/Ice/objects/Makefile.mak @@ -9,11 +9,19 @@ top_srcdir = ..\..\..
-CLIENT = client.exe
-SERVER = server.exe
-COLLOCATED = collocated.exe
+!if "$(WINRT)" != "yes"
+NAME_PREFIX =
+EXT = .exe
+!else
+NAME_PREFIX = Ice_objects_
+EXT = .dll
+!endif
+
+CLIENT = $(NAME_PREFIX)client
+SERVER = $(NAME_PREFIX)server
+COLLOCATED = $(NAME_PREFIX)collocated
-TARGETS = $(CLIENT) $(SERVER) $(COLLOCATED)
+TARGETS = $(CLIENT)$(EXT) $(SERVER)$(EXT) $(COLLOCATED)$(EXT)
COBJS = Test.obj \
TestI.obj \
@@ -38,24 +46,30 @@ SRCS = $(COBJS:.obj=.cpp) \ SLICE2CPPFLAGS = --stream $(SLICE2CPPFLAGS)
CPPFLAGS = -I. -I../../include $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN
+!if "$(WINRT)" != "yes"
+LD_TESTFLAGS = $(LD_EXEFLAGS) $(SETARGV)
+!else
+LD_TESTFLAGS = $(LD_DLLFLAGS) /export:dllMain
+!endif
+
!if "$(GENERATE_PDB)" == "yes"
-CPDBFLAGS = /pdb:$(CLIENT:.exe=.pdb)
-SPDBFLAGS = /pdb:$(SERVER:.exe=.pdb)
-COPDBFLAGS = /pdb:$(COLLOCATED:.exe=.pdb)
+CPDBFLAGS = /pdb:$(CLIENT).pdb
+SPDBFLAGS = /pdb:$(SERVER).pdb
+COPDBFLAGS = /pdb:$(COLLOCATED).pdb
!endif
-$(CLIENT): $(COBJS)
- $(LINK) $(LD_EXEFLAGS) $(CPDBFLAGS) $(SETARGV) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
+$(CLIENT)$(EXT): $(COBJS)
+ $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
$(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
-$(SERVER): $(SOBJS)
- $(LINK) $(LD_EXEFLAGS) $(SPDBFLAGS) $(SETARGV) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
+$(SERVER)$(EXT): $(SOBJS)
+ $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
$(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
-$(COLLOCATED): $(COLOBJS)
- $(LINK) $(LD_EXEFLAGS) $(COPDBFLAGS) $(SETARGV) $(COLOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
+$(COLLOCATED)$(EXT): $(COLOBJS)
+ $(LINK) $(LD_TESTFLAGS) $(COPDBFLAGS) $(COLOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
$(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
diff --git a/cpp/test/Ice/objects/Server.cpp b/cpp/test/Ice/objects/Server.cpp index d3e1924c469..2935a81423a 100644 --- a/cpp/test/Ice/objects/Server.cpp +++ b/cpp/test/Ice/objects/Server.cpp @@ -8,8 +8,11 @@ // ********************************************************************** #include <Ice/Ice.h> +#include <TestCommon.h> #include <TestI.h> +DEFINE_TEST("server") + using namespace std; using namespace Test; @@ -57,6 +60,7 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) UnexpectedObjectExceptionTestIPtr uoet = new UnexpectedObjectExceptionTestI; adapter->add(uoet, communicator->stringToIdentity("uoet")); adapter->activate(); + TEST_READY communicator->waitForShutdown(); return EXIT_SUCCESS; } diff --git a/cpp/test/Ice/operations/Client.cpp b/cpp/test/Ice/operations/Client.cpp index 8a633a4c41c..b8f7ebeb440 100644 --- a/cpp/test/Ice/operations/Client.cpp +++ b/cpp/test/Ice/operations/Client.cpp @@ -11,12 +11,12 @@ #include <TestCommon.h> #include <Test.h> +DEFINE_TEST("client") + using namespace std; int -run(int argc, char* argv[], - const Ice::CommunicatorPtr& communicator, - const Ice::InitializationData& initData) +run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator, const Ice::InitializationData& initData) { Test::MyClassPrx allTests(const Ice::CommunicatorPtr&, bool); Test::MyClassPrx myClass = allTests(communicator, false); diff --git a/cpp/test/Ice/operations/Collocated.cpp b/cpp/test/Ice/operations/Collocated.cpp index efa43b8e098..4657db9072a 100644 --- a/cpp/test/Ice/operations/Collocated.cpp +++ b/cpp/test/Ice/operations/Collocated.cpp @@ -8,8 +8,11 @@ // ********************************************************************** #include <Ice/Ice.h> +#include <TestCommon.h> #include <TestI.h> +DEFINE_TEST("collocated") + using namespace std; int diff --git a/cpp/test/Ice/operations/Makefile.mak b/cpp/test/Ice/operations/Makefile.mak index eb930df88a8..a0f92b58206 100644 --- a/cpp/test/Ice/operations/Makefile.mak +++ b/cpp/test/Ice/operations/Makefile.mak @@ -9,12 +9,20 @@ top_srcdir = ..\..\..
-CLIENT = client.exe
-SERVER = server.exe
-SERVERAMD = serveramd.exe
-COLLOCATED = collocated.exe
+!if "$(WINRT)" != "yes"
+NAME_PREFIX =
+EXT = .exe
+!else
+NAME_PREFIX = Ice_operations_
+EXT = .dll
+!endif
+
+CLIENT = $(NAME_PREFIX)client
+SERVER = $(NAME_PREFIX)server
+SERVERAMD = $(NAME_PREFIX)serveramd
+COLLOCATED = $(NAME_PREFIX)collocated
-TARGETS = $(CLIENT) $(SERVER) $(SERVERAMD) $(COLLOCATED)
+TARGETS = $(CLIENT)$(EXT) $(SERVER)$(EXT) $(SERVERAMD)$(EXT) $(COLLOCATED)$(EXT)
COBJS = Test.obj \
Client.obj \
@@ -59,30 +67,36 @@ CPPFLAGS = -I. -I../../include $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN CPPFLAGS = $(CPPFLAGS) -Zm200
!endif
+!if "$(WINRT)" != "yes"
+LD_TESTFLAGS = $(LD_EXEFLAGS) $(SETARGV)
+!else
+LD_TESTFLAGS = $(LD_DLLFLAGS) /export:dllMain
+!endif
+
!if "$(GENERATE_PDB)" == "yes"
-CPDBFLAGS = /pdb:$(CLIENT:.exe=.pdb)
-SPDBFLAGS = /pdb:$(SERVER:.exe=.pdb)
-SAPDBFLAGS = /pdb:$(SERVERAMD:.exe=.pdb)
-COPDBFLAGS = /pdb:$(COLLOCATED:.exe=.pdb)
+CPDBFLAGS = /pdb:$(CLIENT).pdb
+SPDBFLAGS = /pdb:$(SERVER).pdb
+SAPDBFLAGS = /pdb:$(SERVERAMD).pdb
+COPDBFLAGS = /pdb:$(COLLOCATED).pdb
!endif
-$(CLIENT): $(COBJS)
- $(LINK) $(LD_EXEFLAGS) $(CPDBFLAGS) $(SETARGV) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
+$(CLIENT)$(EXT): $(COBJS)
+ $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
$(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
-$(SERVER): $(SOBJS)
- $(LINK) $(LD_EXEFLAGS) $(SPDBFLAGS) $(SETARGV) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
+$(SERVER)$(EXT): $(SOBJS)
+ $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
$(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
-$(SERVERAMD): $(SAMDOBJS)
- $(LINK) $(LD_EXEFLAGS) $(SAPDBFLAGS) $(SETARGV) $(SAMDOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
+$(SERVERAMD)$(EXT): $(SAMDOBJS)
+ $(LINK) $(LD_TESTFLAGS) $(SAPDBFLAGS) $(SAMDOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
$(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
-$(COLLOCATED): $(COLOBJS)
- $(LINK) $(LD_EXEFLAGS) $(COPDBFLAGS) $(SETARGV) $(COLOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
+$(COLLOCATED)$(EXT): $(COLOBJS)
+ $(LINK) $(LD_TESTFLAGS) $(COPDBFLAGS) $(COLOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
$(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
diff --git a/cpp/test/Ice/operations/Server.cpp b/cpp/test/Ice/operations/Server.cpp index a26158c1d80..243c4ffa3b5 100644 --- a/cpp/test/Ice/operations/Server.cpp +++ b/cpp/test/Ice/operations/Server.cpp @@ -8,8 +8,11 @@ // ********************************************************************** #include <Ice/Ice.h> +#include <TestCommon.h> #include <TestI.h> +DEFINE_TEST("server") + using namespace std; int @@ -19,7 +22,7 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); adapter->add(new MyDerivedClassI, communicator->stringToIdentity("test")); adapter->activate(); - + TEST_READY communicator->waitForShutdown(); return EXIT_SUCCESS; } diff --git a/cpp/test/Ice/operations/ServerAMD.cpp b/cpp/test/Ice/operations/ServerAMD.cpp index 412f40a1e7f..768fec900c1 100644 --- a/cpp/test/Ice/operations/ServerAMD.cpp +++ b/cpp/test/Ice/operations/ServerAMD.cpp @@ -8,8 +8,11 @@ // ********************************************************************** #include <Ice/Ice.h> +#include <TestCommon.h> #include <TestAMDI.h> +DEFINE_TEST("serveramd") + using namespace std; int @@ -19,7 +22,7 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); adapter->add(new MyDerivedClassI, communicator->stringToIdentity("test")); adapter->activate(); - + TEST_READY communicator->waitForShutdown(); return EXIT_SUCCESS; } diff --git a/cpp/test/Ice/operations/Twoways.cpp b/cpp/test/Ice/operations/Twoways.cpp index 305647be999..a451acb0887 100644 --- a/cpp/test/Ice/operations/Twoways.cpp +++ b/cpp/test/Ice/operations/Twoways.cpp @@ -731,6 +731,7 @@ twoways(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrx& p) test(r == ctx); } +#ifndef ICE_OS_WINRT { // // Test implicit context propagation @@ -795,7 +796,8 @@ twoways(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrx& p) ic->destroy(); } } - } +#endif + } { Ice::Double d = 1278312346.0 / 13.0; diff --git a/cpp/test/Ice/operations/TwowaysAMI.cpp b/cpp/test/Ice/operations/TwowaysAMI.cpp index 8b316887ad4..e1182970cfd 100644 --- a/cpp/test/Ice/operations/TwowaysAMI.cpp +++ b/cpp/test/Ice/operations/TwowaysAMI.cpp @@ -1378,6 +1378,7 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrx& p) cb->check(); } +#ifndef ICE_OS_WINRT { // // Test implicit context propagation @@ -1447,6 +1448,7 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrx& p) ic->destroy(); } } +#endif } { diff --git a/cpp/test/Ice/operations/TwowaysNewAMI.cpp b/cpp/test/Ice/operations/TwowaysNewAMI.cpp index 9c4a2626f7b..0b156c55651 100644 --- a/cpp/test/Ice/operations/TwowaysNewAMI.cpp +++ b/cpp/test/Ice/operations/TwowaysNewAMI.cpp @@ -959,6 +959,7 @@ twowaysNewAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrx& test(c == ctx); } +#ifndef ICE_OS_WINRT { // // Test implicit context propagation @@ -1028,6 +1029,7 @@ twowaysNewAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrx& ic->destroy(); } } +#endif } { diff --git a/cpp/test/Ice/proxy/AllTests.cpp b/cpp/test/Ice/proxy/AllTests.cpp index e4fe490cf12..41e364c2362 100644 --- a/cpp/test/Ice/proxy/AllTests.cpp +++ b/cpp/test/Ice/proxy/AllTests.cpp @@ -727,7 +727,11 @@ allTests(const Ice::CommunicatorPtr& communicator) if(communicator->getProperties()->getPropertyAsInt("Ice.IPv6") == 0) { // Working? +#ifndef ICE_OS_WINRT bool ssl = communicator->getProperties()->getProperty("Ice.Default.Protocol") == "ssl"; +#else + bool ssl = true; +#endif if(!ssl) { p1->ice_ping(); diff --git a/cpp/test/Ice/proxy/Client.cpp b/cpp/test/Ice/proxy/Client.cpp index 9d457da663f..1896366d79c 100644 --- a/cpp/test/Ice/proxy/Client.cpp +++ b/cpp/test/Ice/proxy/Client.cpp @@ -11,12 +11,12 @@ #include <TestCommon.h> #include <Test.h> +DEFINE_TEST("client") + using namespace std; int -run(int argc, char* argv[], - const Ice::CommunicatorPtr& communicator, - const Ice::InitializationData& initData) +run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator, const Ice::InitializationData& initData) { Test::MyClassPrx allTests(const Ice::CommunicatorPtr&); Test::MyClassPrx myClass = allTests(communicator); diff --git a/cpp/test/Ice/proxy/Collocated.cpp b/cpp/test/Ice/proxy/Collocated.cpp index 64857def924..6008280ab0e 100644 --- a/cpp/test/Ice/proxy/Collocated.cpp +++ b/cpp/test/Ice/proxy/Collocated.cpp @@ -8,8 +8,11 @@ // ********************************************************************** #include <Ice/Ice.h> +#include <TestCommon.h> #include <TestI.h> +DEFINE_TEST("collocated") + using namespace std; int diff --git a/cpp/test/Ice/proxy/Makefile.mak b/cpp/test/Ice/proxy/Makefile.mak index b63f2827650..0f63e96dc8c 100644 --- a/cpp/test/Ice/proxy/Makefile.mak +++ b/cpp/test/Ice/proxy/Makefile.mak @@ -9,12 +9,20 @@ top_srcdir = ..\..\..
-CLIENT = client.exe
-SERVER = server.exe
-SERVERAMD = serveramd.exe
-COLLOCATED = collocated.exe
+!if "$(WINRT)" != "yes"
+NAME_PREFIX =
+EXT = .exe
+!else
+NAME_PREFIX = Ice_proxy_
+EXT = .dll
+!endif
+
+CLIENT = $(NAME_PREFIX)client
+SERVER = $(NAME_PREFIX)server
+SERVERAMD = $(NAME_PREFIX)serveramd
+COLLOCATED = $(NAME_PREFIX)collocated
-TARGETS = $(CLIENT) $(SERVER) $(SERVERAMD) $(COLLOCATED)
+TARGETS = $(CLIENT)$(EXT) $(SERVER)$(EXT) $(SERVERAMD)$(EXT) $(COLLOCATED)$(EXT)
COBJS = Test.obj \
Client.obj \
@@ -42,30 +50,36 @@ SRCS = $(COBJS:.obj=.cpp) \ CPPFLAGS = -I. -I../../include $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN
+!if "$(WINRT)" != "yes"
+LD_TESTFLAGS = $(LD_EXEFLAGS) $(SETARGV)
+!else
+LD_TESTFLAGS = $(LD_DLLFLAGS) /export:dllMain
+!endif
+
!if "$(GENERATE_PDB)" == "yes"
-CPDBFLAGS = /pdb:$(CLIENT:.exe=.pdb)
-SPDBFLAGS = /pdb:$(SERVER:.exe=.pdb)
-SAPDBFLAGS = /pdb:$(SERVERAMD:.exe=.pdb)
-COPDBFLAGS = /pdb:$(COLLOCATED:.exe=.pdb)
+CPDBFLAGS = /pdb:$(CLIENT).pdb
+SPDBFLAGS = /pdb:$(SERVER).pdb
+SAPDBFLAGS = /pdb:$(SERVERAMD).pdb
+COPDBFLAGS = /pdb:$(COLLOCATED).pdb
!endif
-$(CLIENT): $(COBJS)
- $(LINK) $(LD_EXEFLAGS) $(CPDBFLAGS) $(SETARGV) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
+$(CLIENT)$(EXT): $(COBJS)
+ $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
$(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
-$(SERVER): $(SOBJS)
- $(LINK) $(LD_EXEFLAGS) $(SPDBFLAGS) $(SETARGV) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
+$(SERVER)$(EXT): $(SOBJS)
+ $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
$(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
-$(SERVERAMD): $(SAMDOBJS)
- $(LINK) $(LD_EXEFLAGS) $(SAPDBFLAGS) $(SETARGV) $(SAMDOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
+$(SERVERAMD)$(EXT): $(SAMDOBJS)
+ $(LINK) $(LD_TESTFLAGS) $(SAPDBFLAGS) $(SAMDOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
$(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
-$(COLLOCATED): $(COLOBJS)
- $(LINK) $(LD_EXEFLAGS) $(COPDBFLAGS) $(SETARGV) $(COLOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
+$(COLLOCATED)$(EXT): $(COLOBJS)
+ $(LINK) $(LD_TESTFLAGS) $(COPDBFLAGS) $(COLOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
$(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
diff --git a/cpp/test/Ice/proxy/Server.cpp b/cpp/test/Ice/proxy/Server.cpp index b51240b1793..ecc00137840 100644 --- a/cpp/test/Ice/proxy/Server.cpp +++ b/cpp/test/Ice/proxy/Server.cpp @@ -8,8 +8,11 @@ // ********************************************************************** #include <Ice/Ice.h> +#include <TestCommon.h> #include <TestI.h> +DEFINE_TEST("server") + using namespace std; int @@ -19,7 +22,7 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); adapter->add(new MyDerivedClassI, communicator->stringToIdentity("test")); adapter->activate(); - + TEST_READY communicator->waitForShutdown(); return EXIT_SUCCESS; } diff --git a/cpp/test/Ice/proxy/ServerAMD.cpp b/cpp/test/Ice/proxy/ServerAMD.cpp index dbf21ca947f..5217f8bc77a 100644 --- a/cpp/test/Ice/proxy/ServerAMD.cpp +++ b/cpp/test/Ice/proxy/ServerAMD.cpp @@ -8,8 +8,11 @@ // ********************************************************************** #include <Ice/Ice.h> +#include <TestCommon.h> #include <TestAMDI.h> +DEFINE_TEST("serveramd") + using namespace std; int diff --git a/cpp/test/Ice/retry/Client.cpp b/cpp/test/Ice/retry/Client.cpp index 430763ab8d4..f917158a746 100644 --- a/cpp/test/Ice/retry/Client.cpp +++ b/cpp/test/Ice/retry/Client.cpp @@ -11,6 +11,8 @@ #include <TestCommon.h> #include <Test.h> +DEFINE_TEST("client") + using namespace std; using namespace Test; diff --git a/cpp/test/Ice/retry/Makefile.mak b/cpp/test/Ice/retry/Makefile.mak index 14343d3dbc3..043b241c900 100644 --- a/cpp/test/Ice/retry/Makefile.mak +++ b/cpp/test/Ice/retry/Makefile.mak @@ -9,10 +9,18 @@ top_srcdir = ..\..\..
-CLIENT = client.exe
-SERVER = server.exe
+!if "$(WINRT)" != "yes"
+NAME_PREFIX =
+EXT = .exe
+!else
+NAME_PREFIX = Ice_retry_
+EXT = .dll
+!endif
+
+CLIENT = $(NAME_PREFIX)client
+SERVER = $(NAME_PREFIX)server
-TARGETS = $(CLIENT) $(SERVER)
+TARGETS = $(CLIENT)$(EXT) $(SERVER)$(EXT)
COBJS = Test.obj \
Client.obj \
@@ -29,18 +37,24 @@ SRCS = $(COBJS:.obj=.cpp) \ CPPFLAGS = -I. -I../../include $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN
+!if "$(WINRT)" != "yes"
+LD_TESTFLAGS = $(LD_EXEFLAGS) $(SETARGV)
+!else
+LD_TESTFLAGS = $(LD_DLLFLAGS) /export:dllMain
+!endif
+
!if "$(GENERATE_PDB)" == "yes"
-CPDBFLAGS = /pdb:$(CLIENT:.exe=.pdb)
-SPDBFLAGS = /pdb:$(SERVER:.exe=.pdb)
+CPDBFLAGS = /pdb:$(CLIENT).pdb
+SPDBFLAGS = /pdb:$(SERVER).pdb
!endif
-$(CLIENT): $(COBJS)
- $(LINK) $(LD_EXEFLAGS) $(CPDBFLAGS) $(SETARGV) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
+$(CLIENT)$(EXT): $(COBJS)
+ $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
$(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
-$(SERVER): $(SOBJS)
- $(LINK) $(LD_EXEFLAGS) $(SPDBFLAGS) $(SETARGV) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
+$(SERVER)$(EXT): $(SOBJS)
+ $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
$(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
diff --git a/cpp/test/Ice/retry/Server.cpp b/cpp/test/Ice/retry/Server.cpp index 5cf27927c15..fda5cd33cdd 100644 --- a/cpp/test/Ice/retry/Server.cpp +++ b/cpp/test/Ice/retry/Server.cpp @@ -8,8 +8,11 @@ // ********************************************************************** #include <Ice/Ice.h> +#include <TestCommon.h> #include <TestI.h> +DEFINE_TEST("server") + using namespace std; int @@ -20,6 +23,7 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) Ice::ObjectPtr object = new RetryI; adapter->add(object, communicator->stringToIdentity("retry")); adapter->activate(); + TEST_READY communicator->waitForShutdown(); return EXIT_SUCCESS; } diff --git a/cpp/test/Ice/servantLocator/Makefile.mak b/cpp/test/Ice/servantLocator/Makefile.mak index aafa1866c4f..edeb940de39 100644 --- a/cpp/test/Ice/servantLocator/Makefile.mak +++ b/cpp/test/Ice/servantLocator/Makefile.mak @@ -9,12 +9,20 @@ top_srcdir = ..\..\..
-CLIENT = client.exe
-SERVER = server.exe
-SERVERAMD = serveramd.exe
-COLLOCATED = collocated.exe
+!if "$(WINRT)" != "yes"
+NAME_PREFIX =
+EXT = .exe
+!else
+NAME_PREFIX = Ice_servantLocator_
+EXT = .dll
+!endif
+
+CLIENT = $(NAME_PREFIX)client
+SERVER = $(NAME_PREFIX)server
+SERVERAMD = $(NAME_PREFIX)serveramd
+COLLOCATED = $(NAME_PREFIX)collocated
-TARGETS = $(CLIENT) $(SERVER) $(SERVERAMD) $(COLLOCATED)
+TARGETS = $(CLIENT)$(EXT) $(SERVER)$(EXT) $(SERVERAMD)$(EXT) $(COLLOCATED)$(EXT)
COBJS = Test.obj \
Client.obj \
@@ -45,29 +53,36 @@ SRCS = $(COBJS:.obj=.cpp) \ CPPFLAGS = -I. -I../../include $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN
+!if "$(WINRT)" != "yes"
+LD_TESTFLAGS = $(LD_EXEFLAGS) $(SETARGV)
+!else
+LD_TESTFLAGS = $(LD_DLLFLAGS) /export:dllMain
+!endif
+
!if "$(GENERATE_PDB)" == "yes"
-CPDBFLAGS = /pdb:$(CLIENT:.exe=.pdb)
-SPDBFLAGS = /pdb:$(SERVER:.exe=.pdb)
-COPDBFLAGS = /pdb:$(COLLOCATED:.exe=.pdb)
+CPDBFLAGS = /pdb:$(CLIENT).pdb
+SPDBFLAGS = /pdb:$(SERVER).pdb
+SAPDBFLAGS = /pdb:$(SERVERAMD).pdb
+COPDBFLAGS = /pdb:$(COLLOCATED).pdb
!endif
-$(CLIENT): $(COBJS)
- $(LINK) $(LD_EXEFLAGS) $(CPDBFLAGS) $(SETARGV) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
+$(CLIENT)$(EXT): $(COBJS)
+ $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
$(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
-$(SERVER): $(SOBJS)
- $(LINK) $(LD_EXEFLAGS) $(SPDBFLAGS) $(SETARGV) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
+$(SERVER)$(EXT): $(SOBJS)
+ $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
$(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
-$(SERVERAMD): $(SAMDOBJS)
- $(LINK) $(LD_EXEFLAGS) $(SAPDBFLAGS) $(SETARGV) $(SAMDOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
+$(SERVERAMD)$(EXT): $(SAMDOBJS)
+ $(LINK) $(LD_TESTFLAGS) $(SAPDBFLAGS) $(SAMDOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
$(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
-$(COLLOCATED): $(COLOBJS)
- $(LINK) $(LD_EXEFLAGS) $(COPDBFLAGS) $(SETARGV) $(COLOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
+$(COLLOCATED)$(EXT): $(COLOBJS)
+ $(LINK) $(LD_TESTFLAGS) $(COPDBFLAGS) $(COLOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
$(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
diff --git a/cpp/test/Ice/stream/Client.cpp b/cpp/test/Ice/stream/Client.cpp index d1bd2a4f2b5..f98c229ae06 100755 --- a/cpp/test/Ice/stream/Client.cpp +++ b/cpp/test/Ice/stream/Client.cpp @@ -20,6 +20,8 @@ # pragma warning( disable : 4996 ) #endif +DEFINE_TEST("client") + using namespace std; #if defined(_MSC_VER) && (_MSC_VER < 1300) // COMPILERBUG diff --git a/cpp/test/Ice/stream/Makefile.mak b/cpp/test/Ice/stream/Makefile.mak index 267d3a78a55..7451dab5d83 100644 --- a/cpp/test/Ice/stream/Makefile.mak +++ b/cpp/test/Ice/stream/Makefile.mak @@ -9,9 +9,17 @@ top_srcdir = ..\..\..
-CLIENT = client.exe
+!if "$(WINRT)" != "yes"
+NAME_PREFIX =
+EXT = .exe
+!else
+NAME_PREFIX = Ice_stream_
+EXT = .dll
+!endif
+
+CLIENT = $(NAME_PREFIX)client
-TARGETS = $(CLIENT)
+TARGETS = $(CLIENT)$(EXT)
COBJS = Test.obj \
Client.obj
@@ -23,12 +31,18 @@ SRCS = $(COBJS:.obj=.cpp) SLICE2CPPFLAGS = --stream $(SLICE2CPPFLAGS)
CPPFLAGS = -I. -I../../include $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN
+!if "$(WINRT)" != "yes"
+LD_TESTFLAGS = $(LD_EXEFLAGS) $(SETARGV)
+!else
+LD_TESTFLAGS = $(LD_DLLFLAGS) /export:dllMain
+!endif
+
!if "$(GENERATE_PDB)" == "yes"
-PDBFLAGS = /pdb:$(CLIENT:.exe=.pdb)
+CPDBFLAGS = /pdb:$(CLIENT).pdb
!endif
-$(CLIENT): $(COBJS)
- $(LINK) $(LD_EXEFLAGS) $(PDBFLAGS) $(SETARGV) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
+$(CLIENT)$(EXT): $(COBJS)
+ $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
$(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
diff --git a/cpp/test/Ice/timeout/Client.cpp b/cpp/test/Ice/timeout/Client.cpp index d02cbb01713..d7169a5d4ba 100644 --- a/cpp/test/Ice/timeout/Client.cpp +++ b/cpp/test/Ice/timeout/Client.cpp @@ -11,6 +11,8 @@ #include <TestCommon.h> #include <Test.h> +DEFINE_TEST("client") + using namespace std; using namespace Test; diff --git a/cpp/test/Ice/timeout/Makefile.mak b/cpp/test/Ice/timeout/Makefile.mak index 14343d3dbc3..c670eab259c 100644 --- a/cpp/test/Ice/timeout/Makefile.mak +++ b/cpp/test/Ice/timeout/Makefile.mak @@ -9,10 +9,18 @@ top_srcdir = ..\..\..
-CLIENT = client.exe
-SERVER = server.exe
+!if "$(WINRT)" != "yes"
+NAME_PREFIX =
+EXT = .exe
+!else
+NAME_PREFIX = Ice_timeout_
+EXT = .dll
+!endif
+
+CLIENT = $(NAME_PREFIX)client
+SERVER = $(NAME_PREFIX)server
-TARGETS = $(CLIENT) $(SERVER)
+TARGETS = $(CLIENT)$(EXT) $(SERVER)$(EXT)
COBJS = Test.obj \
Client.obj \
@@ -29,18 +37,24 @@ SRCS = $(COBJS:.obj=.cpp) \ CPPFLAGS = -I. -I../../include $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN
+!if "$(WINRT)" != "yes"
+LD_TESTFLAGS = $(LD_EXEFLAGS) $(SETARGV)
+!else
+LD_TESTFLAGS = $(LD_DLLFLAGS) /export:dllMain
+!endif
+
!if "$(GENERATE_PDB)" == "yes"
-CPDBFLAGS = /pdb:$(CLIENT:.exe=.pdb)
-SPDBFLAGS = /pdb:$(SERVER:.exe=.pdb)
+CPDBFLAGS = /pdb:$(CLIENT).pdb
+SPDBFLAGS = /pdb:$(SERVER).pdb
!endif
-$(CLIENT): $(COBJS)
- $(LINK) $(LD_EXEFLAGS) $(CPDBFLAGS) $(SETARGV) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
+$(CLIENT)$(EXT): $(COBJS)
+ $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
$(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
-$(SERVER): $(SOBJS)
- $(LINK) $(LD_EXEFLAGS) $(SPDBFLAGS) $(SETARGV) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
+$(SERVER)$(EXT): $(SOBJS)
+ $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
$(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
diff --git a/cpp/test/Ice/timeout/Server.cpp b/cpp/test/Ice/timeout/Server.cpp index c86b6706d85..0e39eb56699 100644 --- a/cpp/test/Ice/timeout/Server.cpp +++ b/cpp/test/Ice/timeout/Server.cpp @@ -8,8 +8,11 @@ // ********************************************************************** #include <Ice/Ice.h> +#include <TestCommon.h> #include <TestI.h> +DEFINE_TEST("server") + using namespace std; int @@ -20,6 +23,7 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) Ice::ObjectPtr object = new TimeoutI; adapter->add(object, communicator->stringToIdentity("timeout")); adapter->activate(); + TEST_READY communicator->waitForShutdown(); return EXIT_SUCCESS; } diff --git a/cpp/test/Ice/udp/AllTests.cpp b/cpp/test/Ice/udp/AllTests.cpp index 274f4246196..f61f213f103 100644 --- a/cpp/test/Ice/udp/AllTests.cpp +++ b/cpp/test/Ice/udp/AllTests.cpp @@ -135,8 +135,6 @@ allTests(const CommunicatorPtr& communicator) cout << "ok" << endl; - - cout << "testing udp multicast... " << flush; string host; if(communicator->getProperties()->getProperty("Ice.IPv6") == "1") { @@ -148,6 +146,8 @@ allTests(const CommunicatorPtr& communicator) } base = communicator->stringToProxy("test -d:udp -h " + host + " -p 12020"); TestIntfPrx objMcast = TestIntfPrx::uncheckedCast(base); +#ifndef ICE_OS_WINRT + cout << "testing udp multicast... " << flush; nRetry = 5; while(nRetry-- > 0) @@ -170,6 +170,7 @@ allTests(const CommunicatorPtr& communicator) { cout << "ok" << endl; } +#endif cout << "testing udp bi-dir connection... " << flush; obj->ice_getConnection()->setAdapter(adapter); diff --git a/cpp/test/Ice/udp/Client.cpp b/cpp/test/Ice/udp/Client.cpp index a069286b8d4..194cb393d14 100644 --- a/cpp/test/Ice/udp/Client.cpp +++ b/cpp/test/Ice/udp/Client.cpp @@ -11,6 +11,8 @@ #include <TestCommon.h> #include <Test.h> +DEFINE_TEST("client") + using namespace std; using namespace Test; @@ -20,7 +22,7 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) void allTests(const Ice::CommunicatorPtr&); allTests(communicator); - int num = argc == 2 ? atoi(argv[1]) : 0; + int num = argc == 2 ? atoi(argv[1]) : 1; for(int i = 0; i < num; i++) { ostringstream os; diff --git a/cpp/test/Ice/udp/Makefile.mak b/cpp/test/Ice/udp/Makefile.mak index 14343d3dbc3..7ad6e8b4acc 100644 --- a/cpp/test/Ice/udp/Makefile.mak +++ b/cpp/test/Ice/udp/Makefile.mak @@ -9,10 +9,18 @@ top_srcdir = ..\..\..
-CLIENT = client.exe
-SERVER = server.exe
+!if "$(WINRT)" != "yes"
+NAME_PREFIX =
+EXT = .exe
+!else
+NAME_PREFIX = Ice_udp_
+EXT = .dll
+!endif
+
+CLIENT = $(NAME_PREFIX)client
+SERVER = $(NAME_PREFIX)server
-TARGETS = $(CLIENT) $(SERVER)
+TARGETS = $(CLIENT)$(EXT) $(SERVER)$(EXT)
COBJS = Test.obj \
Client.obj \
@@ -29,18 +37,24 @@ SRCS = $(COBJS:.obj=.cpp) \ CPPFLAGS = -I. -I../../include $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN
+!if "$(WINRT)" != "yes"
+LD_TESTFLAGS = $(LD_EXEFLAGS) $(SETARGV)
+!else
+LD_TESTFLAGS = $(LD_DLLFLAGS) /export:dllMain
+!endif
+
!if "$(GENERATE_PDB)" == "yes"
-CPDBFLAGS = /pdb:$(CLIENT:.exe=.pdb)
-SPDBFLAGS = /pdb:$(SERVER:.exe=.pdb)
+CPDBFLAGS = /pdb:$(CLIENT).pdb
+SPDBFLAGS = /pdb:$(SERVER).pdb
!endif
-$(CLIENT): $(COBJS)
- $(LINK) $(LD_EXEFLAGS) $(CPDBFLAGS) $(SETARGV) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
+$(CLIENT)$(EXT): $(COBJS)
+ $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
$(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
-$(SERVER): $(SOBJS)
- $(LINK) $(LD_EXEFLAGS) $(SPDBFLAGS) $(SETARGV) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
+$(SERVER)$(EXT): $(SOBJS)
+ $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
$(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
diff --git a/cpp/test/Ice/udp/Server.cpp b/cpp/test/Ice/udp/Server.cpp index 081b11b7998..e5ed3b505f7 100644 --- a/cpp/test/Ice/udp/Server.cpp +++ b/cpp/test/Ice/udp/Server.cpp @@ -8,8 +8,11 @@ // ********************************************************************** #include <Ice/Ice.h> +#include <TestCommon.h> #include <TestI.h> +DEFINE_TEST("server") + using namespace std; int @@ -17,7 +20,7 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) { Ice::PropertiesPtr properties = communicator->getProperties(); - int num = argc == 2 ? atoi(argv[1]) : -1; + int num = argc == 2 ? atoi(argv[1]) : 0; ostringstream os; os << "tcp -p " << (12010 + num); @@ -48,6 +51,8 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) mcastAdapter->add(new TestIntfI, communicator->stringToIdentity("test")); mcastAdapter->activate(); + TEST_READY + communicator->waitForShutdown(); return EXIT_SUCCESS; } diff --git a/cpp/test/Ice/udp/TestI.cpp b/cpp/test/Ice/udp/TestI.cpp index 95ff523cc2b..78d1a392c69 100644 --- a/cpp/test/Ice/udp/TestI.cpp +++ b/cpp/test/Ice/udp/TestI.cpp @@ -63,7 +63,7 @@ TestIntfI::pingBiDir(const Ice::Identity& id, const Ice::Current& current) // // Send the reply through the incoming connection. // - Test::PingReplyPrx::uncheckedCast(current.con->createProxy(id))->reply(); + Test::PingReplyPrx::uncheckedCast(current.con->createProxy(id))->begin_reply(); } catch(const Ice::Exception& ex) { diff --git a/cpp/test/Makefile.mak b/cpp/test/Makefile.mak index b05e79c8599..8a7eac2d2f8 100644 --- a/cpp/test/Makefile.mak +++ b/cpp/test/Makefile.mak @@ -11,23 +11,22 @@ top_srcdir = .. !include $(top_srcdir)/config/Make.rules.mak
+!if "$(WINRT)" == "yes"
+
+SUBDIRS = Ice
+
+!else
+
SUBDIRS = IceUtil \
Slice \
Ice \
IceSSL
-
-!if "$(CPP_COMPILER)" != "VC60"
-SUBDIRS = $(SUBDIRS) \
Glacier2 \
Freeze \
IceStorm \
FreezeScript \
IceGrid
-
-!if "$(BCPLUSPLUS)" != "yes"
-SUBDIRS = $(SUBDIRS) \
IceBox
-!endif
!endif
diff --git a/cpp/test/WinRT/.gitignore b/cpp/test/WinRT/.gitignore new file mode 100644 index 00000000000..cd450510b65 --- /dev/null +++ b/cpp/test/WinRT/.gitignore @@ -0,0 +1,5 @@ +Debug/* +Release/* +TestSuite/Debug/* +TestSuite/Release/* +*.pch
\ No newline at end of file diff --git a/cpp/test/WinRT/TestSuite.sln b/cpp/test/WinRT/TestSuite.sln new file mode 100644 index 00000000000..0b0ae6deff9 --- /dev/null +++ b/cpp/test/WinRT/TestSuite.sln @@ -0,0 +1,38 @@ +
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2012
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestSuite", "TestSuite\TestSuite.vcxproj", "{3CE71594-E3A4-4C38-9D0F-46E2A2076F6C}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|ARM = Debug|ARM
+ Debug|Win32 = Debug|Win32
+ Debug|x64 = Debug|x64
+ Release|ARM = Release|ARM
+ Release|Win32 = Release|Win32
+ Release|x64 = Release|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {3CE71594-E3A4-4C38-9D0F-46E2A2076F6C}.Debug|ARM.ActiveCfg = Debug|ARM
+ {3CE71594-E3A4-4C38-9D0F-46E2A2076F6C}.Debug|ARM.Build.0 = Debug|ARM
+ {3CE71594-E3A4-4C38-9D0F-46E2A2076F6C}.Debug|ARM.Deploy.0 = Debug|ARM
+ {3CE71594-E3A4-4C38-9D0F-46E2A2076F6C}.Debug|Win32.ActiveCfg = Debug|Win32
+ {3CE71594-E3A4-4C38-9D0F-46E2A2076F6C}.Debug|Win32.Build.0 = Debug|Win32
+ {3CE71594-E3A4-4C38-9D0F-46E2A2076F6C}.Debug|Win32.Deploy.0 = Debug|Win32
+ {3CE71594-E3A4-4C38-9D0F-46E2A2076F6C}.Debug|x64.ActiveCfg = Debug|x64
+ {3CE71594-E3A4-4C38-9D0F-46E2A2076F6C}.Debug|x64.Build.0 = Debug|x64
+ {3CE71594-E3A4-4C38-9D0F-46E2A2076F6C}.Debug|x64.Deploy.0 = Debug|x64
+ {3CE71594-E3A4-4C38-9D0F-46E2A2076F6C}.Release|ARM.ActiveCfg = Release|ARM
+ {3CE71594-E3A4-4C38-9D0F-46E2A2076F6C}.Release|ARM.Build.0 = Release|ARM
+ {3CE71594-E3A4-4C38-9D0F-46E2A2076F6C}.Release|ARM.Deploy.0 = Release|ARM
+ {3CE71594-E3A4-4C38-9D0F-46E2A2076F6C}.Release|Win32.ActiveCfg = Release|Win32
+ {3CE71594-E3A4-4C38-9D0F-46E2A2076F6C}.Release|Win32.Build.0 = Release|Win32
+ {3CE71594-E3A4-4C38-9D0F-46E2A2076F6C}.Release|Win32.Deploy.0 = Release|Win32
+ {3CE71594-E3A4-4C38-9D0F-46E2A2076F6C}.Release|x64.ActiveCfg = Release|x64
+ {3CE71594-E3A4-4C38-9D0F-46E2A2076F6C}.Release|x64.Build.0 = Release|x64
+ {3CE71594-E3A4-4C38-9D0F-46E2A2076F6C}.Release|x64.Deploy.0 = Release|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/cpp/test/WinRT/TestSuite/App.xaml b/cpp/test/WinRT/TestSuite/App.xaml new file mode 100644 index 00000000000..46472a7b4df --- /dev/null +++ b/cpp/test/WinRT/TestSuite/App.xaml @@ -0,0 +1,45 @@ +<Application
+ x:Class="TestSuite.App"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:local="using:TestSuite">
+
+ <Application.Resources>
+ <ResourceDictionary>
+ <ResourceDictionary.MergedDictionaries>
+
+ <!--
+ Styles that define common aspects of the platform look and feel
+ Required by Visual Studio project and item templates
+ -->
+ <ResourceDictionary Source="Common/StandardStyles.xaml"/>
+ </ResourceDictionary.MergedDictionaries>
+ <Style x:Key="TitleStyle" TargetType="TextBlock">
+ <Setter Property="Foreground" Value="White" />
+ <Setter Property="FontFamily" Value="Segoe UI Light" />
+ <Setter Property="FontSize" Value="16" />
+ </Style>
+ <Style x:Key="OutputStyle" TargetType="TextBlock">
+ <Setter Property="Foreground" Value="White" />
+ <Setter Property="FontFamily" Value="Segoe UI Light" />
+ <Setter Property="FontSize" Value="16" />
+ </Style>
+ <Style x:Key="H1Style" TargetType="TextBlock">
+ <Setter Property="Foreground" Value="White" />
+ <Setter Property="FontFamily" Value="Segoe UI Light" />
+ <Setter Property="FontSize" Value="36" />
+ <Setter Property="Margin" Value="0,0,0,25" />
+ </Style>
+ <Style x:Key="FooterStyle" TargetType="TextBlock">
+ <Setter Property="Foreground" Value="White" />
+ <Setter Property="FontFamily" Value="Segoe UI Light" />
+ <Setter Property="FontSize" Value="12" />
+ <Setter Property="Margin" Value="0,8,0,0" />
+ </Style>
+ <Style x:Key="ButtonStyle" TargetType="Button">
+ <Setter Property="Foreground" Value="White"/>
+ <Setter Property="Background" Value="Gray"/>
+ </Style>
+ </ResourceDictionary>
+ </Application.Resources>
+</Application>
diff --git a/cpp/test/WinRT/TestSuite/App.xaml.cpp b/cpp/test/WinRT/TestSuite/App.xaml.cpp new file mode 100644 index 00000000000..45902d60d63 --- /dev/null +++ b/cpp/test/WinRT/TestSuite/App.xaml.cpp @@ -0,0 +1,83 @@ +//
+// App.xaml.cpp
+// Implementation of the App class.
+//
+
+#include "pch.h"
+#include "MainPage.xaml.h"
+
+using namespace TestSuite;
+
+using namespace Platform;
+using namespace Windows::ApplicationModel;
+using namespace Windows::ApplicationModel::Activation;
+using namespace Windows::Foundation;
+using namespace Windows::Foundation::Collections;
+using namespace Windows::UI::Xaml;
+using namespace Windows::UI::Xaml::Controls;
+using namespace Windows::UI::Xaml::Controls::Primitives;
+using namespace Windows::UI::Xaml::Data;
+using namespace Windows::UI::Xaml::Input;
+using namespace Windows::UI::Xaml::Interop;
+using namespace Windows::UI::Xaml::Media;
+using namespace Windows::UI::Xaml::Navigation;
+
+// The Blank Application template is documented at http://go.microsoft.com/fwlink/?LinkId=234227
+
+/// <summary>
+/// Initializes the singleton application object. This is the first line of authored code
+/// executed, and as such is the logical equivalent of main() or WinMain().
+/// </summary>
+App::App()
+{
+ InitializeComponent();
+ Suspending += ref new SuspendingEventHandler(this, &App::OnSuspending);
+}
+
+/// <summary>
+/// Invoked when the application is launched normally by the end user. Other entry points
+/// will be used when the application is launched to open a specific file, to display
+/// search results, and so forth.
+/// </summary>
+/// <param name="pArgs">Details about the launch request and process.</param>
+void App::OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs^ pArgs)
+{
+ // Do not repeat app initialization when already running, just ensure that
+ // the window is active
+ if (pArgs->PreviousExecutionState == ApplicationExecutionState::Running)
+ {
+ Window::Current->Activate();
+ return;
+ }
+
+ if (pArgs->PreviousExecutionState == ApplicationExecutionState::Terminated)
+ {
+ //TODO: Load state from previously suspended application
+ }
+
+ // Create a Frame to act navigation context and navigate to the first page
+ auto rootFrame = ref new Frame();
+ if (!rootFrame->Navigate(TypeName(MainPage::typeid)))
+ {
+ throw ref new FailureException("Failed to create initial page");
+ }
+
+ // Place the frame in the current Window and ensure that it is active
+ Window::Current->Content = rootFrame;
+ Window::Current->Activate();
+}
+
+/// <summary>
+/// Invoked when application execution is being suspended. Application state is saved
+/// without knowing whether the application will be terminated or resumed with the contents
+/// of memory still intact.
+/// </summary>
+/// <param name="sender">The source of the suspend request.</param>
+/// <param name="e">Details about the suspend request.</param>
+void App::OnSuspending(Object^ sender, SuspendingEventArgs^ e)
+{
+ (void) sender; // Unused parameter
+ (void) e; // Unused parameter
+
+ //TODO: Save application state and stop any background activity
+}
diff --git a/cpp/test/WinRT/TestSuite/App.xaml.h b/cpp/test/WinRT/TestSuite/App.xaml.h new file mode 100644 index 00000000000..d7cd0e08434 --- /dev/null +++ b/cpp/test/WinRT/TestSuite/App.xaml.h @@ -0,0 +1,24 @@ +//
+// App.xaml.h
+// Declaration of the App class.
+//
+
+#pragma once
+
+#include "App.g.h"
+
+namespace TestSuite
+{
+ /// <summary>
+ /// Provides application-specific behavior to supplement the default Application class.
+ /// </summary>
+ ref class App sealed
+ {
+ public:
+ App();
+ virtual void OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs^ pArgs) override;
+
+ private:
+ void OnSuspending(Platform::Object^ sender, Windows::ApplicationModel::SuspendingEventArgs^ e);
+ };
+}
diff --git a/cpp/test/WinRT/TestSuite/Assets/Logo.png b/cpp/test/WinRT/TestSuite/Assets/Logo.png Binary files differnew file mode 100644 index 00000000000..e26771cb33a --- /dev/null +++ b/cpp/test/WinRT/TestSuite/Assets/Logo.png diff --git a/cpp/test/WinRT/TestSuite/Assets/SmallLogo.png b/cpp/test/WinRT/TestSuite/Assets/SmallLogo.png Binary files differnew file mode 100644 index 00000000000..1eb0d9d528c --- /dev/null +++ b/cpp/test/WinRT/TestSuite/Assets/SmallLogo.png diff --git a/cpp/test/WinRT/TestSuite/Assets/SplashScreen.png b/cpp/test/WinRT/TestSuite/Assets/SplashScreen.png Binary files differnew file mode 100644 index 00000000000..c951e031bdf --- /dev/null +++ b/cpp/test/WinRT/TestSuite/Assets/SplashScreen.png diff --git a/cpp/test/WinRT/TestSuite/Assets/StoreLogo.png b/cpp/test/WinRT/TestSuite/Assets/StoreLogo.png Binary files differnew file mode 100644 index 00000000000..dcb672712c6 --- /dev/null +++ b/cpp/test/WinRT/TestSuite/Assets/StoreLogo.png diff --git a/cpp/test/WinRT/TestSuite/Common/StandardStyles.xaml b/cpp/test/WinRT/TestSuite/Common/StandardStyles.xaml new file mode 100644 index 00000000000..1937eb76021 --- /dev/null +++ b/cpp/test/WinRT/TestSuite/Common/StandardStyles.xaml @@ -0,0 +1,1007 @@ +<!--
+ This file contains XAML styles that simplify application development.
+
+ These are not merely convenient, but are required by most Visual Studio project and item templates.
+ Removing, renaming, or otherwise modifying the content of these files may result in a project that
+ does not build, or that will not build once additional pages are added. If variations on these
+ styles are desired it is recommended that you copy the content under a new name and modify your
+ private copy.
+-->
+
+<ResourceDictionary
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+
+ <!-- Non-brush values that vary across themes -->
+
+ <ResourceDictionary.ThemeDictionaries>
+ <ResourceDictionary x:Key="Default">
+ <x:String x:Key="BackButtonGlyph"></x:String>
+ <x:String x:Key="BackButtonSnappedGlyph"></x:String>
+ </ResourceDictionary>
+
+ <ResourceDictionary x:Key="HighContrast">
+ <x:String x:Key="BackButtonGlyph"></x:String>
+ <x:String x:Key="BackButtonSnappedGlyph"></x:String>
+ </ResourceDictionary>
+ </ResourceDictionary.ThemeDictionaries>
+
+ <!-- RichTextBlock styles -->
+
+ <Style x:Key="BasicRichTextStyle" TargetType="RichTextBlock">
+ <Setter Property="Foreground" Value="{StaticResource ApplicationForegroundThemeBrush}"/>
+ <Setter Property="FontSize" Value="{StaticResource ControlContentThemeFontSize}"/>
+ <Setter Property="FontFamily" Value="{StaticResource ContentControlThemeFontFamily}"/>
+ <Setter Property="TextTrimming" Value="WordEllipsis"/>
+ <Setter Property="TextWrapping" Value="Wrap"/>
+ <Setter Property="Typography.StylisticSet20" Value="True"/>
+ <Setter Property="Typography.DiscretionaryLigatures" Value="True"/>
+ <Setter Property="Typography.CaseSensitiveForms" Value="True"/>
+ </Style>
+
+ <Style x:Key="BaselineRichTextStyle" TargetType="RichTextBlock" BasedOn="{StaticResource BasicRichTextStyle}">
+ <Setter Property="LineHeight" Value="20"/>
+ <Setter Property="LineStackingStrategy" Value="BlockLineHeight"/>
+ <!-- Properly align text along its baseline -->
+ <Setter Property="RenderTransform">
+ <Setter.Value>
+ <TranslateTransform X="-1" Y="4"/>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+ <Style x:Key="ItemRichTextStyle" TargetType="RichTextBlock" BasedOn="{StaticResource BaselineRichTextStyle}"/>
+
+ <Style x:Key="BodyRichTextStyle" TargetType="RichTextBlock" BasedOn="{StaticResource BaselineRichTextStyle}">
+ <Setter Property="FontWeight" Value="SemiLight"/>
+ </Style>
+
+ <!-- TextBlock styles -->
+
+ <Style x:Key="BasicTextStyle" TargetType="TextBlock">
+ <Setter Property="Foreground" Value="{StaticResource ApplicationForegroundThemeBrush}"/>
+ <Setter Property="FontSize" Value="{StaticResource ControlContentThemeFontSize}"/>
+ <Setter Property="FontFamily" Value="{StaticResource ContentControlThemeFontFamily}"/>
+ <Setter Property="TextTrimming" Value="WordEllipsis"/>
+ <Setter Property="TextWrapping" Value="Wrap"/>
+ <Setter Property="Typography.StylisticSet20" Value="True"/>
+ <Setter Property="Typography.DiscretionaryLigatures" Value="True"/>
+ <Setter Property="Typography.CaseSensitiveForms" Value="True"/>
+ </Style>
+
+ <Style x:Key="BaselineTextStyle" TargetType="TextBlock" BasedOn="{StaticResource BasicTextStyle}">
+ <Setter Property="LineHeight" Value="20"/>
+ <Setter Property="LineStackingStrategy" Value="BlockLineHeight"/>
+ <!-- Properly align text along its baseline -->
+ <Setter Property="RenderTransform">
+ <Setter.Value>
+ <TranslateTransform X="-1" Y="4"/>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+ <Style x:Key="HeaderTextStyle" TargetType="TextBlock" BasedOn="{StaticResource BaselineTextStyle}">
+ <Setter Property="FontSize" Value="56"/>
+ <Setter Property="FontWeight" Value="Light"/>
+ <Setter Property="LineHeight" Value="40"/>
+ <Setter Property="RenderTransform">
+ <Setter.Value>
+ <TranslateTransform X="-2" Y="8"/>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+ <Style x:Key="SubheaderTextStyle" TargetType="TextBlock" BasedOn="{StaticResource BaselineTextStyle}">
+ <Setter Property="FontSize" Value="26.667"/>
+ <Setter Property="FontWeight" Value="Light"/>
+ <Setter Property="LineHeight" Value="30"/>
+ <Setter Property="RenderTransform">
+ <Setter.Value>
+ <TranslateTransform X="-1" Y="6"/>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+ <Style x:Key="TitleTextStyle" TargetType="TextBlock" BasedOn="{StaticResource BaselineTextStyle}">
+ <Setter Property="FontWeight" Value="SemiBold"/>
+ </Style>
+
+ <Style x:Key="ItemTextStyle" TargetType="TextBlock" BasedOn="{StaticResource BaselineTextStyle}"/>
+
+ <Style x:Key="BodyTextStyle" TargetType="TextBlock" BasedOn="{StaticResource BaselineTextStyle}">
+ <Setter Property="FontWeight" Value="SemiLight"/>
+ </Style>
+
+ <Style x:Key="CaptionTextStyle" TargetType="TextBlock" BasedOn="{StaticResource BaselineTextStyle}">
+ <Setter Property="FontSize" Value="12"/>
+ <Setter Property="Foreground" Value="{StaticResource ApplicationSecondaryForegroundThemeBrush}"/>
+ </Style>
+
+ <!-- Button styles -->
+
+ <!--
+ TextButtonStyle is used to style a Button using subheader-styled text with no other adornment. This
+ style is used in the GroupedItemsPage as a group header and in the FileOpenPickerPage for triggering
+ commands.
+ -->
+ <Style x:Key="TextButtonStyle" TargetType="Button">
+ <Setter Property="MinWidth" Value="0"/>
+ <Setter Property="MinHeight" Value="0"/>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="Button">
+ <Grid Background="Transparent">
+ <TextBlock
+ x:Name="Text"
+ Text="{TemplateBinding Content}"
+ Margin="3,-7,3,10"
+ TextWrapping="NoWrap"
+ Style="{StaticResource SubheaderTextStyle}"/>
+ <Rectangle
+ x:Name="FocusVisualWhite"
+ IsHitTestVisible="False"
+ Stroke="{StaticResource FocusVisualWhiteStrokeThemeBrush}"
+ StrokeEndLineCap="Square"
+ StrokeDashArray="1,1"
+ Opacity="0"
+ StrokeDashOffset="1.5"/>
+ <Rectangle
+ x:Name="FocusVisualBlack"
+ IsHitTestVisible="False"
+ Stroke="{StaticResource FocusVisualBlackStrokeThemeBrush}"
+ StrokeEndLineCap="Square"
+ StrokeDashArray="1,1"
+ Opacity="0"
+ StrokeDashOffset="0.5"/>
+
+ <VisualStateManager.VisualStateGroups>
+ <VisualStateGroup x:Name="CommonStates">
+ <VisualState x:Name="Normal"/>
+ <VisualState x:Name="PointerOver">
+ <Storyboard>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Text" Storyboard.TargetProperty="Foreground">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ApplicationPointerOverForegroundThemeBrush}"/>
+ </ObjectAnimationUsingKeyFrames>
+ </Storyboard>
+ </VisualState>
+ <VisualState x:Name="Pressed">
+ <Storyboard>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Text" Storyboard.TargetProperty="Foreground">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ApplicationPressedForegroundThemeBrush}"/>
+ </ObjectAnimationUsingKeyFrames>
+ </Storyboard>
+ </VisualState>
+ <VisualState x:Name="Disabled">
+ <Storyboard>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Text" Storyboard.TargetProperty="Foreground">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonDisabledForegroundThemeBrush}"/>
+ </ObjectAnimationUsingKeyFrames>
+ </Storyboard>
+ </VisualState>
+ </VisualStateGroup>
+ <VisualStateGroup x:Name="FocusStates">
+ <VisualState x:Name="Focused">
+ <Storyboard>
+ <DoubleAnimation Duration="0" To="1" Storyboard.TargetName="FocusVisualWhite" Storyboard.TargetProperty="Opacity"/>
+ <DoubleAnimation Duration="0" To="1" Storyboard.TargetName="FocusVisualBlack" Storyboard.TargetProperty="Opacity"/>
+ </Storyboard>
+ </VisualState>
+ <VisualState x:Name="Unfocused"/>
+ </VisualStateGroup>
+ </VisualStateManager.VisualStateGroups>
+ </Grid>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+ <!--
+ TextRadioButtonStyle is used to style a RadioButton using subheader-styled text with no other adornment.
+ This style is used in the SearchResultsPage to allow selection among filters.
+ -->
+ <Style x:Key="TextRadioButtonStyle" TargetType="RadioButton">
+ <Setter Property="MinWidth" Value="0"/>
+ <Setter Property="MinHeight" Value="0"/>
+ <Setter Property="Margin" Value="0,0,30,0"/>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="RadioButton">
+ <Grid Background="Transparent">
+ <TextBlock
+ x:Name="Text"
+ Text="{TemplateBinding Content}"
+ Margin="3,-7,3,10"
+ TextWrapping="NoWrap"
+ Style="{StaticResource SubheaderTextStyle}"/>
+ <Rectangle
+ x:Name="FocusVisualWhite"
+ IsHitTestVisible="False"
+ Stroke="{StaticResource FocusVisualWhiteStrokeThemeBrush}"
+ StrokeEndLineCap="Square"
+ StrokeDashArray="1,1"
+ Opacity="0"
+ StrokeDashOffset="1.5"/>
+ <Rectangle
+ x:Name="FocusVisualBlack"
+ IsHitTestVisible="False"
+ Stroke="{StaticResource FocusVisualBlackStrokeThemeBrush}"
+ StrokeEndLineCap="Square"
+ StrokeDashArray="1,1"
+ Opacity="0"
+ StrokeDashOffset="0.5"/>
+
+ <VisualStateManager.VisualStateGroups>
+ <VisualStateGroup x:Name="CommonStates">
+ <VisualState x:Name="Normal"/>
+ <VisualState x:Name="PointerOver">
+ <Storyboard>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Text" Storyboard.TargetProperty="Foreground">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ApplicationPointerOverForegroundThemeBrush}"/>
+ </ObjectAnimationUsingKeyFrames>
+ </Storyboard>
+ </VisualState>
+ <VisualState x:Name="Pressed">
+ <Storyboard>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Text" Storyboard.TargetProperty="Foreground">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ApplicationPressedForegroundThemeBrush}"/>
+ </ObjectAnimationUsingKeyFrames>
+ </Storyboard>
+ </VisualState>
+ <VisualState x:Name="Disabled">
+ <Storyboard>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Text" Storyboard.TargetProperty="Foreground">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonDisabledForegroundThemeBrush}"/>
+ </ObjectAnimationUsingKeyFrames>
+ </Storyboard>
+ </VisualState>
+ </VisualStateGroup>
+ <VisualStateGroup x:Name="FocusStates">
+ <VisualState x:Name="Focused">
+ <Storyboard>
+ <DoubleAnimation Duration="0" To="1" Storyboard.TargetName="FocusVisualWhite" Storyboard.TargetProperty="Opacity"/>
+ <DoubleAnimation Duration="0" To="1" Storyboard.TargetName="FocusVisualBlack" Storyboard.TargetProperty="Opacity"/>
+ </Storyboard>
+ </VisualState>
+ <VisualState x:Name="Unfocused"/>
+ </VisualStateGroup>
+ <VisualStateGroup x:Name="CheckStates">
+ <VisualState x:Name="Checked"/>
+ <VisualState x:Name="Unchecked">
+ <Storyboard>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Text" Storyboard.TargetProperty="Foreground">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ApplicationSecondaryForegroundThemeBrush}"/>
+ </ObjectAnimationUsingKeyFrames>
+ </Storyboard>
+ </VisualState>
+ <VisualState x:Name="Indeterminate"/>
+ </VisualStateGroup>
+ </VisualStateManager.VisualStateGroups>
+ </Grid>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+ <!--
+ AppBarButtonStyle is used to style a Button for use in an App Bar. Content will be centered and should fit within
+ the 40-pixel radius glyph provided. 16-point Segoe UI Symbol is used for content text to simplify the use of glyphs
+ from that font. AutomationProperties.Name is used for the text below the glyph.
+ -->
+ <Style x:Key="AppBarButtonStyle" TargetType="Button">
+ <Setter Property="Foreground" Value="{StaticResource AppBarItemForegroundThemeBrush}"/>
+ <Setter Property="VerticalAlignment" Value="Stretch"/>
+ <Setter Property="FontFamily" Value="Segoe UI Symbol"/>
+ <Setter Property="FontWeight" Value="Normal"/>
+ <Setter Property="FontSize" Value="20"/>
+ <Setter Property="AutomationProperties.ItemType" Value="App Bar Button"/>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="Button">
+ <Grid x:Name="RootGrid" Width="100" Background="Transparent">
+ <StackPanel VerticalAlignment="Top" Margin="0,12,0,11">
+ <Grid Width="40" Height="40" Margin="0,0,0,5" HorizontalAlignment="Center">
+ <TextBlock x:Name="BackgroundGlyph" Text="" FontFamily="Segoe UI Symbol" FontSize="53.333" Margin="-4,-19,0,0" Foreground="{StaticResource AppBarItemBackgroundThemeBrush}"/>
+ <TextBlock x:Name="OutlineGlyph" Text="" FontFamily="Segoe UI Symbol" FontSize="53.333" Margin="-4,-19,0,0"/>
+ <ContentPresenter x:Name="Content" HorizontalAlignment="Center" Margin="-1,-1,0,0" VerticalAlignment="Center"/>
+ </Grid>
+ <TextBlock
+ x:Name="TextLabel"
+ Text="{TemplateBinding AutomationProperties.Name}"
+ Foreground="{StaticResource AppBarItemForegroundThemeBrush}"
+ Margin="0,0,2,0"
+ FontSize="12"
+ TextAlignment="Center"
+ Width="88"
+ MaxHeight="32"
+ TextTrimming="WordEllipsis"
+ Style="{StaticResource BasicTextStyle}"/>
+ </StackPanel>
+ <Rectangle
+ x:Name="FocusVisualWhite"
+ IsHitTestVisible="False"
+ Stroke="{StaticResource FocusVisualWhiteStrokeThemeBrush}"
+ StrokeEndLineCap="Square"
+ StrokeDashArray="1,1"
+ Opacity="0"
+ StrokeDashOffset="1.5"/>
+ <Rectangle
+ x:Name="FocusVisualBlack"
+ IsHitTestVisible="False"
+ Stroke="{StaticResource FocusVisualBlackStrokeThemeBrush}"
+ StrokeEndLineCap="Square"
+ StrokeDashArray="1,1"
+ Opacity="0"
+ StrokeDashOffset="0.5"/>
+
+ <VisualStateManager.VisualStateGroups>
+ <VisualStateGroup x:Name="ApplicationViewStates">
+ <VisualState x:Name="FullScreenLandscape"/>
+ <VisualState x:Name="Filled"/>
+ <VisualState x:Name="FullScreenPortrait">
+ <Storyboard>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TextLabel" Storyboard.TargetProperty="Visibility">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
+ </ObjectAnimationUsingKeyFrames>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootGrid" Storyboard.TargetProperty="Width">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="60"/>
+ </ObjectAnimationUsingKeyFrames>
+ </Storyboard>
+ </VisualState>
+ <VisualState x:Name="Snapped">
+ <Storyboard>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TextLabel" Storyboard.TargetProperty="Visibility">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
+ </ObjectAnimationUsingKeyFrames>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootGrid" Storyboard.TargetProperty="Width">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="60"/>
+ </ObjectAnimationUsingKeyFrames>
+ </Storyboard>
+ </VisualState>
+ </VisualStateGroup>
+ <VisualStateGroup x:Name="CommonStates">
+ <VisualState x:Name="Normal"/>
+ <VisualState x:Name="PointerOver">
+ <Storyboard>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGlyph" Storyboard.TargetProperty="Foreground">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemPointerOverBackgroundThemeBrush}"/>
+ </ObjectAnimationUsingKeyFrames>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Foreground">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemPointerOverForegroundThemeBrush}"/>
+ </ObjectAnimationUsingKeyFrames>
+ </Storyboard>
+ </VisualState>
+ <VisualState x:Name="Pressed">
+ <Storyboard>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OutlineGlyph" Storyboard.TargetProperty="Foreground">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemForegroundThemeBrush}"/>
+ </ObjectAnimationUsingKeyFrames>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGlyph" Storyboard.TargetProperty="Foreground">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemForegroundThemeBrush}"/>
+ </ObjectAnimationUsingKeyFrames>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Foreground">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemPressedForegroundThemeBrush}"/>
+ </ObjectAnimationUsingKeyFrames>
+ </Storyboard>
+ </VisualState>
+ <VisualState x:Name="Disabled">
+ <Storyboard>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OutlineGlyph" Storyboard.TargetProperty="Foreground">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemDisabledForegroundThemeBrush}"/>
+ </ObjectAnimationUsingKeyFrames>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Foreground">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemDisabledForegroundThemeBrush}"/>
+ </ObjectAnimationUsingKeyFrames>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TextLabel" Storyboard.TargetProperty="Foreground">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemDisabledForegroundThemeBrush}"/>
+ </ObjectAnimationUsingKeyFrames>
+ </Storyboard>
+ </VisualState>
+ </VisualStateGroup>
+ <VisualStateGroup x:Name="FocusStates">
+ <VisualState x:Name="Focused">
+ <Storyboard>
+ <DoubleAnimation
+ Storyboard.TargetName="FocusVisualWhite"
+ Storyboard.TargetProperty="Opacity"
+ To="1"
+ Duration="0"/>
+ <DoubleAnimation
+ Storyboard.TargetName="FocusVisualBlack"
+ Storyboard.TargetProperty="Opacity"
+ To="1"
+ Duration="0"/>
+ </Storyboard>
+ </VisualState>
+ <VisualState x:Name="Unfocused" />
+ <VisualState x:Name="PointerFocused" />
+ </VisualStateGroup>
+ </VisualStateManager.VisualStateGroups>
+ </Grid>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+ <!-- Standard App Bar buttons -->
+
+ <Style x:Key="SkipBackAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="SkipBackAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Skip Back"/>
+ <Setter Property="Content" Value=""/>
+ </Style>
+ <Style x:Key="SkipAheadAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="SkipAheadAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Skip Ahead"/>
+ <Setter Property="Content" Value=""/>
+ </Style>
+ <Style x:Key="PlayAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="PlayAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Play"/>
+ <Setter Property="Content" Value=""/>
+ </Style>
+ <Style x:Key="PauseAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="PauseAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Pause"/>
+ <Setter Property="Content" Value=""/>
+ </Style>
+ <Style x:Key="EditAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="EditAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Edit"/>
+ <Setter Property="Content" Value=""/>
+ </Style>
+ <Style x:Key="SaveAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="SaveAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Save"/>
+ <Setter Property="Content" Value=""/>
+ </Style>
+ <Style x:Key="DeleteAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="DeleteAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Delete"/>
+ <Setter Property="Content" Value=""/>
+ </Style>
+ <Style x:Key="DiscardAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="DiscardAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Discard"/>
+ <Setter Property="Content" Value=""/>
+ </Style>
+ <Style x:Key="RemoveAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="RemoveAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Remove"/>
+ <Setter Property="Content" Value=""/>
+ </Style>
+ <Style x:Key="AddAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="AddAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Add"/>
+ <Setter Property="Content" Value=""/>
+ </Style>
+ <Style x:Key="NoAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="NoAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="No"/>
+ <Setter Property="Content" Value=""/>
+ </Style>
+ <Style x:Key="YesAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="YesAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Yes"/>
+ <Setter Property="Content" Value=""/>
+ </Style>
+ <Style x:Key="MoreAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="MoreAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="More"/>
+ <Setter Property="Content" Value=""/>
+ </Style>
+ <Style x:Key="RedoAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="RedoAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Redo"/>
+ <Setter Property="Content" Value=""/>
+ </Style>
+ <Style x:Key="UndoAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="UndoAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Undo"/>
+ <Setter Property="Content" Value=""/>
+ </Style>
+ <Style x:Key="HomeAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="HomeAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Home"/>
+ <Setter Property="Content" Value=""/>
+ </Style>
+ <Style x:Key="OutAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="OutAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Out"/>
+ <Setter Property="Content" Value=""/>
+ </Style>
+ <Style x:Key="NextAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="NextAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Next"/>
+ <Setter Property="Content" Value=""/>
+ </Style>
+ <Style x:Key="PreviousAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="PreviousAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Previous"/>
+ <Setter Property="Content" Value=""/>
+ </Style>
+ <Style x:Key="FavoriteAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="FavoriteAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Favorite"/>
+ <Setter Property="Content" Value=""/>
+ </Style>
+ <Style x:Key="PhotoAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="PhotoAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Photo"/>
+ <Setter Property="Content" Value=""/>
+ </Style>
+ <Style x:Key="SettingsAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="SettingsAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Settings"/>
+ <Setter Property="Content" Value=""/>
+ </Style>
+ <Style x:Key="VideoAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="VideoAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Video"/>
+ <Setter Property="Content" Value=""/>
+ </Style>
+ <Style x:Key="RefreshAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="RefreshAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Refresh"/>
+ <Setter Property="Content" Value=""/>
+ </Style>
+ <Style x:Key="DownloadAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="DownloadAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Download"/>
+ <Setter Property="Content" Value=""/>
+ </Style>
+ <Style x:Key="MailAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="MailAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Mail"/>
+ <Setter Property="Content" Value=""/>
+ </Style>
+ <Style x:Key="SearchAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="SearchAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Search"/>
+ <Setter Property="Content" Value=""/>
+ </Style>
+ <Style x:Key="HelpAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="HelpAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Help"/>
+ <Setter Property="Content" Value=""/>
+ </Style>
+ <Style x:Key="UploadAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="UploadAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Upload"/>
+ <Setter Property="Content" Value=""/>
+ </Style>
+ <Style x:Key="PinAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="PinAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Pin"/>
+ <Setter Property="Content" Value=""/>
+ </Style>
+ <Style x:Key="UnpinAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="UnpinAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Unpin"/>
+ <Setter Property="Content" Value=""/>
+ </Style>
+
+ <!-- Title area styles -->
+
+ <Style x:Key="PageHeaderTextStyle" TargetType="TextBlock" BasedOn="{StaticResource HeaderTextStyle}">
+ <Setter Property="TextWrapping" Value="NoWrap"/>
+ <Setter Property="VerticalAlignment" Value="Bottom"/>
+ <Setter Property="Margin" Value="0,0,30,40"/>
+ </Style>
+
+ <Style x:Key="PageSubheaderTextStyle" TargetType="TextBlock" BasedOn="{StaticResource SubheaderTextStyle}">
+ <Setter Property="TextWrapping" Value="NoWrap"/>
+ <Setter Property="VerticalAlignment" Value="Bottom"/>
+ <Setter Property="Margin" Value="0,0,0,40"/>
+ </Style>
+
+ <Style x:Key="SnappedPageHeaderTextStyle" TargetType="TextBlock" BasedOn="{StaticResource PageSubheaderTextStyle}">
+ <Setter Property="Margin" Value="0,0,18,40"/>
+ </Style>
+
+ <!--
+ BackButtonStyle is used to style a Button for use in the title area of a page. Margins appropriate for
+ the conventional page layout are included as part of the style.
+ -->
+ <Style x:Key="BackButtonStyle" TargetType="Button">
+ <Setter Property="MinWidth" Value="0"/>
+ <Setter Property="Width" Value="48"/>
+ <Setter Property="Height" Value="48"/>
+ <Setter Property="Margin" Value="36,0,36,36"/>
+ <Setter Property="VerticalAlignment" Value="Bottom"/>
+ <Setter Property="FontFamily" Value="Segoe UI Symbol"/>
+ <Setter Property="FontWeight" Value="Normal"/>
+ <Setter Property="FontSize" Value="56"/>
+ <Setter Property="AutomationProperties.AutomationId" Value="BackButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Back"/>
+ <Setter Property="AutomationProperties.ItemType" Value="Navigation Button"/>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="Button">
+ <Grid x:Name="RootGrid">
+ <Grid Margin="-1,-16,0,0">
+ <TextBlock x:Name="BackgroundGlyph" Text="" Foreground="{StaticResource BackButtonBackgroundThemeBrush}"/>
+ <TextBlock x:Name="NormalGlyph" Text="{StaticResource BackButtonGlyph}" Foreground="{StaticResource BackButtonForegroundThemeBrush}"/>
+ <TextBlock x:Name="ArrowGlyph" Text="" Foreground="{StaticResource BackButtonPressedForegroundThemeBrush}" Opacity="0"/>
+ </Grid>
+ <Rectangle
+ x:Name="FocusVisualWhite"
+ IsHitTestVisible="False"
+ Stroke="{StaticResource FocusVisualWhiteStrokeThemeBrush}"
+ StrokeEndLineCap="Square"
+ StrokeDashArray="1,1"
+ Opacity="0"
+ StrokeDashOffset="1.5"/>
+ <Rectangle
+ x:Name="FocusVisualBlack"
+ IsHitTestVisible="False"
+ Stroke="{StaticResource FocusVisualBlackStrokeThemeBrush}"
+ StrokeEndLineCap="Square"
+ StrokeDashArray="1,1"
+ Opacity="0"
+ StrokeDashOffset="0.5"/>
+
+ <VisualStateManager.VisualStateGroups>
+ <VisualStateGroup x:Name="CommonStates">
+ <VisualState x:Name="Normal" />
+ <VisualState x:Name="PointerOver">
+ <Storyboard>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGlyph" Storyboard.TargetProperty="Foreground">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource BackButtonPointerOverBackgroundThemeBrush}"/>
+ </ObjectAnimationUsingKeyFrames>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalGlyph" Storyboard.TargetProperty="Foreground">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource BackButtonPointerOverForegroundThemeBrush}"/>
+ </ObjectAnimationUsingKeyFrames>
+ </Storyboard>
+ </VisualState>
+ <VisualState x:Name="Pressed">
+ <Storyboard>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGlyph" Storyboard.TargetProperty="Foreground">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource BackButtonForegroundThemeBrush}"/>
+ </ObjectAnimationUsingKeyFrames>
+ <DoubleAnimation
+ Storyboard.TargetName="ArrowGlyph"
+ Storyboard.TargetProperty="Opacity"
+ To="1"
+ Duration="0"/>
+ <DoubleAnimation
+ Storyboard.TargetName="NormalGlyph"
+ Storyboard.TargetProperty="Opacity"
+ To="0"
+ Duration="0"/>
+ </Storyboard>
+ </VisualState>
+ <VisualState x:Name="Disabled">
+ <Storyboard>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootGrid" Storyboard.TargetProperty="Visibility">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
+ </ObjectAnimationUsingKeyFrames>
+ </Storyboard>
+ </VisualState>
+ </VisualStateGroup>
+ <VisualStateGroup x:Name="FocusStates">
+ <VisualState x:Name="Focused">
+ <Storyboard>
+ <DoubleAnimation
+ Storyboard.TargetName="FocusVisualWhite"
+ Storyboard.TargetProperty="Opacity"
+ To="1"
+ Duration="0"/>
+ <DoubleAnimation
+ Storyboard.TargetName="FocusVisualBlack"
+ Storyboard.TargetProperty="Opacity"
+ To="1"
+ Duration="0"/>
+ </Storyboard>
+ </VisualState>
+ <VisualState x:Name="Unfocused" />
+ <VisualState x:Name="PointerFocused" />
+ </VisualStateGroup>
+ </VisualStateManager.VisualStateGroups>
+ </Grid>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+ <!--
+ PortraitBackButtonStyle is used to style a Button for use in the title area of a portrait page. Margins appropriate
+ for the conventional page layout are included as part of the style.
+ -->
+ <Style x:Key="PortraitBackButtonStyle" TargetType="Button" BasedOn="{StaticResource BackButtonStyle}">
+ <Setter Property="Margin" Value="26,0,26,36"/>
+ </Style>
+
+ <!--
+ SnappedBackButtonStyle is used to style a Button for use in the title area of a snapped page. Margins appropriate
+ for the conventional page layout are included as part of the style.
+
+ The obvious duplication here is necessary as the glyphs used in snapped are not merely smaller versions of the same
+ glyph but are actually distinct.
+ -->
+ <Style x:Key="SnappedBackButtonStyle" TargetType="Button">
+ <Setter Property="MinWidth" Value="0"/>
+ <Setter Property="Margin" Value="20,0,0,0"/>
+ <Setter Property="VerticalAlignment" Value="Bottom"/>
+ <Setter Property="FontFamily" Value="Segoe UI Symbol"/>
+ <Setter Property="FontWeight" Value="Normal"/>
+ <Setter Property="FontSize" Value="26.66667"/>
+ <Setter Property="AutomationProperties.AutomationId" Value="BackButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Back"/>
+ <Setter Property="AutomationProperties.ItemType" Value="Navigation Button"/>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="Button">
+ <Grid x:Name="RootGrid" Width="36" Height="36" Margin="-3,0,7,33">
+ <Grid Margin="-1,-1,0,0">
+ <TextBlock x:Name="BackgroundGlyph" Text="" Foreground="{StaticResource BackButtonBackgroundThemeBrush}"/>
+ <TextBlock x:Name="NormalGlyph" Text="{StaticResource BackButtonSnappedGlyph}" Foreground="{StaticResource BackButtonForegroundThemeBrush}"/>
+ <TextBlock x:Name="ArrowGlyph" Text="" Foreground="{StaticResource BackButtonPressedForegroundThemeBrush}" Opacity="0"/>
+ </Grid>
+ <Rectangle
+ x:Name="FocusVisualWhite"
+ IsHitTestVisible="False"
+ Stroke="{StaticResource FocusVisualWhiteStrokeThemeBrush}"
+ StrokeEndLineCap="Square"
+ StrokeDashArray="1,1"
+ Opacity="0"
+ StrokeDashOffset="1.5"/>
+ <Rectangle
+ x:Name="FocusVisualBlack"
+ IsHitTestVisible="False"
+ Stroke="{StaticResource FocusVisualBlackStrokeThemeBrush}"
+ StrokeEndLineCap="Square"
+ StrokeDashArray="1,1"
+ Opacity="0"
+ StrokeDashOffset="0.5"/>
+
+ <VisualStateManager.VisualStateGroups>
+ <VisualStateGroup x:Name="CommonStates">
+ <VisualState x:Name="Normal" />
+ <VisualState x:Name="PointerOver">
+ <Storyboard>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGlyph" Storyboard.TargetProperty="Foreground">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource BackButtonPointerOverBackgroundThemeBrush}"/>
+ </ObjectAnimationUsingKeyFrames>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalGlyph" Storyboard.TargetProperty="Foreground">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource BackButtonPointerOverForegroundThemeBrush}"/>
+ </ObjectAnimationUsingKeyFrames>
+ </Storyboard>
+ </VisualState>
+ <VisualState x:Name="Pressed">
+ <Storyboard>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGlyph" Storyboard.TargetProperty="Foreground">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource BackButtonForegroundThemeBrush}"/>
+ </ObjectAnimationUsingKeyFrames>
+ <DoubleAnimation
+ Storyboard.TargetName="ArrowGlyph"
+ Storyboard.TargetProperty="Opacity"
+ To="1"
+ Duration="0"/>
+ <DoubleAnimation
+ Storyboard.TargetName="NormalGlyph"
+ Storyboard.TargetProperty="Opacity"
+ To="0"
+ Duration="0"/>
+ </Storyboard>
+ </VisualState>
+ <VisualState x:Name="Disabled">
+ <Storyboard>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootGrid" Storyboard.TargetProperty="Visibility">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
+ </ObjectAnimationUsingKeyFrames>
+ </Storyboard>
+ </VisualState>
+ </VisualStateGroup>
+ <VisualStateGroup x:Name="FocusStates">
+ <VisualState x:Name="Focused">
+ <Storyboard>
+ <DoubleAnimation
+ Storyboard.TargetName="FocusVisualWhite"
+ Storyboard.TargetProperty="Opacity"
+ To="1"
+ Duration="0"/>
+ <DoubleAnimation
+ Storyboard.TargetName="FocusVisualBlack"
+ Storyboard.TargetProperty="Opacity"
+ To="1"
+ Duration="0"/>
+ </Storyboard>
+ </VisualState>
+ <VisualState x:Name="Unfocused" />
+ <VisualState x:Name="PointerFocused" />
+ </VisualStateGroup>
+ </VisualStateManager.VisualStateGroups>
+ </Grid>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+ <!-- Item templates -->
+
+ <!-- Grid-appropriate 250 pixel square item template as seen in the GroupedItemsPage and ItemsPage -->
+ <DataTemplate x:Key="Standard250x250ItemTemplate">
+ <Grid HorizontalAlignment="Left" Width="250" Height="250">
+ <Border Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}">
+ <Image Source="{Binding Image}" Stretch="UniformToFill"/>
+ </Border>
+ <StackPanel VerticalAlignment="Bottom" Background="{StaticResource ListViewItemOverlayBackgroundThemeBrush}">
+ <TextBlock Text="{Binding Title}" Foreground="{StaticResource ListViewItemOverlayForegroundThemeBrush}" Style="{StaticResource TitleTextStyle}" Height="60" Margin="15,0,15,0"/>
+ <TextBlock Text="{Binding Subtitle}" Foreground="{StaticResource ListViewItemOverlaySecondaryForegroundThemeBrush}" Style="{StaticResource CaptionTextStyle}" TextWrapping="NoWrap" Margin="15,0,15,10"/>
+ </StackPanel>
+ </Grid>
+ </DataTemplate>
+
+ <!-- Grid-appropriate 500 by 130 pixel item template as seen in the GroupDetailPage -->
+ <DataTemplate x:Key="Standard500x130ItemTemplate">
+ <Grid Height="110" Width="480" Margin="10">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto"/>
+ <ColumnDefinition Width="*"/>
+ </Grid.ColumnDefinitions>
+ <Border Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}" Width="110" Height="110">
+ <Image Source="{Binding Image}" Stretch="UniformToFill"/>
+ </Border>
+ <StackPanel Grid.Column="1" VerticalAlignment="Top" Margin="10,0,0,0">
+ <TextBlock Text="{Binding Title}" Style="{StaticResource TitleTextStyle}" TextWrapping="NoWrap"/>
+ <TextBlock Text="{Binding Subtitle}" Style="{StaticResource CaptionTextStyle}" TextWrapping="NoWrap"/>
+ <TextBlock Text="{Binding Description}" Style="{StaticResource BodyTextStyle}" MaxHeight="60"/>
+ </StackPanel>
+ </Grid>
+ </DataTemplate>
+
+ <!-- List-appropriate 130 pixel high item template as seen in the SplitPage -->
+ <DataTemplate x:Key="Standard130ItemTemplate">
+ <Grid Height="110" Margin="6">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto"/>
+ <ColumnDefinition Width="*"/>
+ </Grid.ColumnDefinitions>
+ <Border Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}" Width="110" Height="110">
+ <Image Source="{Binding Image}" Stretch="UniformToFill"/>
+ </Border>
+ <StackPanel Grid.Column="1" VerticalAlignment="Top" Margin="10,0,0,0">
+ <TextBlock Text="{Binding Title}" Style="{StaticResource TitleTextStyle}" TextWrapping="NoWrap"/>
+ <TextBlock Text="{Binding Subtitle}" Style="{StaticResource CaptionTextStyle}" TextWrapping="NoWrap"/>
+ <TextBlock Text="{Binding Description}" Style="{StaticResource BodyTextStyle}" MaxHeight="60"/>
+ </StackPanel>
+ </Grid>
+ </DataTemplate>
+
+ <!--
+ List-appropriate 80 pixel high item template as seen in the SplitPage when Filled, and
+ the following pages when snapped: GroupedItemsPage, GroupDetailPage, and ItemsPage
+ -->
+ <DataTemplate x:Key="Standard80ItemTemplate">
+ <Grid Margin="6">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto"/>
+ <ColumnDefinition Width="*"/>
+ </Grid.ColumnDefinitions>
+ <Border Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}" Width="60" Height="60">
+ <Image Source="{Binding Image}" Stretch="UniformToFill"/>
+ </Border>
+ <StackPanel Grid.Column="1" Margin="10,0,0,0">
+ <TextBlock Text="{Binding Title}" Style="{StaticResource ItemTextStyle}" MaxHeight="40"/>
+ <TextBlock Text="{Binding Subtitle}" Style="{StaticResource CaptionTextStyle}" TextWrapping="NoWrap"/>
+ </StackPanel>
+ </Grid>
+ </DataTemplate>
+
+ <!-- Grid-appropriate 300 by 70 pixel item template as seen in the SearchResultsPage -->
+ <DataTemplate x:Key="StandardSmallIcon300x70ItemTemplate">
+ <Grid Width="294" Margin="6">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto"/>
+ <ColumnDefinition Width="*"/>
+ </Grid.ColumnDefinitions>
+ <Border Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}" Margin="0,0,0,10" Width="40" Height="40">
+ <Image Source="{Binding Image}" Stretch="UniformToFill"/>
+ </Border>
+ <StackPanel Grid.Column="1" Margin="10,-10,0,0">
+ <TextBlock Text="{Binding Title}" Style="{StaticResource BodyTextStyle}" TextWrapping="NoWrap"/>
+ <TextBlock Text="{Binding Subtitle}" Style="{StaticResource BodyTextStyle}" Foreground="{StaticResource ApplicationSecondaryForegroundThemeBrush}" TextWrapping="NoWrap"/>
+ <TextBlock Text="{Binding Description}" Style="{StaticResource BodyTextStyle}" Foreground="{StaticResource ApplicationSecondaryForegroundThemeBrush}" TextWrapping="NoWrap"/>
+ </StackPanel>
+ </Grid>
+ </DataTemplate>
+
+ <!-- List-appropriate 70 pixel high item template as seen in the SearchResultsPage when Snapped -->
+ <DataTemplate x:Key="StandardSmallIcon70ItemTemplate">
+ <Grid Margin="6">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto"/>
+ <ColumnDefinition Width="*"/>
+ </Grid.ColumnDefinitions>
+ <Border Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}" Margin="0,0,0,10" Width="40" Height="40">
+ <Image Source="{Binding Image}" Stretch="UniformToFill"/>
+ </Border>
+ <StackPanel Grid.Column="1" Margin="10,-10,0,0">
+ <TextBlock Text="{Binding Title}" Style="{StaticResource BodyTextStyle}" TextWrapping="NoWrap"/>
+ <TextBlock Text="{Binding Subtitle}" Style="{StaticResource BodyTextStyle}" Foreground="{StaticResource ApplicationSecondaryForegroundThemeBrush}" TextWrapping="NoWrap"/>
+ <TextBlock Text="{Binding Description}" Style="{StaticResource BodyTextStyle}" Foreground="{StaticResource ApplicationSecondaryForegroundThemeBrush}" TextWrapping="NoWrap"/>
+ </StackPanel>
+ </Grid>
+ </DataTemplate>
+
+ <!--
+ 190x130 pixel item template for displaying file previews as seen in the FileOpenPickerPage
+ Includes an elaborate tooltip to display title and description text
+ -->
+ <DataTemplate x:Key="StandardFileWithTooltip190x130ItemTemplate">
+ <Grid>
+ <Grid Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}">
+ <Image
+ Source="{Binding Image}"
+ Width="190"
+ Height="130"
+ HorizontalAlignment="Center"
+ VerticalAlignment="Center"
+ Stretch="Uniform"/>
+ </Grid>
+ <ToolTipService.Placement>Mouse</ToolTipService.Placement>
+ <ToolTipService.ToolTip>
+ <ToolTip>
+ <ToolTip.Style>
+ <Style TargetType="ToolTip">
+ <Setter Property="BorderBrush" Value="{StaticResource ToolTipBackgroundThemeBrush}" />
+ <Setter Property="Padding" Value="0" />
+ </Style>
+ </ToolTip.Style>
+
+ <Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto"/>
+ <ColumnDefinition Width="*"/>
+ </Grid.ColumnDefinitions>
+
+ <Grid Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}" Margin="20">
+ <Image
+ Source="{Binding Image}"
+ Width="160"
+ Height="160"
+ HorizontalAlignment="Center"
+ VerticalAlignment="Center"
+ Stretch="Uniform"/>
+ </Grid>
+ <StackPanel Width="200" Grid.Column="1" Margin="0,20,20,20">
+ <TextBlock Text="{Binding Title}" TextWrapping="NoWrap" Style="{StaticResource BodyTextStyle}"/>
+ <TextBlock Text="{Binding Description}" MaxHeight="140" Foreground="{StaticResource ApplicationSecondaryForegroundThemeBrush}" Style="{StaticResource BodyTextStyle}"/>
+ </StackPanel>
+ </Grid>
+ </ToolTip>
+ </ToolTipService.ToolTip>
+ </Grid>
+ </DataTemplate>
+
+ <!-- ScrollViewer styles -->
+
+ <Style x:Key="HorizontalScrollViewerStyle" TargetType="ScrollViewer">
+ <Setter Property="HorizontalScrollBarVisibility" Value="Auto"/>
+ <Setter Property="VerticalScrollBarVisibility" Value="Disabled"/>
+ <Setter Property="ScrollViewer.HorizontalScrollMode" Value="Enabled" />
+ <Setter Property="ScrollViewer.VerticalScrollMode" Value="Disabled" />
+ <Setter Property="ScrollViewer.ZoomMode" Value="Disabled" />
+ </Style>
+
+ <Style x:Key="VerticalScrollViewerStyle" TargetType="ScrollViewer">
+ <Setter Property="HorizontalScrollBarVisibility" Value="Disabled"/>
+ <Setter Property="VerticalScrollBarVisibility" Value="Auto"/>
+ <Setter Property="ScrollViewer.HorizontalScrollMode" Value="Disabled" />
+ <Setter Property="ScrollViewer.VerticalScrollMode" Value="Enabled" />
+ <Setter Property="ScrollViewer.ZoomMode" Value="Disabled" />
+ </Style>
+
+ <!-- Page layout roots typically use entrance animations and a theme-appropriate background color -->
+
+ <Style x:Key="LayoutRootStyle" TargetType="Panel">
+ <Setter Property="Background" Value="{StaticResource ApplicationPageBackgroundThemeBrush}"/>
+ <Setter Property="ChildrenTransitions">
+ <Setter.Value>
+ <TransitionCollection>
+ <EntranceThemeTransition/>
+ </TransitionCollection>
+ </Setter.Value>
+ </Setter>
+ </Style>
+</ResourceDictionary>
diff --git a/cpp/test/WinRT/TestSuite/MainPage.xaml b/cpp/test/WinRT/TestSuite/MainPage.xaml new file mode 100644 index 00000000000..7410acff541 --- /dev/null +++ b/cpp/test/WinRT/TestSuite/MainPage.xaml @@ -0,0 +1,77 @@ +<Page
+ x:Class="TestSuite.MainPage"
+ IsTabStop="false"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:local="using:TestSuite"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ mc:Ignorable="d">
+
+ <Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto"/>
+ <RowDefinition Height="*"/>
+ <RowDefinition Height="Auto"/>
+ </Grid.RowDefinitions>
+
+ <!-- Header -->
+ <StackPanel Grid.Row="0">
+ <TextBlock Text="ZeroC - Ice Test Suite" Style="{StaticResource TitleStyle}"
+ Margin="5, 5, 5, 5"
+ VerticalAlignment="Bottom" TextWrapping="Wrap"/>
+ </StackPanel>
+
+ <!-- Content -->
+ <Grid Grid.Row="1">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="*"/>
+ </Grid.RowDefinitions>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto"/>
+ <ColumnDefinition Width="*"/>
+ </Grid.ColumnDefinitions>
+ <StackPanel Grid.Row="0" Grid.Column="0" Orientation="Horizontal">
+ <ListBox x:Name="TestList" HorizontalAlignment="Left"
+ Padding="5, 5, 15, 5">
+ </ListBox>
+ </StackPanel>
+ <Grid Grid.Row="0" Grid.Column="1">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto"/>
+ <RowDefinition Height="*"/>
+ <RowDefinition Height="Auto"/>
+ </Grid.RowDefinitions>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="*"/>
+ </Grid.ColumnDefinitions>
+ <TextBlock Grid.Row="0" Grid.Column="0"
+ Style="{StaticResource H1Style}"
+ Text="Output" Margin="5, 5, 5, 5"/>
+ <Border Grid.Row="1" Grid.Column="0" BorderThickness="2" BorderBrush="Gray" Background="Gray">
+ <ScrollViewer x:Name="Scroller" VerticalScrollBarVisibility="Auto"
+ HorizontalScrollBarVisibility="Disabled"
+ Width="Auto" Height="Auto"
+ ZoomMode="Disabled">
+ <TextBlock x:Name="Output" Style="{StaticResource OutputStyle}"
+ Padding="5, 5, 5, 5" TextWrapping="Wrap"/>
+ </ScrollViewer>
+ </Border>
+ <Border Grid.Row="2" Padding="5, 5, 5, 5">
+ <StackPanel Orientation="Horizontal">
+ <Button x:Name="btnRun" Content="Run" Click="btnRun_Click"/>
+ <CheckBox x:Name="chkLoop" Content="Run In A Loop" Margin="10, 0, 0, 0"/>
+ <CheckBox x:Name="chkSerialize" Content="Enable Serialize Mode" Margin="10, 0, 0, 0"/>
+ <CheckBox x:Name="chkIPv6" Content="Use IPv6" Margin="10, 0, 0, 0"/>
+ <CheckBox x:Name="chkSSL" Content="Enable SSL" Margin="10, 0, 0, 0"/>
+ </StackPanel>
+ </Border>
+ </Grid>
+ </Grid>
+ <!-- Footer -->
+ <StackPanel Grid.Row="2" VerticalAlignment="Bottom">
+ <TextBlock Margin="5, 5, 5, 5" Style="{StaticResource FooterStyle}"
+ Text="© 2012 ZeroC. All rights reserved." TextWrapping="Wrap"/>
+ </StackPanel>
+ </Grid>
+</Page>
diff --git a/cpp/test/WinRT/TestSuite/MainPage.xaml.cpp b/cpp/test/WinRT/TestSuite/MainPage.xaml.cpp new file mode 100644 index 00000000000..a572f49a96f --- /dev/null +++ b/cpp/test/WinRT/TestSuite/MainPage.xaml.cpp @@ -0,0 +1,510 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2012 ZeroC, Inc. All rights reserved. +// +// This copy of Ice is licensed to you under the terms described in the +// ICE_LICENSE file included in this distribution. +// +// ********************************************************************** + +#include "MainPage.xaml.h" +#include <IceUtil/StringUtil.h> +#include <TestCommon.h> +#include <string> +#include <iostream> +#include <Ice/Ice.h> +using namespace std; +using namespace TestSuite; + +using namespace Platform; +using namespace Windows::Foundation; +using namespace Windows::Foundation::Collections; +using namespace Windows::UI::Core; +using namespace Windows::UI::Xaml; +using namespace Windows::UI::Xaml::Controls; +using namespace Windows::UI::Xaml::Controls::Primitives; +using namespace Windows::UI::Xaml::Data; +using namespace Windows::UI::Xaml::Input; +using namespace Windows::UI::Xaml::Media; +using namespace Windows::UI::Xaml::Navigation; + +using namespace Platform::Collections; + +TextBlock^ output = nullptr; +ScrollViewer^ scroller = nullptr; +MainPage^ page = nullptr; + +namespace +{ + +void +printToConsoleOutput(const std::string& message) +{ + assert(output != nullptr); + String^ msg = ref new String(IceUtil::stringToWstring(message).c_str()); + output->Dispatcher->RunAsync(CoreDispatcherPriority::Normal, + ref new DispatchedHandler( + [msg] () + { + output->Text += msg; + output->UpdateLayout(); + scroller->ScrollToVerticalOffset(scroller->ScrollableHeight); + }, CallbackContext::Any)); +} + +void +printLineToConsoleOutput(const std::string& msg) +{ + printToConsoleOutput(msg + '\n'); +} + +typedef int (*MAIN_ENTRY_POINT)(int, char**, Test::MainHelper*); + +typedef int (*SHUTDOWN_ENTRY_POINT)(); + +enum TestConfigType { TestConfigTypeClient, TestConfigTypeServer, TestConfigTypeColloc }; + +struct TestConfig +{ + TestConfigType type; + bool ssl; + bool serialize; + bool ipv6; +}; + +class Runnable : public IceUtil::Thread, public Test::MainHelper +{ +public: + + Runnable(const string& test, const TestConfig& config) : + _test(test), + _config(config), + _started(false), + _completed(false), + _status(0) + { + } + + virtual ~Runnable() + { + if(_hnd != 0) + { + FreeLibrary(_hnd); + } + } + + virtual void + run() + { + _hnd = LoadPackagedLibrary(IceUtil::stringToWstring(_test).c_str(), 0); + if(_hnd == 0) + { + printLineToConsoleOutput("failed to load `" + _test + "': " + IceUtilInternal::lastErrorToString()); + completed(-1); + return; + } + + _dllTestShutdown = GetProcAddress(_hnd, "dllTestShutdown"); + if(_dllTestShutdown == 0) + { + printLineToConsoleOutput("failed to find dllTestShutdown function from `" + _test + "'"); + completed(-1); + return; + } + + FARPROC dllMain = GetProcAddress(_hnd, "dllMain"); + if(dllMain == 0) + { + printLineToConsoleOutput("failed to find dllMain function from `" + _test + "'"); + completed(-1); + return; + } + + vector<string> args; + args.push_back("--Ice.Default.Host=127.0.0.1"); + args.push_back("--Ice.NullHandleAbort=1"); + args.push_back("--Ice.Warn.Connections=1"); + //args.push_back("--Ice.Trace.Network=2"); + //args.push_back("--Ice.Trace.Protocol=2"); + args.push_back("--Ice.ProgramName=" + _test); + if(_config.serialize) + { + args.push_back("--Ice.ThreadPool.Server.Serialize=1"); + } + + if(_config.ipv6) + { + args.push_back("--Ice.Default.Host=0:0:0:0:0:0:0:1"); + args.push_back("--Ice.IPv6=1"); + } + + if(_config.type != TestConfigTypeClient) + { + args.push_back("--Ice.ThreadPool.Server.Size=1"); + args.push_back("--Ice.ThreadPool.Server.SizeMax=3"); + args.push_back("--Ice.ThreadPool.Server.SizeWarn=0"); + } + + if(_config.ssl) + { + args.push_back("--Ice.Default.Protocol=ssl"); + } + + char** argv = new char*[args.size() + 1]; + for(unsigned int i = 0; i < args.size(); ++i) + { + argv[i] = const_cast<char*>(args[i].c_str()); + } + argv[args.size()] = 0; + int status = EXIT_FAILURE; + try + { + status = reinterpret_cast<MAIN_ENTRY_POINT>(dllMain)(static_cast<int>(args.size()), argv, this); + } + catch(const std::exception& ex) + { + print("unexpected exception while running `" + _test + "':\n" + ex.what()); + } + catch(...) + { + print("unexpected unknown exception while running `" + _test + "'"); + } + + completed(status); + delete[] argv; + } + + void + waitForStart() + { + IceUtil::Monitor<IceUtil::Mutex>::Lock lock(_monitor); + while(!_started && !_completed) + { + _monitor.wait(); + } + if(_completed && _status != 0) + { + ostringstream os; + os << "failed with status = " << _status; + throw os.str(); + } + } + + virtual void + waitForCompleted() + { + IceUtil::Monitor<IceUtil::Mutex>::Lock lock(_monitor); + while(!_completed) + { + _monitor.wait(); + } + if(_status != 0) + { + ostringstream os; + os << "failed with status = " << _status; + throw os.str(); + } + } + + // + // MainHelper implementation + // + + virtual void + serverReady() + { + IceUtil::Monitor<IceUtil::Mutex>::Lock lock(_monitor); + _started = true; + _monitor.notify(); + } + + virtual void + shutdown() + { + if(_dllTestShutdown) + { + reinterpret_cast<SHUTDOWN_ENTRY_POINT>(_dllTestShutdown)(); + } + } + + virtual bool + redirect() + { + return _config.type == TestConfigTypeClient || _config.type == TestConfigTypeColloc; + } + + virtual void + print(const string& message) + { + printToConsoleOutput(message); + } + + int + status() + { + IceUtil::Monitor<IceUtil::Mutex>::Lock lock(_monitor); + return _status; + } + +private: + + void + completed(int status) + { + IceUtil::Monitor<IceUtil::Mutex>::Lock lock(_monitor); + _completed = true; + _status = status; + _monitor.notify(); + } + + IceUtil::Monitor<IceUtil::Mutex> _monitor; + string _test; + TestConfig _config; + bool _started; + bool _completed; + int _status; + Ice::CommunicatorPtr _communicator; + FARPROC _dllTestShutdown; + HINSTANCE _hnd; +}; +typedef IceUtil::Handle<Runnable> RunnablePtr; + +struct TestCase +{ + string name; + string prefix; + const char* client; + const char* server; + const char* serverAMD; + const char* collocated; +}; + +} +static const TestCase allTest[] = +{ + {"Ice\\adapterDeactivation", "Ice_adapterDeactivation_", "client.dll", "server.dll", 0, "collocated.dll" }, + {"Ice\\ami", "Ice_ami_", "client.dll", "server.dll", 0, 0 }, + {"Ice\\binding", "Ice_binding_", "client.dll", "server.dll", 0, 0 }, +// {"Ice\\defaultValue", "Ice_defaultValue_", "client.dll", 0, 0, 0 }, + {"Ice\\dispatcher", "Ice_dispatcher_", "client.dll", "server.dll", 0, 0 }, + {"Ice\\exceptions", "Ice_exceptions_", "client.dll", "server.dll", "serveramd.dll", "collocated.dll" }, + {"Ice\\facets", "Ice_facets_", "client.dll", "server.dll", 0, "collocated.dll" }, + {"Ice\\hold", "Ice_hold_", "client.dll", "server.dll", 0, 0 }, + {"Ice\\info", "Ice_info_", "client.dll", "server.dll", 0, 0 }, + {"Ice\\inheritance", "Ice_inheritance_", "client.dll", "server.dll", 0, "collocated.dll" }, + {"Ice\\invoke", "Ice_invoke_", "client.dll", "server.dll", 0, 0 }, + {"Ice\\location", "Ice_location_", "client.dll", "server.dll", 0, 0 }, + {"Ice\\objects", "Ice_objects_", "client.dll", "server.dll", 0, "collocated.dll" }, + {"Ice\\operations", "Ice_operations_", "client.dll", "server.dll", "serveramd.dll", "collocated.dll" }, + {"Ice\\proxy", "Ice_proxy_", "client.dll", "server.dll", "serveramd.dll", "collocated.dll" }, + {"Ice\\retry", "Ice_retry_", "client.dll", "server.dll", 0, 0 }, + {"Ice\\stream", "Ice_stream_", "client.dll", 0, 0, 0}, + {"Ice\\timeout", "Ice_timeout_", "client.dll", "server.dll", 0, 0 }, + {"Ice\\udp", "Ice_udp_", "client.dll", "server.dll", 0, 0 } +}; + +class TestRunner : public IceUtil::Thread +{ +public: + + TestRunner(const TestCase& test, const TestConfig& config) : _test(test), _config(config) + { + } + + virtual void + run() + { + try + { + if(_test.server) + { + printLineToConsoleOutput("*** running test " + _test.name); + runClientServerTest(_test.server, _test.client); + printLineToConsoleOutput(""); + } + else + { + assert(_test.client); + printLineToConsoleOutput("**** running test " + _test.name); + runClientTest(_test.client, false); + printLineToConsoleOutput(""); + } + + if(_test.serverAMD) + { + printLineToConsoleOutput("*** running test with AMD server " + _test.name); + runClientServerTest(_test.server, _test.client); + printLineToConsoleOutput(""); + } + + if(_test.collocated) + { + printLineToConsoleOutput("*** running collocated test " + _test.name); + runClientTest(_test.collocated, true); + printLineToConsoleOutput(""); + } + + page->completed(); + } + catch(Platform::Exception^ ex) + { + page->failed(ex->Message); + } + catch(const std::exception& ex) + { + page->failed(ref new String(IceUtil::stringToWstring(ex.what()).c_str())); + } + catch(const string& ex) + { + page->failed(ref new String(IceUtil::stringToWstring(ex).c_str())); + } + catch(...) + { + page->failed("unknown exception"); + } + } + + void + runClientServerTest(const string& server, const string& client) + { + RunnablePtr serverRunable; + if(!_config.ssl) + { + TestConfig svrConfig = _config; + svrConfig.type = TestConfigTypeServer; + serverRunable = new Runnable(_test.prefix + server, svrConfig); + serverRunable->start(); + serverRunable->waitForStart(); + } + + TestConfig cltConfig = _config; + cltConfig.type = TestConfigTypeClient; + RunnablePtr clientRunable = new Runnable(_test.prefix + client, cltConfig); + clientRunable->start(); + + try + { + clientRunable->waitForCompleted(); + } + catch(...) + { + if(serverRunable) + { + serverRunable->shutdown(); + serverRunable->waitForCompleted(); + } + throw; + } + + if(serverRunable) + { + serverRunable->waitForCompleted(); + } + } + + void + runClientTest(const string& client, bool collocated) + { + TestConfig cltConfig = _config; + cltConfig.type = collocated ? TestConfigTypeColloc : TestConfigTypeClient; + RunnablePtr clientRunable = new Runnable(_test.prefix + client, cltConfig); + clientRunable->start(); + clientRunable->waitForCompleted(); + } + +private: + + TestCase _test; + TestConfig _config; +}; + +typedef IceUtil::Handle<TestRunner> TestRunnerPtr; + + +// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238 + +MainPage::MainPage() +{ + _names = ref new Vector<String^>(); + for(int i = 0; i < sizeof(allTest)/sizeof(allTest[0]); ++i) + { + _names->Append(ref new String(IceUtil::stringToWstring(allTest[i].name).c_str())); + } + InitializeComponent(); + page = this; + output = Output; + scroller = Scroller; + TestList->ItemsSource = _names; + TestList->SelectedIndex = 0; +} + +/// <summary> +/// Invoked when this page is about to be displayed in a Frame. +/// </summary> +/// <param name="e">Event data that describes how this page was reached. The Parameter +/// property is typically used to configure the page.</param> +void +MainPage::OnNavigatedTo(NavigationEventArgs^ e) +{ + (void) e; // Unused parameter +} + + +void +MainPage::failed(String^ msg) +{ + printLineToConsoleOutput("Test failed"); + printLineToConsoleOutput(IceUtil::wstringToString(msg->Data())); + completed(); +} + +void +MainPage::completed() +{ + page->Dispatcher->RunAsync( + CoreDispatcherPriority::Normal, + ref new DispatchedHandler([=] () + { + if(!chkLoop->IsChecked->Value) + { + TestList->IsEnabled = true; + btnRun->IsEnabled = true; + return; + } + TestList->IsEnabled = true; + if(TestList->SelectedIndex == (sizeof(allTest)/sizeof(allTest[0])) -1) + { + TestList->SelectedIndex = 0; + } + else + { + TestList->SelectedIndex++; + } + TestList->IsEnabled = false; + runSelectedTest(); + })); +} + +void +MainPage::btnRun_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e) +{ + if(TestList->SelectedIndex >= 0 && TestList->SelectedIndex < sizeof(allTest)/sizeof(allTest[0])) + { + TestList->IsEnabled = false; + btnRun->IsEnabled = false; + output->Text = ""; + runSelectedTest(); + } +} + +void +MainPage::runSelectedTest() +{ + TestConfig config; + config.ssl = chkSSL->IsChecked->Value; + config.serialize = chkSerialize->IsChecked->Value; + config.ipv6 = chkIPv6->IsChecked->Value; + + TestRunnerPtr t = new TestRunner(allTest[TestList->SelectedIndex], config); + t->start(); +} diff --git a/cpp/test/WinRT/TestSuite/MainPage.xaml.h b/cpp/test/WinRT/TestSuite/MainPage.xaml.h new file mode 100644 index 00000000000..f9fbaf596a5 --- /dev/null +++ b/cpp/test/WinRT/TestSuite/MainPage.xaml.h @@ -0,0 +1,40 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2012 ZeroC, Inc. All rights reserved. +// +// This copy of Ice is licensed to you under the terms described in the +// ICE_LICENSE file included in this distribution. +// +// ********************************************************************** + +#pragma once + +#include "MainPage.g.h" +#include <collection.h> + +namespace TestSuite +{ +/// <summary> +/// An empty page that can be used on its own or navigated to within a Frame. +/// </summary> +public ref class MainPage sealed +{ +public: + + MainPage(); + + void completed(); + void failed(Platform::String^); + +protected: + + virtual void OnNavigatedTo(Windows::UI::Xaml::Navigation::NavigationEventArgs^ e) override; + +private: + + void btnRun_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e); + void runSelectedTest(); + Platform::Collections::Vector<Platform::String^>^ _names; +}; + +} diff --git a/cpp/test/WinRT/TestSuite/Package.appxmanifest b/cpp/test/WinRT/TestSuite/Package.appxmanifest new file mode 100644 index 00000000000..caebae4707f --- /dev/null +++ b/cpp/test/WinRT/TestSuite/Package.appxmanifest @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest">
+ <Identity Name="9cf3ce93-b7f1-414e-b2bd-7181121c15ac" Publisher="CN=ZeroC" Version="1.0.0.0" />
+ <Properties>
+ <DisplayName>Ice Test Suite</DisplayName>
+ <PublisherDisplayName>ZeroC</PublisherDisplayName>
+ <Logo>Assets\StoreLogo.png</Logo>
+ </Properties>
+ <Prerequisites>
+ <OSMinVersion>6.2.0</OSMinVersion>
+ <OSMaxVersionTested>6.2.0</OSMaxVersionTested>
+ </Prerequisites>
+ <Resources>
+ <Resource Language="x-generate" />
+ </Resources>
+ <Applications>
+ <Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="TestSuite.App">
+ <VisualElements DisplayName="Ice Test Suite" Logo="Assets\Logo.png" SmallLogo="Assets\SmallLogo.png" Description="TestSuite" ForegroundText="light" BackgroundColor="#464646">
+ <DefaultTile ShowName="allLogos" />
+ <SplashScreen Image="Assets\SplashScreen.png" />
+ </VisualElements>
+ </Application>
+ </Applications>
+ <Capabilities>
+ <Capability Name="privateNetworkClientServer" />
+ <Capability Name="internetClientServer" />
+ </Capabilities>
+ <Extensions>
+ <Extension Category="windows.certificates">
+ <Certificates>
+ <Certificate StoreName="Root" Content="cacert.pem" />
+ <Certificate StoreName="CA" Content="cacert.pem" />
+ <TrustFlags ExclusiveTrust="true" />
+ </Certificates>
+ </Extension>
+ </Extensions>
+</Package>
\ No newline at end of file diff --git a/cpp/test/WinRT/TestSuite/TestSuite.vcxproj b/cpp/test/WinRT/TestSuite/TestSuite.vcxproj new file mode 100644 index 00000000000..3e6321b9bc0 --- /dev/null +++ b/cpp/test/WinRT/TestSuite/TestSuite.vcxproj @@ -0,0 +1,355 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|ARM">
+ <Configuration>Debug</Configuration>
+ <Platform>ARM</Platform>
+ </ProjectConfiguration>
+ <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|ARM">
+ <Configuration>Release</Configuration>
+ <Platform>ARM</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>{3ce71594-e3a4-4c38-9d0f-46e2a2076f6c}</ProjectGuid>
+ <RootNamespace>TestSuite</RootNamespace>
+ <DefaultLanguage>en-US</DefaultLanguage>
+ <VCTargetsPath Condition="'$(VCTargetsPath11)' != '' and '$(VSVersion)' == '' and '$(VisualStudioVersion)' == ''">$(VCTargetsPath11)</VCTargetsPath>
+ <MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>
+ <AppContainerApplication>true</AppContainerApplication>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(Registry:HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SDKs\Windows\v8.0\ExtensionSDKS\IceWinRT\3.4@)\DesignTime\CommonConfiguration\Neutral\IceWinRT.props" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(Registry:HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SDKs\Windows\v8.0\ExtensionSDKS\IceWinRT\3.4@)\DesignTime\CommonConfiguration\Neutral\IceWinRT.props" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(Registry:HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SDKs\Windows\v8.0\ExtensionSDKS\IceWinRT\3.4@)\DesignTime\CommonConfiguration\Neutral\IceWinRT.props" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(Registry:HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SDKs\Windows\v8.0\ExtensionSDKS\IceWinRT\3.4@)\DesignTime\CommonConfiguration\Neutral\IceWinRT.props" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(Registry:HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SDKs\Windows\v8.0\ExtensionSDKS\IceWinRT\3.4@)\DesignTime\CommonConfiguration\Neutral\IceWinRT.props" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(Registry:HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SDKs\Windows\v8.0\ExtensionSDKS\IceWinRT\3.4@)\DesignTime\CommonConfiguration\Neutral\IceWinRT.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <PackageCertificateKeyFile>key.pfx</PackageCertificateKeyFile>
+ <PackageCertificateThumbprint>22710365E93A16EA1983847965CFC340086BE8B1</PackageCertificateThumbprint>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
+ <ClCompile>
+ <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalIncludeDirectories>.;..\..;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <PrecompiledHeaderFile />
+ <PrecompiledHeaderOutputFile />
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
+ <ClCompile>
+ <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalIncludeDirectories>.;..\..;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <PrecompiledHeaderFile />
+ <PrecompiledHeaderOutputFile />
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalIncludeDirectories>.;..\..;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <PrecompiledHeaderFile />
+ <PrecompiledHeaderOutputFile />
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalIncludeDirectories>.;..\..;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <PrecompiledHeaderFile />
+ <PrecompiledHeaderOutputFile />
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalIncludeDirectories>.;..\..;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <PrecompiledHeaderFile />
+ <PrecompiledHeaderOutputFile />
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalIncludeDirectories>.;..\..;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <PrecompiledHeaderFile />
+ <PrecompiledHeaderOutputFile />
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\include\TestCommon.h" />
+ <ClInclude Include="pch.h" />
+ <ClInclude Include="App.xaml.h">
+ <DependentUpon>App.xaml</DependentUpon>
+ </ClInclude>
+ <ClInclude Include="MainPage.xaml.h">
+ <DependentUpon>MainPage.xaml</DependentUpon>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ApplicationDefinition Include="App.xaml">
+ <SubType>Designer</SubType>
+ </ApplicationDefinition>
+ <Page Include="Common\StandardStyles.xaml">
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="MainPage.xaml">
+ <SubType>Designer</SubType>
+ </Page>
+ </ItemGroup>
+ <ItemGroup>
+ <AppxManifest Include="Package.appxmanifest">
+ <SubType>Designer</SubType>
+ </AppxManifest>
+ <None Include="..\..\Ice\adapterDeactivation\Ice_adapterDeactivation_client.dll">
+ <DeploymentContent>true</DeploymentContent>
+ </None>
+ <None Include="..\..\Ice\adapterDeactivation\Ice_adapterDeactivation_collocated.dll">
+ <DeploymentContent>true</DeploymentContent>
+ </None>
+ <None Include="..\..\Ice\adapterDeactivation\Ice_adapterDeactivation_server.dll">
+ <DeploymentContent>true</DeploymentContent>
+ </None>
+ <None Include="..\..\Ice\ami\Ice_ami_client.dll">
+ <DeploymentContent>true</DeploymentContent>
+ </None>
+ <None Include="..\..\Ice\ami\Ice_ami_server.dll">
+ <DeploymentContent>true</DeploymentContent>
+ </None>
+ <None Include="..\..\Ice\binding\Ice_binding_client.dll">
+ <DeploymentContent>true</DeploymentContent>
+ </None>
+ <None Include="..\..\Ice\binding\Ice_binding_server.dll">
+ <DeploymentContent>true</DeploymentContent>
+ </None>
+ <None Include="..\..\Ice\dispatcher\Ice_dispatcher_client.dll">
+ <DeploymentContent>true</DeploymentContent>
+ </None>
+ <None Include="..\..\Ice\dispatcher\Ice_dispatcher_server.dll">
+ <DeploymentContent>true</DeploymentContent>
+ </None>
+ <None Include="..\..\Ice\exceptions\Ice_exceptions_client.dll">
+ <DeploymentContent>true</DeploymentContent>
+ </None>
+ <None Include="..\..\Ice\exceptions\Ice_exceptions_collocated.dll">
+ <DeploymentContent>true</DeploymentContent>
+ </None>
+ <None Include="..\..\Ice\exceptions\Ice_exceptions_server.dll">
+ <DeploymentContent>true</DeploymentContent>
+ </None>
+ <None Include="..\..\Ice\exceptions\Ice_exceptions_serveramd.dll">
+ <DeploymentContent>true</DeploymentContent>
+ </None>
+ <None Include="..\..\Ice\facets\Ice_facets_client.dll">
+ <DeploymentContent>true</DeploymentContent>
+ </None>
+ <None Include="..\..\Ice\facets\Ice_facets_collocated.dll">
+ <DeploymentContent>true</DeploymentContent>
+ </None>
+ <None Include="..\..\Ice\facets\Ice_facets_server.dll">
+ <DeploymentContent>true</DeploymentContent>
+ </None>
+ <None Include="..\..\Ice\hold\Ice_hold_client.dll">
+ <DeploymentContent>true</DeploymentContent>
+ </None>
+ <None Include="..\..\Ice\hold\Ice_hold_server.dll">
+ <DeploymentContent>true</DeploymentContent>
+ </None>
+ <None Include="..\..\Ice\info/Ice_info_client.dll">
+ <DeploymentContent>true</DeploymentContent>
+ </None>
+ <None Include="..\..\Ice\info\Ice_info_server.dll">
+ <DeploymentContent>true</DeploymentContent>
+ </None>
+ <None Include="..\..\Ice\inheritance\Ice_inheritance_client.dll">
+ <DeploymentContent>true</DeploymentContent>
+ </None>
+ <None Include="..\..\Ice\inheritance\Ice_inheritance_collocated.dll">
+ <DeploymentContent>true</DeploymentContent>
+ </None>
+ <None Include="..\..\Ice\inheritance\Ice_inheritance_server.dll">
+ <DeploymentContent>true</DeploymentContent>
+ </None>
+ <None Include="..\..\Ice\invoke\Ice_invoke_client.dll">
+ <DeploymentContent>true</DeploymentContent>
+ </None>
+ <None Include="..\..\Ice\invoke\Ice_invoke_server.dll">
+ <DeploymentContent>true</DeploymentContent>
+ </None>
+ <None Include="..\..\Ice\location\Ice_location_client.dll">
+ <DeploymentContent>true</DeploymentContent>
+ </None>
+ <None Include="..\..\Ice\location\Ice_location_server.dll">
+ <DeploymentContent>true</DeploymentContent>
+ </None>
+ <None Include="..\..\Ice\objects\Ice_objects_client.dll">
+ <DeploymentContent>true</DeploymentContent>
+ </None>
+ <None Include="..\..\Ice\objects\Ice_objects_collocated.dll">
+ <DeploymentContent>true</DeploymentContent>
+ </None>
+ <None Include="..\..\Ice\objects\Ice_objects_server.dll">
+ <DeploymentContent>true</DeploymentContent>
+ </None>
+ <None Include="..\..\Ice\operations\Ice_operations_client.dll">
+ <DeploymentContent>true</DeploymentContent>
+ </None>
+ <None Include="..\..\Ice\operations\Ice_operations_collocated.dll">
+ <DeploymentContent>true</DeploymentContent>
+ </None>
+ <None Include="..\..\Ice\operations\Ice_operations_server.dll">
+ <DeploymentContent>true</DeploymentContent>
+ </None>
+ <None Include="..\..\Ice\operations\Ice_operations_serveramd.dll">
+ <DeploymentContent>true</DeploymentContent>
+ </None>
+ <None Include="..\..\Ice\proxy\Ice_proxy_client.dll">
+ <DeploymentContent>true</DeploymentContent>
+ </None>
+ <None Include="..\..\Ice\proxy\Ice_proxy_collocated.dll">
+ <DeploymentContent>true</DeploymentContent>
+ </None>
+ <None Include="..\..\Ice\proxy\Ice_proxy_server.dll">
+ <DeploymentContent>true</DeploymentContent>
+ </None>
+ <None Include="..\..\Ice\proxy\Ice_proxy_serveramd.dll">
+ <DeploymentContent>true</DeploymentContent>
+ </None>
+ <None Include="..\..\Ice\retry\Ice_retry_client.dll">
+ <DeploymentContent>true</DeploymentContent>
+ </None>
+ <None Include="..\..\Ice\retry\Ice_retry_server.dll">
+ <DeploymentContent>true</DeploymentContent>
+ </None>
+ <None Include="..\..\Ice\stream\Ice_stream_client.dll">
+ <DeploymentContent>true</DeploymentContent>
+ </None>
+ <None Include="..\..\Ice\timeout\Ice_timeout_client.dll">
+ <DeploymentContent>true</DeploymentContent>
+ </None>
+ <None Include="..\..\Ice\timeout\Ice_timeout_server.dll">
+ <DeploymentContent>true</DeploymentContent>
+ </None>
+ <None Include="..\..\Ice\udp\Ice_udp_client.dll">
+ <DeploymentContent>true</DeploymentContent>
+ </None>
+ <None Include="..\..\Ice\udp\Ice_udp_server.dll">
+ <DeploymentContent>true</DeploymentContent>
+ </None>
+ <None Include="..\..\..\..\certs\cacert.pem">
+ <DeploymentContent>true</DeploymentContent>
+ </None>
+ <None Include="key.pfx" />
+ </ItemGroup>
+ <ItemGroup>
+ <Image Include="Assets\Logo.png" />
+ <Image Include="Assets\SmallLogo.png" />
+ <Image Include="Assets\StoreLogo.png" />
+ <Image Include="Assets\SplashScreen.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="App.xaml.cpp">
+ <DependentUpon>App.xaml</DependentUpon>
+ </ClCompile>
+ <ClCompile Include="MainPage.xaml.cpp">
+ <DependentUpon>MainPage.xaml</DependentUpon>
+ </ClCompile>
+ <ClCompile Include="pch.cpp">
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <SDKReference Include="IceWinRT, Version=3.4" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+ <ProjectExtensions>
+ <VisualStudio>
+ <UserProperties ZerocIce_Enabled="True" ZerocIce_Streaming="False" ZerocIce_ProjectVersion="1" />
+ </VisualStudio>
+ </ProjectExtensions>
+</Project>
\ No newline at end of file diff --git a/cpp/test/WinRT/TestSuite/TestSuite.vcxproj.filters b/cpp/test/WinRT/TestSuite/TestSuite.vcxproj.filters new file mode 100644 index 00000000000..a265ba6d68e --- /dev/null +++ b/cpp/test/WinRT/TestSuite/TestSuite.vcxproj.filters @@ -0,0 +1,203 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Common">
+ <UniqueIdentifier>3ce71594-e3a4-4c38-9d0f-46e2a2076f6c</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Assets">
+ <UniqueIdentifier>aa39e686-931d-4eb4-a06f-1ce6c081fd4c</UniqueIdentifier>
+ </Filter>
+ <Page Include="Common\StandardStyles.xaml">
+ <Filter>Common</Filter>
+ </Page>
+ <Image Include="Assets\Logo.png">
+ <Filter>Assets</Filter>
+ </Image>
+ <Image Include="Assets\SmallLogo.png">
+ <Filter>Assets</Filter>
+ </Image>
+ <Image Include="Assets\StoreLogo.png">
+ <Filter>Assets</Filter>
+ </Image>
+ <Image Include="Assets\SplashScreen.png">
+ <Filter>Assets</Filter>
+ </Image>
+ <Filter Include="Tests">
+ <UniqueIdentifier>{16bb0b82-e8f7-47c8-8ab9-25814f65a3c0}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ApplicationDefinition Include="App.xaml" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="App.xaml.cpp" />
+ <ClCompile Include="MainPage.xaml.cpp" />
+ <ClCompile Include="pch.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="pch.h" />
+ <ClInclude Include="App.xaml.h" />
+ <ClInclude Include="MainPage.xaml.h" />
+ <ClInclude Include="..\..\include\TestCommon.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <AppxManifest Include="Package.appxmanifest" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="..\..\Ice\adapterDeactivation\Ice_adapterDeactivation_client.dll">
+ <Filter>Tests</Filter>
+ </None>
+ <None Include="..\..\Ice\adapterDeactivation\Ice_adapterDeactivation_collocated.dll">
+ <Filter>Tests</Filter>
+ </None>
+ <None Include="..\..\Ice\adapterDeactivation\Ice_adapterDeactivation_server.dll">
+ <Filter>Tests</Filter>
+ </None>
+ <None Include="..\..\Ice\ami\Ice_ami_client.dll">
+ <Filter>Tests</Filter>
+ </None>
+ <None Include="..\..\Ice\ami\Ice_ami_server.dll">
+ <Filter>Tests</Filter>
+ </None>
+ <None Include="..\..\Ice\binding\Ice_binding_client.dll">
+ <Filter>Tests</Filter>
+ </None>
+ <None Include="..\..\Ice\binding\Ice_binding_server.dll">
+ <Filter>Tests</Filter>
+ </None>
+ <None Include="..\..\Ice\dispatcher\Ice_dispatcher_client.dll">
+ <Filter>Tests</Filter>
+ </None>
+ <None Include="..\..\Ice\dispatcher\Ice_dispatcher_server.dll">
+ <Filter>Tests</Filter>
+ </None>
+ <None Include="..\..\Ice\exceptions\Ice_exceptions_client.dll">
+ <Filter>Tests</Filter>
+ </None>
+ <None Include="..\..\Ice\exceptions\Ice_exceptions_collocated.dll">
+ <Filter>Tests</Filter>
+ </None>
+ <None Include="..\..\Ice\exceptions\Ice_exceptions_server.dll">
+ <Filter>Tests</Filter>
+ </None>
+ <None Include="..\..\Ice\exceptions\Ice_exceptions_serveramd.dll">
+ <Filter>Tests</Filter>
+ </None>
+ <None Include="..\..\Ice\facets\Ice_facets_client.dll">
+ <Filter>Tests</Filter>
+ </None>
+ <None Include="..\..\Ice\facets\Ice_facets_collocated.dll">
+ <Filter>Tests</Filter>
+ </None>
+ <None Include="..\..\Ice\facets\Ice_facets_server.dll">
+ <Filter>Tests</Filter>
+ </None>
+ <None Include="..\..\Ice\hold\Ice_hold_client.dll">
+ <Filter>Tests</Filter>
+ </None>
+ <None Include="..\..\Ice\hold\Ice_hold_server.dll">
+ <Filter>Tests</Filter>
+ </None>
+ <None Include="..\..\Ice\info/Ice_info_client.dll">
+ <Filter>Tests</Filter>
+ </None>
+ <None Include="..\..\Ice\info\Ice_info_server.dll">
+ <Filter>Tests</Filter>
+ </None>
+ <None Include="..\..\Ice\inheritance\Ice_inheritance_client.dll">
+ <Filter>Tests</Filter>
+ </None>
+ <None Include="..\..\Ice\inheritance\Ice_inheritance_collocated.dll">
+ <Filter>Tests</Filter>
+ </None>
+ <None Include="..\..\Ice\inheritance\Ice_inheritance_server.dll">
+ <Filter>Tests</Filter>
+ </None>
+ <None Include="..\..\Ice\invoke\Ice_invoke_client.dll">
+ <Filter>Tests</Filter>
+ </None>
+ <None Include="..\..\Ice\invoke\Ice_invoke_server.dll">
+ <Filter>Tests</Filter>
+ </None>
+ <None Include="..\..\Ice\location\Ice_location_client.dll">
+ <Filter>Tests</Filter>
+ </None>
+ <None Include="..\..\Ice\location\Ice_location_server.dll">
+ <Filter>Tests</Filter>
+ </None>
+ <None Include="..\..\Ice\objects\Ice_objects_client.dll">
+ <Filter>Tests</Filter>
+ </None>
+ <None Include="..\..\Ice\objects\Ice_objects_collocated.dll">
+ <Filter>Tests</Filter>
+ </None>
+ <None Include="..\..\Ice\objects\Ice_objects_server.dll">
+ <Filter>Tests</Filter>
+ </None>
+ <None Include="..\..\Ice\operations\Ice_operations_collocated.dll">
+ <Filter>Tests</Filter>
+ </None>
+ <None Include="..\..\Ice\operations\Ice_operations_server.dll">
+ <Filter>Tests</Filter>
+ </None>
+ <None Include="..\..\Ice\operations\Ice_operations_serveramd.dll">
+ <Filter>Tests</Filter>
+ </None>
+ <None Include="..\..\Ice\proxy\Ice_proxy_client.dll">
+ <Filter>Tests</Filter>
+ </None>
+ <None Include="..\..\Ice\proxy\Ice_proxy_collocated.dll">
+ <Filter>Tests</Filter>
+ </None>
+ <None Include="..\..\Ice\proxy\Ice_proxy_server.dll">
+ <Filter>Tests</Filter>
+ </None>
+ <None Include="..\..\Ice\proxy\Ice_proxy_serveramd.dll">
+ <Filter>Tests</Filter>
+ </None>
+ <None Include="..\..\Ice\timeout\Ice_timeout_client.dll">
+ <Filter>Tests</Filter>
+ </None>
+ <None Include="..\..\Ice\timeout\Ice_timeout_server.dll">
+ <Filter>Tests</Filter>
+ </None>
+ <None Include="..\..\Ice\udp\Ice_udp_client.dll">
+ <Filter>Tests</Filter>
+ </None>
+ <None Include="..\..\Ice\udp\Ice_udp_server.dll">
+ <Filter>Tests</Filter>
+ </None>
+ <None Include="..\..\..\..\certs\cacert.pem" />
+ <None Include="..\..\Ice\operations\Ice_operations_collocated.dll" />
+ <None Include="..\..\Ice\operations\Ice_operations_server.dll" />
+ <None Include="..\..\Ice\operations\Ice_operations_serveramd.dll" />
+ <None Include="..\..\Ice\operations\Ice_operations_client.dll">
+ <Filter>Tests</Filter>
+ </None>
+ <None Include="..\..\Ice\operations\Ice_operations_collocated.dll">
+ <Filter>Tests</Filter>
+ </None>
+ <None Include="..\..\Ice\operations\Ice_operations_server.dll">
+ <Filter>Tests</Filter>
+ </None>
+ <None Include="..\..\Ice\operations\Ice_operations_serveramd.dll">
+ <Filter>Tests</Filter>
+ </None>
+ <None Include="..\..\Ice\retry\Ice_retry_client.dll">
+ <Filter>Tests</Filter>
+ </None>
+ <None Include="..\..\Ice\retry\Ice_retry_server.dll">
+ <Filter>Tests</Filter>
+ </None>
+ <None Include="..\..\Ice\stream\Ice_stream_client.dll">
+ <Filter>Tests</Filter>
+ </None>
+ <None Include="..\..\Ice\operations\Ice_operations_client.dll">
+ <Filter>Tests</Filter>
+ </None>
+ <None Include="key.pfx" />
+ </ItemGroup>
+ <ItemGroup>
+ <Page Include="MainPage.xaml" />
+ </ItemGroup>
+</Project>
\ No newline at end of file diff --git a/cpp/test/WinRT/TestSuite/pch.cpp b/cpp/test/WinRT/TestSuite/pch.cpp new file mode 100644 index 00000000000..f3963b9b14c --- /dev/null +++ b/cpp/test/WinRT/TestSuite/pch.cpp @@ -0,0 +1,6 @@ +//
+// pch.cpp
+// Include the standard header and generate the precompiled header.
+//
+
+#include "pch.h"
diff --git a/cpp/test/WinRT/TestSuite/pch.h b/cpp/test/WinRT/TestSuite/pch.h new file mode 100644 index 00000000000..77252482cf2 --- /dev/null +++ b/cpp/test/WinRT/TestSuite/pch.h @@ -0,0 +1,9 @@ +//
+// pch.h
+// Header for standard system include files.
+//
+
+#pragma once
+
+#include <collection.h>
+#include "App.xaml.h"
diff --git a/cpp/test/include/TestCommon.h b/cpp/test/include/TestCommon.h index d68029b4ac9..02d2adba199 100644 --- a/cpp/test/include/TestCommon.h +++ b/cpp/test/include/TestCommon.h @@ -10,13 +10,33 @@ #ifndef TEST_COMMON_H #define TEST_COMMON_H -#include <IceUtil/Config.h> +#include <IceUtil/IceUtil.h> +#ifdef ICE_OS_WINRT +# include <Ice/Initialize.h> +# include <Ice/Logger.h> +# include <Ice/LocalException.h> +#endif + #include <cstdlib> #ifdef __BCPLUSPLUS__ #include <stdlib.h> #endif +void +inline print(const std::string& msg) +{ + std::cout << msg << std::flush; +} + +void +inline println(const std::string& msg) +{ + std::cout << msg << std::endl; +} + +#ifndef ICE_OS_WINRT + void inline testFailed(const char* expr, const char* file, unsigned int line) { @@ -25,6 +45,202 @@ inline testFailed(const char* expr, const char* file, unsigned int line) abort(); } +#define DEFINE_TEST(name) +#define TEST_READY + +#else + +namespace Test +{ + +class MainHelper : public std::streambuf +{ +public: + + MainHelper() + { + setp(&data[0], &data[sizeof(data) - 1]); + } + + virtual void serverReady() = 0; + + virtual void shutdown() = 0; + + virtual void waitForCompleted() = 0; + + virtual bool redirect() = 0; + + virtual void print(const std::string& msg) = 0; + + virtual void + flush() + { + } + + virtual void + newLine() + { + print("\n"); + } + +private: + + // + // streambuf redirection implementation + // + + int sync() + { + std::streamsize n = pptr() - pbase(); + print(std::string(pbase(), static_cast<int>(n))); + pbump(-static_cast<int>(pptr() - pbase())); + return 0; + } + + int overflow(int ch) + { + sync(); + if(ch != EOF) + { + assert(pptr() != epptr()); + sputc(ch); + } + return 0; + } + + int sputc(char c) + { + if(c == '\n') + { + pubsync(); + } + return std::streambuf::sputc(c); + } + + char data[1024]; +}; + +extern MainHelper* helper; + +class MainHelperInit +{ +public: + + MainHelperInit(MainHelper* r, const std::string& name, bool redirect) + { + helper = r; + + if(redirect) + { + _previousLogger = Ice::getProcessLogger(); + Ice::setProcessLogger(Ice::getProcessLogger()->cloneWithPrefix(name)); + + _previousCoutBuffer = std::cout.rdbuf(); + std::cout.rdbuf(r); + + _previousCerrBuffer = std::cerr.rdbuf(); + std::cerr.rdbuf(r); + } + } + + ~MainHelperInit() + { + if(_previousLogger) + { + Ice::setProcessLogger(_previousLogger); + std::cout.rdbuf(_previousCoutBuffer); + std::cerr.rdbuf(_previousCerrBuffer); + } + } + +private: + + Ice::LoggerPtr _previousLogger; + std::streambuf* _previousCoutBuffer; + std::streambuf* _previousCerrBuffer; +}; + +// +// Redefine main as Test::mainEntryPoint +// +#define main Test::mainEntryPoint +int mainEntryPoint(int, char**); + +} + +class TestFailedException : public ::Ice::LocalException
+{
+public:
+
+ TestFailedException(const char* file, int line) :
+ LocalException(file, line)
+ {
+ }
+
+ TestFailedException(const char* file, int line, const ::std::string& r) :
+ LocalException(file, line),
+ reason(r)
+ {
+ }
+
+ virtual ~TestFailedException() throw()
+ {
+ }
+
+ virtual ::std::string ice_name() const
+ {
+ return "::TestFailedException";
+ }
+
+ virtual ::Ice::Exception* ice_clone() const
+ {
+ return new TestFailedException(*this);
+ }
+
+ virtual void ice_throw() const
+ {
+ throw *this;
+ }
+
+ ::std::string reason;
+}; + +void +inline testFailed(const char* expr, const char* file, unsigned int line) +{ + std::cout << "failed!" << std::endl; + std::cout << file << ':' << line << ": assertion `" << expr << "' failed" << std::endl; + throw TestFailedException(__FILE__, __LINE__, "Test Failed"); +} + +#define DEFINE_TEST(name) \ + Test::MainHelper* Test::helper; \ + Ice::CommunicatorPtr communicatorInstance; \ + extern "C" { \ + _declspec(dllexport) void dllTestShutdown(); \ + void dllTestShutdown() \ + { \ + try \ + { \ + communicatorInstance->destroy(); \ + } \ + catch(const Ice::LocalException&) \ + { \ + } \ + } \ + int dllMain(int argc, char** argv, Test::MainHelper* helper) \ + { \ + Test::MainHelperInit init(helper, name, helper->redirect()); \ + return Test::mainEntryPoint(argc, argv); \ + } \ + } + +#define TEST_READY Test::helper->serverReady(); \ + communicatorInstance = communicator; + +#endif + #define test(ex) ((ex) ? ((void)0) : testFailed(#ex, __FILE__, __LINE__)) #endif + |