summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2013-02-13 08:59:20 +0100
committerBenoit Foucher <benoit@zeroc.com>2013-02-13 08:59:20 +0100
commitfb9c2da45abe7b3187121bc28e7d2fb47c1a1023 (patch)
tree58e467fa5a26e27061295b7fb973459993247acc /cpp
parentFixed ICE-4931 - Ctrl-C handler causing SEGFAULT on OpenSUSE/gcc 4.7 (diff)
downloadice-fb9c2da45abe7b3187121bc28e7d2fb47c1a1023.tar.bz2
ice-fb9c2da45abe7b3187121bc28e7d2fb47c1a1023.tar.xz
ice-fb9c2da45abe7b3187121bc28e7d2fb47c1a1023.zip
Fixed WinRT IPv6 test configuration to match TestUtil.py configuration
Diffstat (limited to 'cpp')
-rw-r--r--cpp/test/WinRT/TestSuite/App.xaml.cpp60
-rw-r--r--cpp/test/WinRT/TestSuite/App.xaml.h34
-rw-r--r--cpp/test/WinRT/TestSuite/MainPage.xaml.cpp9
3 files changed, 59 insertions, 44 deletions
diff --git a/cpp/test/WinRT/TestSuite/App.xaml.cpp b/cpp/test/WinRT/TestSuite/App.xaml.cpp
index 7ffed1aa109..110fc0ea71c 100644
--- a/cpp/test/WinRT/TestSuite/App.xaml.cpp
+++ b/cpp/test/WinRT/TestSuite/App.xaml.cpp
@@ -1,7 +1,11 @@
-//
-// App.xaml.cpp
-// Implementation of the App class.
+// **********************************************************************
//
+// Copyright (c) 2003-2013 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 "pch.h"
#include "MainPage.xaml.h"
@@ -30,8 +34,8 @@ using namespace Windows::UI::Xaml::Navigation;
/// </summary>
App::App()
{
- InitializeComponent();
- Suspending += ref new SuspendingEventHandler(this, &App::OnSuspending);
+ InitializeComponent();
+ Suspending += ref new SuspendingEventHandler(this, &App::OnSuspending);
}
/// <summary>
@@ -42,29 +46,29 @@ App::App()
/// <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;
- }
+ // 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
- }
+ 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");
- }
+ // 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();
+ // Place the frame in the current Window and ensure that it is active
+ Window::Current->Content = rootFrame;
+ Window::Current->Activate();
}
/// <summary>
@@ -76,8 +80,8 @@ void App::OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEvent
/// <param name="e">Details about the suspend request.</param>
void App::OnSuspending(Object^ sender, SuspendingEventArgs^ e)
{
- (void) sender; // Unused parameter
- (void) e; // Unused parameter
+ (void) sender; // Unused parameter
+ (void) e; // Unused parameter
- //TODO: Save application state and stop any background activity
+ //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
index 3bc9d174f67..78f50670809 100644
--- a/cpp/test/WinRT/TestSuite/App.xaml.h
+++ b/cpp/test/WinRT/TestSuite/App.xaml.h
@@ -1,7 +1,11 @@
-//
-// App.xaml.h
-// Declaration of the App class.
+// **********************************************************************
//
+// Copyright (c) 2003-2013 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
@@ -9,16 +13,16 @@
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);
- };
+/// <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/MainPage.xaml.cpp b/cpp/test/WinRT/TestSuite/MainPage.xaml.cpp
index e20769e27a7..626f73178b5 100644
--- a/cpp/test/WinRT/TestSuite/MainPage.xaml.cpp
+++ b/cpp/test/WinRT/TestSuite/MainPage.xaml.cpp
@@ -126,7 +126,6 @@ public:
// be set to the IP addresse of the host running the SSL
// server.
//
- 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");
@@ -140,7 +139,15 @@ public:
if(_config.ipv6)
{
args.push_back("--Ice.Default.Host=0:0:0:0:0:0:0:1");
+ args.push_back("--Ice.IPv4=1");
args.push_back("--Ice.IPv6=1");
+ args.push_back("--Ice.PreferIPv6Address=1");
+ }
+ else
+ {
+ args.push_back("--Ice.Default.Host=127.0.0.1");
+ args.push_back("--Ice.IPv4=1");
+ args.push_back("--Ice.IPv6=0");
}
if(_config.type != TestConfigTypeClient)