aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/csharp/Grpc.Core.Tests/Internal/CompletionQueueEventTest.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/csharp/Grpc.Core.Tests/Internal/CompletionQueueEventTest.cs')
-rw-r--r--src/csharp/Grpc.Core.Tests/Internal/CompletionQueueEventTest.cs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/csharp/Grpc.Core.Tests/Internal/CompletionQueueEventTest.cs b/src/csharp/Grpc.Core.Tests/Internal/CompletionQueueEventTest.cs
index 27c2fa8bf0..259520846f 100644
--- a/src/csharp/Grpc.Core.Tests/Internal/CompletionQueueEventTest.cs
+++ b/src/csharp/Grpc.Core.Tests/Internal/CompletionQueueEventTest.cs
@@ -29,9 +29,12 @@ namespace Grpc.Core.Internal.Tests
public class CompletionQueueEventTest
{
[Test]
- public void CreateAndDestroy()
+ public void CompletionQueueEventSizeIsNativeSize()
{
- Assert.AreEqual(CompletionQueueEvent.NativeSize, Marshal.SizeOf<CompletionQueueEvent>());
+ #pragma warning disable 0618
+ // We need to use the obsolete non-generic version of Marshal.SizeOf because the generic version is not available in net45
+ Assert.AreEqual(CompletionQueueEvent.NativeSize, Marshal.SizeOf(typeof(CompletionQueueEvent)));
+ #pragma warning restore 0618
}
}
}