You've already forked linux-packaging-mono
Imported Upstream version 5.16.0.163
Former-commit-id: 108ef693596ba53323fc750a7d4fdc946d0f5322
This commit is contained in:
parent
0875d0d9cd
commit
6b5644868c
@ -29,6 +29,7 @@
|
||||
|
||||
using NUnit.Framework;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
@ -486,6 +487,20 @@ namespace MonoTests.System.Runtime.CompilerServices {
|
||||
Assert.IsTrue (table.Remove (key), "#2-" + i + "-k-" + key);
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ConditionalWeakTableEnumerable()
|
||||
{
|
||||
var cwt = new ConditionalWeakTable<string, string>();
|
||||
Assert.AreEqual(0, cwt.ToArray().Length);
|
||||
cwt.Add("test1", "foo1");
|
||||
cwt.Add("test2", "foo2");
|
||||
Assert.AreEqual(2, cwt.ToArray().Length);
|
||||
cwt.Remove("test1");
|
||||
Assert.AreEqual(1, cwt.ToArray().Length);
|
||||
cwt.Remove("test2");
|
||||
Assert.AreEqual(0, cwt.ToArray().Length);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user