lauromoura pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=2272e21b3cc96966f0ece64c2cc43d7bb5fce32a

commit 2272e21b3cc96966f0ece64c2cc43d7bb5fce32a
Author: Lauro Moura <[email protected]>
Date:   Fri Nov 15 00:08:38 2019 -0300

    csharp: Silence CA2000 in tests
    
    Summary:
    These objects are expected to leave scope while alive.
    
    Ref T8423
    
    Depends on D10671
    
    Reviewers: brunobelo, felipealmeida, YOhoho
    
    Reviewed By: brunobelo
    
    Subscribers: cedric, #reviewers, #committers
    
    Tags: #efl
    
    Maniphest Tasks: T8423
    
    Differential Revision: https://phab.enlightenment.org/D10672
---
 src/tests/efl_mono/Eo.cs          | 2 ++
 src/tests/efl_mono/Inheritance.cs | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/src/tests/efl_mono/Eo.cs b/src/tests/efl_mono/Eo.cs
index dec54ba31a..9a52085902 100644
--- a/src/tests/efl_mono/Eo.cs
+++ b/src/tests/efl_mono/Eo.cs
@@ -17,6 +17,7 @@ using System;
 using System.Linq;
 using System.Collections.Generic;
 using System.Reflection;
+using System.Diagnostics.CodeAnalysis;
 
 namespace TestSuite
 {
@@ -126,6 +127,7 @@ class TestEoInherit
         loop.Dispose();
     }
 
+    [SuppressMessage("Microsoft.Reliability", 
"CA2000:DisposeObjectBeforeLosingScope", Justification = "It is expected to 
lose scope.")]
     private static WeakReference CreateCollectableInherited()
     {
         return new WeakReference(new MyObject());
diff --git a/src/tests/efl_mono/Inheritance.cs 
b/src/tests/efl_mono/Inheritance.cs
index 06c4d1b4c4..1595759994 100644
--- a/src/tests/efl_mono/Inheritance.cs
+++ b/src/tests/efl_mono/Inheritance.cs
@@ -18,6 +18,7 @@ using System.Collections.Generic;
 using System.Linq;
 using System.Runtime.InteropServices;
 using System.Runtime.CompilerServices;
+using System.Diagnostics.CodeAnalysis;
 
 using EinaTestData;
 using static EinaTestData.BaseData;
@@ -108,6 +109,7 @@ class TestInheritance
         obj.Dispose();
     }
 
+    [SuppressMessage("Microsoft.Reliability", 
"CA2000:DisposeObjectBeforeLosingScope", Justification = "It is expected to 
lose scope.")]
     private static void CreateAndCheckInheritedObjects(out WeakReference 
parentWRef, out WeakReference childWRef)
     {
         var parent = new Inherit3Parent();

-- 


Reply via email to