summaryrefslogtreecommitdiff
path: root/csharp/test/Slice/structure
diff options
context:
space:
mode:
Diffstat (limited to 'csharp/test/Slice/structure')
-rw-r--r--csharp/test/Slice/structure/.depend.mak3
-rw-r--r--csharp/test/Slice/structure/Client.cs25
-rw-r--r--csharp/test/Slice/structure/Makefile27
-rw-r--r--csharp/test/Slice/structure/Makefile.mak27
-rw-r--r--csharp/test/Slice/structure/Test.ice2
-rwxr-xr-xcsharp/test/Slice/structure/client.exe.config6
-rw-r--r--csharp/test/Slice/structure/generated/.gitignore1
-rw-r--r--csharp/test/Slice/structure/msbuild/client/client.csproj69
-rw-r--r--csharp/test/Slice/structure/msbuild/client/client.exe.config5
-rw-r--r--csharp/test/Slice/structure/msbuild/client/packages.config4
-rwxr-xr-xcsharp/test/Slice/structure/run.py30
11 files changed, 87 insertions, 112 deletions
diff --git a/csharp/test/Slice/structure/.depend.mak b/csharp/test/Slice/structure/.depend.mak
deleted file mode 100644
index c84178e2d84..00000000000
--- a/csharp/test/Slice/structure/.depend.mak
+++ /dev/null
@@ -1,3 +0,0 @@
-
-Test.cs: \
- .\Test.ice
diff --git a/csharp/test/Slice/structure/Client.cs b/csharp/test/Slice/structure/Client.cs
index 7b85d273602..61409ac9de6 100644
--- a/csharp/test/Slice/structure/Client.cs
+++ b/csharp/test/Slice/structure/Client.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Collections.Generic;
using Test;
@@ -18,7 +17,7 @@ public class Client
{
if(!b)
{
- throw new System.Exception();
+ throw new Exception();
}
}
@@ -33,10 +32,10 @@ public class Client
C def_cls = new C(5);
S1 def_s = new S1("name");
string[] def_ss = new string[]{ "one", "two", "three" };
- IntList def_il = new IntList();
- def_il.Add(1);
- def_il.Add(2);
- def_il.Add(3);
+ int[] def_il = new int[3];
+ def_il[0] = 1;
+ def_il[1] = 2;
+ def_il[2] = 3;
Dictionary<string, string> def_sd = new Dictionary<string, string>();
def_sd.Add("abc", "def");
Ice.ObjectPrx def_prx = communicator.stringToProxy("test");
@@ -147,11 +146,11 @@ public class Client
S2 v1, v2;
v1 = (S2)def_s2.Clone();
- v1.il = (IntList)def_s2.il.Clone();
+ v1.il = (int[])def_s2.il.Clone();
test(v1.Equals(def_s2));
v1 = (S2)def_s2.Clone();
- v1.il = new IntList();
+ v1.il = new int[3] { 0, 0, 0};
test(!v1.Equals(def_s2));
v1 = (S2)def_s2.Clone();
@@ -295,15 +294,7 @@ public class Client
if(communicator != null)
{
- try
- {
- communicator.destroy();
- }
- catch(Ice.LocalException ex)
- {
- Console.Error.WriteLine(ex);
- status = 1;
- }
+ communicator.destroy();
}
return status;
diff --git a/csharp/test/Slice/structure/Makefile b/csharp/test/Slice/structure/Makefile
deleted file mode 100644
index e99cad58f35..00000000000
--- a/csharp/test/Slice/structure/Makefile
+++ /dev/null
@@ -1,27 +0,0 @@
-# **********************************************************************
-#
-# Copyright (c) 2003-2017 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.
-#
-# **********************************************************************
-
-top_srcdir = ../../..
-
-TARGETS = client.exe
-
-C_SRCS = Client.cs
-
-SLICE_SRCS = $(SDIR)/Test.ice
-
-SDIR = .
-
-GDIR = generated
-
-include $(top_srcdir)/config/Make.rules.cs
-
-MCSFLAGS := $(MCSFLAGS) -target:exe
-
-client.exe: $(C_SRCS) $(GEN_SRCS)
- $(MCS) $(MCSFLAGS) -out:$@ $(call ref,Ice) $(subst /,$(DSEP),$^)
diff --git a/csharp/test/Slice/structure/Makefile.mak b/csharp/test/Slice/structure/Makefile.mak
deleted file mode 100644
index dac24c1b9ee..00000000000
--- a/csharp/test/Slice/structure/Makefile.mak
+++ /dev/null
@@ -1,27 +0,0 @@
-# **********************************************************************
-#
-# Copyright (c) 2003-2017 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.
-#
-# **********************************************************************
-
-top_srcdir = ..\..\..
-
-TARGETS = client.exe
-
-C_SRCS = Client.cs
-
-GEN_SRCS = $(GDIR)\Test.cs
-
-SDIR = .
-
-GDIR = generated
-
-!include $(top_srcdir)\config\Make.rules.mak.cs
-
-MCSFLAGS = $(MCSFLAGS) -target:exe
-
-client.exe: $(C_SRCS) $(GEN_SRCS)
- $(MCS) $(MCSFLAGS) -out:$@ -r:"$(refdir)\Ice.dll" $(C_SRCS) $(GEN_SRCS)
diff --git a/csharp/test/Slice/structure/Test.ice b/csharp/test/Slice/structure/Test.ice
index cb8a8bc5c5f..ecbe0e55f8a 100644
--- a/csharp/test/Slice/structure/Test.ice
+++ b/csharp/test/Slice/structure/Test.ice
@@ -11,7 +11,7 @@ module Test
{
sequence<string> StringSeq;
-["clr:collection"] sequence<int> IntList;
+sequence<int> IntList;
dictionary<string, string> StringDict;
class C
diff --git a/csharp/test/Slice/structure/client.exe.config b/csharp/test/Slice/structure/client.exe.config
deleted file mode 100755
index d3fa65b4563..00000000000
--- a/csharp/test/Slice/structure/client.exe.config
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0"?>
-<configuration>
- <runtime>
- <developmentMode developerInstallation="true"/>
- </runtime>
-</configuration>
diff --git a/csharp/test/Slice/structure/generated/.gitignore b/csharp/test/Slice/structure/generated/.gitignore
deleted file mode 100644
index 39af5887579..00000000000
--- a/csharp/test/Slice/structure/generated/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-# Dummy file, so that git retains this otherwise empty directory.
diff --git a/csharp/test/Slice/structure/msbuild/client/client.csproj b/csharp/test/Slice/structure/msbuild/client/client.csproj
new file mode 100644
index 00000000000..66aef2c7e17
--- /dev/null
+++ b/csharp/test/Slice/structure/msbuild/client/client.csproj
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="..\..\..\..\..\msbuild\packages\zeroc.ice.net.3.7.0-alpha4\build\zeroc.ice.net.props" Condition="Exists('..\..\..\..\..\msbuild\packages\zeroc.ice.net.3.7.0-alpha4\build\zeroc.ice.net.props') and '$(UseBinDist)' == 'yes'" />
+ <PropertyGroup Label="Globals">
+ <NuGetPackageImportStamp>
+ </NuGetPackageImportStamp>
+ <IceBuilderInstallDir>$([MSBuild]::GetRegistryValue('HKEY_CURRENT_USER\SOFTWARE\ZeroC\IceBuilder', 'InstallDir.$(VisualStudioVersion)'))</IceBuilderInstallDir>
+ <IceBuilderCsharpProps>$(IceBuilderInstallDir)\Resources\IceBuilder.CSharp.props</IceBuilderCsharpProps>
+ <IceBuilderCsharpTargets>$(IceBuilderInstallDir)\Resources\IceBuilder.CSharp.targets</IceBuilderCsharpTargets>
+ </PropertyGroup>
+ <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProjectGuid>{FBC65A85-EEB6-4F73-90FF-F82C6A7E804C}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <AssemblyName>client</AssemblyName>
+ <TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{3C53C28F-DC44-46B0-8B85-0C96B85B2042};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <OutputPath>$(MSBuildThisFileDirectory)</OutputPath>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Ice, Version=3.7.54.0, Culture=neutral, PublicKeyToken=1f998c50fec78381, processorArchitecture=MSIL">
+ <HintPath>$(IceAssembliesDir)\Ice.dll</HintPath>
+ <SpecificVersion>False</SpecificVersion>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ <Reference Include="Microsoft.CSharp" />
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="Properties\" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="..\..\Client.cs">
+ <Link>Client.cs</Link>
+ </Compile>
+ <Compile Include="generated\Test.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="client.exe.config" />
+ <None Include="..\..\Test.ice">
+ <Link>Test.ice</Link>
+ </None>
+ <None Include="packages.config" />
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <Import Project="$(MSBuildThisFileDirectory)\..\..\..\..\..\msbuild\ice.test.props" />
+ <Import Project="$(IceBuilderCsharpProps)" Condition="Exists('$(IceBuilderCsharpProps)')" />
+ <PropertyGroup Label="IceBuilder">
+ <IceBuilderIncludeDirectories>$(IceHome)\slice</IceBuilderIncludeDirectories>
+ </PropertyGroup>
+ <Import Project="$(IceBuilderCsharpTargets)" Condition="Exists('$(IceBuilderCsharpTargets)')" />
+ <Target Name="EnsureIceBuilderImports" BeforeTargets="PrepareForBuild">
+ <PropertyGroup>
+ <ErrorText>This project requires the Ice Builder for Visual Studio extension. Use "Tools &amp;gt; Extensions and Updates" to install it. For more information, see https://visualstudiogallery.msdn.microsoft.com/1a64e701-63f2-4740-8004-290e6c682ce0.</ErrorText>
+ </PropertyGroup>
+ <Error Condition="!Exists('$(IceBuilderCSharpProps)')" Text="$(ErrorText)" />
+ </Target>
+ <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
+ <PropertyGroup>
+ <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
+ </PropertyGroup>
+ <Error Condition="!Exists('..\..\..\..\..\msbuild\packages\zeroc.ice.net.3.7.0-alpha4\build\zeroc.ice.net.props') and '$(UseBinDist)' == 'yes'" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\..\msbuild\packages\zeroc.ice.net.3.7.0-alpha4\build\zeroc.ice.net.props'))" />
+ </Target>
+</Project> \ No newline at end of file
diff --git a/csharp/test/Slice/structure/msbuild/client/client.exe.config b/csharp/test/Slice/structure/msbuild/client/client.exe.config
new file mode 100644
index 00000000000..e515fe2bc95
--- /dev/null
+++ b/csharp/test/Slice/structure/msbuild/client/client.exe.config
@@ -0,0 +1,5 @@
+<configuration>
+ <runtime>
+ <developmentMode developerInstallation="true"/>
+ </runtime>
+</configuration> \ No newline at end of file
diff --git a/csharp/test/Slice/structure/msbuild/client/packages.config b/csharp/test/Slice/structure/msbuild/client/packages.config
new file mode 100644
index 00000000000..e92a6bdbb98
--- /dev/null
+++ b/csharp/test/Slice/structure/msbuild/client/packages.config
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="zeroc.ice.net" version="3.7.0-alpha4" targetFramework="net452" />
+</packages> \ No newline at end of file
diff --git a/csharp/test/Slice/structure/run.py b/csharp/test/Slice/structure/run.py
deleted file mode 100755
index 57b5ce8b35e..00000000000
--- a/csharp/test/Slice/structure/run.py
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/usr/bin/env python
-# **********************************************************************
-#
-# Copyright (c) 2003-2017 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.
-#
-# **********************************************************************
-
-import os, sys, getopt
-
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
-head = os.path.dirname(sys.argv[0])
-if len(head) > 0:
- path = [os.path.join(head, p) for p in path]
-path = [os.path.abspath(p) for p in path if os.path.exists(os.path.join(p, "scripts", "TestUtil.py")) ]
-if len(path) == 0:
- raise RuntimeError("can't find toplevel directory!")
-sys.path.append(os.path.join(path[0], "scripts"))
-import TestUtil
-
-client = os.path.join(os.getcwd(), "client")
-
-sys.stdout.write("starting client... ")
-sys.stdout.flush()
-clientProc = TestUtil.startClient(client, startReader = False)
-print("ok")
-clientProc.startReader()
-clientProc.waitTestSuccess()