You've already forked linux-packaging-mono
Imported Upstream version 5.12.0.220
Former-commit-id: c477e03582759447177c6d4bf412cd2355aad476
This commit is contained in:
parent
8bd104cef2
commit
8fc30896db
@@ -29,6 +29,8 @@ using MonoTests.System.Threading.Tasks;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Concurrent;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization.Formatters.Binary;
|
||||
|
||||
using NUnit;
|
||||
using NUnit.Framework;
|
||||
@@ -67,6 +69,7 @@ namespace MonoTests.System.Collections.Concurrent
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("MultiThreaded")]
|
||||
public void AddParallelWithoutDuplicateTest ()
|
||||
{
|
||||
ParallelTestHelper.Repeat (delegate {
|
||||
@@ -98,6 +101,7 @@ namespace MonoTests.System.Collections.Concurrent
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("MultiThreaded")]
|
||||
public void RemoveParallelTest ()
|
||||
{
|
||||
ParallelTestHelper.Repeat (delegate {
|
||||
@@ -362,5 +366,20 @@ namespace MonoTests.System.Collections.Concurrent
|
||||
Assert.IsTrue (dict.Contains (validKeyPair));
|
||||
Assert.IsFalse (dict.Contains (wrongKeyPair));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void SerializationRoundTrip ()
|
||||
{
|
||||
var bf = new BinaryFormatter();
|
||||
|
||||
var cd = new ConcurrentDictionary<int, int>();
|
||||
cd[0] = 42;
|
||||
var ms = new MemoryStream();
|
||||
bf.Serialize(ms, cd);
|
||||
|
||||
ms.Seek(0, SeekOrigin.Begin);
|
||||
var result = (ConcurrentDictionary<int, int>) bf.Deserialize(ms);
|
||||
Assert.AreEqual (42, result [0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -50,6 +50,7 @@ namespace MonoTests.System.Collections.Concurrent
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("MultiThreaded")]
|
||||
public void StressEnqueueTestCase ()
|
||||
{
|
||||
/*ParallelTestHelper.Repeat (delegate {
|
||||
@@ -79,6 +80,7 @@ namespace MonoTests.System.Collections.Concurrent
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("MultiThreaded")]
|
||||
public void StressDequeueTestCase ()
|
||||
{
|
||||
/*ParallelTestHelper.Repeat (delegate {
|
||||
@@ -116,6 +118,7 @@ namespace MonoTests.System.Collections.Concurrent
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("MultiThreaded")]
|
||||
public void StressTryPeekTestCase ()
|
||||
{
|
||||
ParallelTestHelper.Repeat (delegate {
|
||||
|
@@ -46,6 +46,7 @@ namespace MonoTests.System.Collections.Concurrent
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("MultiThreaded")]
|
||||
public void StressPushTestCase ()
|
||||
{
|
||||
/*ParallelTestHelper.Repeat (delegate {
|
||||
@@ -74,6 +75,7 @@ namespace MonoTests.System.Collections.Concurrent
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("MultiThreaded")]
|
||||
public void StressPopTestCase ()
|
||||
{
|
||||
/*ParallelTestHelper.Repeat (delegate {
|
||||
|
@@ -43,6 +43,7 @@ namespace MonoTests.System.Collections.Concurrent
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("MultiThreaded")]
|
||||
public void CountTestCase()
|
||||
{
|
||||
const int numThread = 5;
|
||||
|
@@ -43,6 +43,7 @@ namespace MonoTests.System.Collections.Concurrent
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("MultiThreaded")]
|
||||
public void CountTestCase()
|
||||
{
|
||||
const int numThread = 5;
|
||||
|
@@ -37,7 +37,7 @@ namespace MonoTests.System.Collections.Concurrent
|
||||
public class PartitionerTests
|
||||
{
|
||||
[Test]
|
||||
[Category ("InterpreterNotWorking")]
|
||||
[Category ("NotWorkingRuntimeInterpreter")]
|
||||
public void PartitionerCreateIntegerWithExplicitRange ()
|
||||
{
|
||||
OrderablePartitioner<Tuple<int, int>> partitioner = Partitioner.Create (1, 20, 5);
|
||||
@@ -59,7 +59,7 @@ namespace MonoTests.System.Collections.Concurrent
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("InterpreterNotWorking")]
|
||||
[Category ("NotWorkingRuntimeInterpreter")]
|
||||
public void PartitionerCreateLongWithExplicitRange ()
|
||||
{
|
||||
OrderablePartitioner<Tuple<long, long>> partitioner = Partitioner.Create ((long)1, (long)20, (long)5);
|
||||
|
Reference in New Issue
Block a user