mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-10-24 17:30:46 +02:00
csharp: remove reference Microsoft.VisualStudio.QualityTools.UnitTestFramework
This commit is contained in:
@@ -1,33 +1,21 @@
|
|||||||
#define NUNIT
|
using System;
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Text;
|
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
#if !NUNIT
|
|
||||||
#error Currently, Not Supported
|
|
||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|
||||||
#else
|
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using TestClass = NUnit.Framework.TestFixtureAttribute;
|
|
||||||
using TestMethod = NUnit.Framework.TestAttribute;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace msgpack.tests
|
namespace msgpack.tests
|
||||||
{
|
{
|
||||||
[TestClass]
|
[TestFixture]
|
||||||
public class BoxingPackerTests
|
public class BoxingPackerTests
|
||||||
{
|
{
|
||||||
[TestMethod]
|
[Test]
|
||||||
public void NullTest ()
|
public void NullTest ()
|
||||||
{
|
{
|
||||||
BoxingPacker packer = new BoxingPacker ();
|
BoxingPacker packer = new BoxingPacker ();
|
||||||
Assert.IsNull (packer.Unpack (packer.Pack (null)));
|
Assert.IsNull (packer.Unpack (packer.Pack (null)));
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod]
|
[Test]
|
||||||
public void PrimitiveTypeTest ()
|
public void PrimitiveTypeTest ()
|
||||||
{
|
{
|
||||||
BoxingPacker packer = new BoxingPacker ();
|
BoxingPacker packer = new BoxingPacker ();
|
||||||
@@ -38,7 +26,7 @@ namespace msgpack.tests
|
|||||||
RoundtripTest<bool> (packer, false);
|
RoundtripTest<bool> (packer, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod]
|
[Test]
|
||||||
public void ArrayTest ()
|
public void ArrayTest ()
|
||||||
{
|
{
|
||||||
BoxingPacker packer = new BoxingPacker ();
|
BoxingPacker packer = new BoxingPacker ();
|
||||||
@@ -54,7 +42,7 @@ namespace msgpack.tests
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod]
|
[Test]
|
||||||
public void MapTest ()
|
public void MapTest ()
|
||||||
{
|
{
|
||||||
BoxingPacker packer = new BoxingPacker ();
|
BoxingPacker packer = new BoxingPacker ();
|
||||||
|
@@ -1,28 +1,13 @@
|
|||||||
#define NUNIT
|
using System;
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Text;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
|
||||||
#if !NUNIT
|
|
||||||
#error Currently, Not Supported
|
|
||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|
||||||
#else
|
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using TestClass = NUnit.Framework.TestFixtureAttribute;
|
|
||||||
using TestInitialize = NUnit.Framework.SetUpAttribute;
|
|
||||||
using TestCleanup = NUnit.Framework.TearDownAttribute;
|
|
||||||
using TestMethod = NUnit.Framework.TestAttribute;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace msgpack.tests
|
namespace msgpack.tests
|
||||||
{
|
{
|
||||||
[TestClass]
|
[TestFixture]
|
||||||
public class ReaderWriterTests
|
public class ReaderWriterTests
|
||||||
{
|
{
|
||||||
[TestMethod]
|
[Test]
|
||||||
public void SignedNumberTest ()
|
public void SignedNumberTest ()
|
||||||
{
|
{
|
||||||
long[] nums = new long[]{
|
long[] nums = new long[]{
|
||||||
@@ -91,7 +76,7 @@ namespace msgpack.tests
|
|||||||
}, expectedBytes);
|
}, expectedBytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod]
|
[Test]
|
||||||
public void UnsignedNumberTest ()
|
public void UnsignedNumberTest ()
|
||||||
{
|
{
|
||||||
ulong[] nums = new ulong[]{
|
ulong[] nums = new ulong[]{
|
||||||
@@ -142,7 +127,7 @@ namespace msgpack.tests
|
|||||||
}, expectedBytes);
|
}, expectedBytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod]
|
[Test]
|
||||||
public void NilTest ()
|
public void NilTest ()
|
||||||
{
|
{
|
||||||
byte[] expectedBytes = new byte[] {
|
byte[] expectedBytes = new byte[] {
|
||||||
@@ -157,7 +142,7 @@ namespace msgpack.tests
|
|||||||
}, expectedBytes);
|
}, expectedBytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod]
|
[Test]
|
||||||
public void BooleanTest ()
|
public void BooleanTest ()
|
||||||
{
|
{
|
||||||
byte[] expectedBytes = new byte[] {
|
byte[] expectedBytes = new byte[] {
|
||||||
@@ -175,7 +160,7 @@ namespace msgpack.tests
|
|||||||
}, expectedBytes);
|
}, expectedBytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod]
|
[Test]
|
||||||
public void FloatingPointTest ()
|
public void FloatingPointTest ()
|
||||||
{
|
{
|
||||||
byte[] expectedBytes = new byte[] {
|
byte[] expectedBytes = new byte[] {
|
||||||
@@ -196,7 +181,7 @@ namespace msgpack.tests
|
|||||||
}, expectedBytes);
|
}, expectedBytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod]
|
[Test]
|
||||||
public void RawTest ()
|
public void RawTest ()
|
||||||
{
|
{
|
||||||
Random rnd = new Random ();
|
Random rnd = new Random ();
|
||||||
@@ -241,7 +226,7 @@ namespace msgpack.tests
|
|||||||
}, expectedBytes);
|
}, expectedBytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod]
|
[Test]
|
||||||
public void ArrayMapRawHeaderTest ()
|
public void ArrayMapRawHeaderTest ()
|
||||||
{
|
{
|
||||||
int[] list = new int[] {
|
int[] list = new int[] {
|
||||||
|
@@ -35,7 +35,6 @@
|
|||||||
<StartupObject />
|
<StartupObject />
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
|
|
||||||
<Reference Include="nunit.framework, Version=2.5.10.11092, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
|
<Reference Include="nunit.framework, Version=2.5.10.11092, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
Reference in New Issue
Block a user