Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C# cleanup test calls #3137

Merged
merged 1 commit into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions csharp/test/Ice/adapterDeactivation/ServantLocatorI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,7 @@ public ServantLocatorI()
}
}

private static void test(bool b)
{
if (!b)
{
throw new System.Exception();
}
}
private static void test(bool b) => global::Test.TestHelper.test(b);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the global:: really necessary?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, because we have Ice.adapterDeactivation.Test namespace.


public Ice.Object locate(Ice.Current current, out System.Object cookie)
{
Expand Down
9 changes: 1 addition & 8 deletions csharp/test/Ice/ami/TestI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,7 @@ namespace ami
{
public class TestI : Test.TestIntfDisp_
{
protected static void test(bool b)
{
if (!b)
{
Debug.Assert(false);
throw new System.Exception();
}
}
private static void test(bool b) => global::Test.TestHelper.test(b);

public TestI()
{
Expand Down
10 changes: 1 addition & 9 deletions csharp/test/Ice/background/AllTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

using Test;

public class AllTests
public class AllTests : global::Test.AllTests
{
public class Progress : IProgress<bool>
{
Expand All @@ -20,14 +20,6 @@ public void Report(bool value)
}
}

private static void test(bool b)
{
if (!b)
{
throw new System.Exception();
}
}

private class OpThread
{
internal OpThread(BackgroundPrx background)
Expand Down
8 changes: 1 addition & 7 deletions csharp/test/Ice/dictMapping/Twoways.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,7 @@ namespace dictMapping
{
internal class Twoways
{
private static void test(bool b)
{
if (!b)
{
throw new System.Exception();
}
}
private static void test(bool b) => global::Test.TestHelper.test(b);

internal static void twoways(Ice.Communicator communicator, Test.MyClassPrx p)
{
Expand Down
16 changes: 1 addition & 15 deletions csharp/test/Ice/dictMapping/TwowaysAMI.cs
Original file line number Diff line number Diff line change
@@ -1,26 +1,12 @@
// Copyright (c) ZeroC, Inc.

/* Unmerged change from project 'collocated'
Before:
using System.Diagnostics;
using System.Collections.Generic;
After:
using System.Collections.Generic;
using System.Diagnostics;
*/
namespace Ice
{
namespace dictMapping
{
public class TwowaysAMI
{
private static void test(bool b)
{
if (!b)
{
throw new System.SystemException();
}
}
private static void test(bool b) => global::Test.TestHelper.test(b);

internal static async Task twowaysAMI(Test.MyClassPrx p)
{
Expand Down
8 changes: 1 addition & 7 deletions csharp/test/Ice/executor/Executor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,7 @@

public class Executor
{
private static void test(bool b)
{
if (!b)
{
throw new System.Exception();
}
}
private static void test(bool b) => global::Test.TestHelper.test(b);

public Executor()
{
Expand Down
16 changes: 2 additions & 14 deletions csharp/test/Ice/executor/TestI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,7 @@

public class TestI : TestIntfDisp_
{
private static void test(bool b)
{
if (!b)
{
throw new System.Exception();
}
}
private static void test(bool b) => global::Test.TestHelper.test(b);

public TestI()
{
Expand Down Expand Up @@ -43,13 +37,7 @@ public override void

public class TestControllerI : TestIntfControllerDisp_
{
private static void test(bool b)
{
if (!b)
{
throw new System.Exception();
}
}
private static void test(bool b) => global::Test.TestHelper.test(b);

public override void
holdAdapter(Ice.Current current)
Expand Down
8 changes: 1 addition & 7 deletions csharp/test/Ice/hold/HoldI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,7 @@ public sealed class HoldI : Test.HoldDisp_
private int _last = 0;
private readonly object _taskMutex = new object();

private static void test(bool b)
{
if (!b)
{
throw new System.Exception();
}
}
private static void test(bool b) => global::Test.TestHelper.test(b);

public HoldI(Ice.ObjectAdapter adapter) => _adapter = adapter;

Expand Down
8 changes: 1 addition & 7 deletions csharp/test/Ice/operations/BatchOneways.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,7 @@ namespace operations
{
internal class BatchOneways
{
private static void test(bool b)
{
if (!b)
{
throw new System.Exception();
}
}
private static void test(bool b) => global::Test.TestHelper.test(b);

private class BatchRequestInterceptorI
{
Expand Down
8 changes: 1 addition & 7 deletions csharp/test/Ice/operations/BatchOnewaysAMI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,7 @@ namespace operations
{
internal class BatchOnewaysAMI
{
private static void test(bool b)
{
if (!b)
{
throw new System.Exception();
}
}
private static void test(bool b) => global::Test.TestHelper.test(b);

private class Callback
{
Expand Down
8 changes: 1 addition & 7 deletions csharp/test/Ice/operations/MyDerivedClassAMDI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,7 @@ namespace AMD
{
public sealed class MyDerivedClassI : Test.MyDerivedClassDisp_
{
private static void test(bool b)
{
if (!b)
{
throw new System.Exception();
}
}
private static void test(bool b) => global::Test.TestHelper.test(b);

internal class Thread_opVoid : TaskCompletionSource<object>
{
Expand Down
8 changes: 1 addition & 7 deletions csharp/test/Ice/operations/MyDerivedClassI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,7 @@ namespace operations
{
public sealed class MyDerivedClassI : Test.MyDerivedClassDisp_
{
private static void test(bool b)
{
if (!b)
{
throw new System.Exception();
}
}
private static void test(bool b) => global::Test.TestHelper.test(b);

public override void shutdown(Ice.Current current)
{
Expand Down
8 changes: 1 addition & 7 deletions csharp/test/Ice/operations/Oneways.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,7 @@ namespace operations
{
internal class Oneways
{
private static void test(bool b)
{
if (!b)
{
throw new System.SystemException();
}
}
private static void test(bool b) => global::Test.TestHelper.test(b);

internal static void oneways(global::Test.TestHelper helper, Test.MyClassPrx p)
{
Expand Down
8 changes: 1 addition & 7 deletions csharp/test/Ice/operations/OnewaysAMI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,7 @@ namespace operations
{
public class OnewaysAMI
{
private static void test(bool b)
{
if (!b)
{
throw new System.Exception();
}
}
private static void test(bool b) => global::Test.TestHelper.test(b);

internal static async Task onewaysAMI(Test.MyClassPrx proxy)
{
Expand Down
8 changes: 1 addition & 7 deletions csharp/test/Ice/operations/Twoways.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,7 @@ namespace operations
{
internal class Twoways
{
private static void test(bool b)
{
if (!b)
{
throw new System.Exception();
}
}
private static void test(bool b) => global::Test.TestHelper.test(b);

private class PerThreadContextInvokeThread
{
Expand Down
8 changes: 1 addition & 7 deletions csharp/test/Ice/operations/TwowaysAMI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,7 @@ namespace operations
{
public class TwowaysAMI
{
private static void test(bool b)
{
if (!b)
{
throw new System.Exception();
}
}
private static void test(bool b) => global::Test.TestHelper.test(b);

internal static async Task twowaysAMI(global::Test.TestHelper helper, Test.MyClassPrx p)
{
Expand Down
8 changes: 1 addition & 7 deletions csharp/test/Ice/plugin/BasePlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,7 @@ public bool isDestroyed()
return _destroyed;
}

protected static void test(bool b)
{
if (!b)
{
throw new System.Exception();
}
}
protected static void test(bool b) => global::Test.TestHelper.test(b);

public abstract void initialize();
public abstract void destroy();
Expand Down
8 changes: 1 addition & 7 deletions csharp/test/Ice/plugin/BasePluginFail.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,7 @@ public bool isDestroyed()
return _destroyed;
}

protected static void test(bool b)
{
if (!b)
{
throw new System.Exception();
}
}
protected static void test(bool b) => global::Test.TestHelper.test(b);

public abstract void initialize();
public abstract void destroy();
Expand Down
8 changes: 1 addition & 7 deletions csharp/test/Ice/plugin/PluginFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,7 @@ public void destroy()
}
}

private static void test(bool b)
{
if (!b)
{
throw new System.Exception();
}
}
private static void test(bool b) => global::Test.TestHelper.test(b);

private bool _initialized = false;
private bool _destroyed = false;
Expand Down
10 changes: 1 addition & 9 deletions csharp/test/Ice/plugin/PluginInitializeFailFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,7 @@ public void initialize()

public void destroy()
{
test(false);
}

private static void test(bool b)
{
if (!b)
{
throw new System.Exception();
}
global::Test.TestHelper.test(false);
}
}
}
1 change: 1 addition & 0 deletions csharp/test/Ice/plugin/msbuild/plugin/plugin.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<Compile Include="../../PluginThreeFailFactory.cs" />
<Compile Include="../../PluginTwoFactory.cs" />
<Compile Include="../../PluginTwoFailFactory.cs" />
<Compile Include="../../../../TestCommon/TestHelper.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="zeroc.icebuilder.msbuild" Version="5.0.9" />
Expand Down
8 changes: 1 addition & 7 deletions csharp/test/Ice/seqMapping/Twoways.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,7 @@ namespace seqMapping
{
internal class Twoways
{
private static void test(bool b)
{
if (!b)
{
throw new System.Exception();
}
}
private static void test(bool b) => global::Test.TestHelper.test(b);

private static int _length = 100;

Expand Down
8 changes: 1 addition & 7 deletions csharp/test/Ice/seqMapping/TwowaysAMI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,7 @@ namespace seqMapping
{
public class TwowaysAMI
{
private static void test(bool b)
{
if (!b)
{
throw new System.SystemException();
}
}
private static void test(bool b) => global::Test.TestHelper.test(b);

private static readonly int _length = 100;

Expand Down
8 changes: 1 addition & 7 deletions csharp/test/Ice/servantLocator/ServantLocatorAMDI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,7 @@ public ServantLocatorI(String category)
}
}

private static void test(bool b)
{
if (!b)
{
throw new System.Exception();
}
}
private static void test(bool b) => global::Test.TestHelper.test(b);

public Ice.Object locate(Ice.Current current, out object cookie)
{
Expand Down
Loading