Refactored unit test method names to be prefixed with the type

This commit is contained in:
Alex Dyachenko 2014-05-20 15:37:16 -04:00
parent 77b2c4a5eb
commit 4cf01038d5
18 changed files with 397 additions and 397 deletions

File diff suppressed because it is too large Load Diff

View File

@ -26,7 +26,7 @@ namespace MPIR.Tests.HugeIntTests
public class Assignment
{
[TestMethod]
public void AssignCopy()
public void IntAssignCopy()
{
using (var a = new HugeInt("-222509832503450298345029835740293845720"))
using (var b = new HugeInt())
@ -37,7 +37,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void Swap()
public void IntSwap()
{
using (var a = new HugeInt("-222509832503450298345029835740293845720"))
using (var b = new HugeInt("2039847290878794872059384789347534534"))
@ -51,7 +51,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void CompoundOperators()
public void IntCompoundOperators()
{
using (var a = new HugeInt("938475092834705928347523452345"))
{

View File

@ -26,7 +26,7 @@ namespace MPIR.Tests.HugeIntTests
public class Bitwise
{
[TestMethod]
public void AndHugeInt()
public void IntAndHugeInt()
{
using (var a = new HugeInt("0x10123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"))
using (var b = new HugeInt("0x100000000000000000123456789ABCDEFFFFFFFFFFFFFFFFF"))
@ -38,7 +38,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void OrHugeInt()
public void IntOrHugeInt()
{
using (var a = new HugeInt("0x10123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"))
using (var b = new HugeInt("0x100000000000000000123456789ABCDEFFFFFFFFFFFFFFFFF"))
@ -50,7 +50,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void XorHugeInt()
public void IntXorHugeInt()
{
using (var a = new HugeInt("0x10123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"))
using (var b = new HugeInt("0x000000000000000000123456789ABCDEFFFFFFFFFFFFFFFFF"))
@ -62,7 +62,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void Not()
public void IntNot()
{
using (var a = new HugeInt("0x10123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"))
using (var c = new HugeInt())
@ -73,7 +73,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void PopCount()
public void IntPopCount()
{
using (var a = new HugeInt("0x1ABCDEF8984948281360922385394772450147012613851354303"))
{
@ -83,7 +83,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void HammingDistance()
public void IntHammingDistance()
{
using (var a = new HugeInt("0x1ABCDE08984948281360922385394772450147012613851354F03"))
using (var b = new HugeInt("0x1ABCDEF8984948281360922345394772450147012613851354303"))
@ -96,7 +96,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void FindBit()
public void IntFindBit()
{
using (var a = new HugeInt("0xA0000000000000000000800000000001"))
{
@ -131,7 +131,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void SetBit()
public void IntSetBit()
{
using (var a = new HugeInt("0xA0000000000000000000200000000001"))
{
@ -151,7 +151,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void GetBit()
public void IntGetBit()
{
using (var a = new HugeInt("0xA000000000000000000200000000001"))
{
@ -172,7 +172,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void ComplementBit()
public void IntComplementBit()
{
using (var a = new HugeInt("0xA0000000000000000000800000000001"))
{

View File

@ -28,7 +28,7 @@ namespace MPIR.Tests.HugeIntTests
#region CompareTo
[TestMethod]
public void CompareToHugeInt()
public void IntCompareToHugeInt()
{
using (var a = new HugeInt("-222509832503450298345029835740293845721"))
using (var b = new HugeInt("222509832503450298345029835740293845720"))
@ -41,7 +41,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void CompareToObject()
public void IntCompareToObject()
{
using (var a = new HugeInt("-222509832503450298345029835740293845721"))
using (var b = new HugeInt("222509832503450298345029835740293845720"))
@ -54,7 +54,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void CompareToExpression()
public void IntCompareToExpression()
{
using (var a = new HugeInt("-222509832503450298345029835740293845721"))
using (var b = new HugeInt("222509832503450298345029835740293845720"))
@ -68,7 +68,7 @@ namespace MPIR.Tests.HugeIntTests
[TestMethod]
[ExpectedException(typeof(ArgumentException))]
public void CompareToNonExpression()
public void IntCompareToNonExpression()
{
using (var a = new HugeInt("-222509832503450298345029835740293845721"))
{
@ -77,7 +77,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void CompareToLimb()
public void IntCompareToLimb()
{
using (var a = new HugeInt("-222509821"))
{
@ -90,7 +90,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void CompareToSignedLimb()
public void IntCompareToSignedLimb()
{
using (var a = new HugeInt("-222509821"))
{
@ -104,7 +104,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void CompareToSignedDouble()
public void IntCompareToSignedDouble()
{
using (var a = new HugeInt("-222509821"))
{
@ -122,7 +122,7 @@ namespace MPIR.Tests.HugeIntTests
#region comparison operators with expr
[TestMethod]
public void OperatorLessThan()
public void IntOperatorLessThan()
{
using (var a = new HugeInt("-222509832503450298345029835740293845721"))
using (var b = new HugeInt("222509832503450298345029835740293845720"))
@ -138,7 +138,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void OperatorLessThanOrEqual()
public void IntOperatorLessThanOrEqual()
{
using (var a = new HugeInt("-222509832503450298345029835740293845721"))
using (var b = new HugeInt("222509832503450298345029835740293845720"))
@ -154,7 +154,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void OperatorGreaterThan()
public void IntOperatorGreaterThan()
{
using (var a = new HugeInt("-222509832503450298345029835740293845721"))
using (var b = new HugeInt("222509832503450298345029835740293845720"))
@ -170,7 +170,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void OperatorGreaterThanOrEqual()
public void IntOperatorGreaterThanOrEqual()
{
using (var a = new HugeInt("-222509832503450298345029835740293845721"))
using (var b = new HugeInt("222509832503450298345029835740293845720"))
@ -190,7 +190,7 @@ namespace MPIR.Tests.HugeIntTests
#region comparison operators with limb
[TestMethod]
public void OperatorLessThanLimb()
public void IntOperatorLessThanLimb()
{
using (var a = new HugeInt("3845721"))
{
@ -204,7 +204,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void OperatorLessThanOrEqualLimb()
public void IntOperatorLessThanOrEqualLimb()
{
using (var a = new HugeInt("3845721"))
{
@ -221,7 +221,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void OperatorGreaterThanLimb()
public void IntOperatorGreaterThanLimb()
{
using (var a = new HugeInt("3845721"))
{
@ -235,7 +235,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void OperatorGreaterThanOrEqualLimb()
public void IntOperatorGreaterThanOrEqualLimb()
{
using (var a = new HugeInt("3845721"))
{
@ -256,7 +256,7 @@ namespace MPIR.Tests.HugeIntTests
#region comparison operators with signed limb
[TestMethod]
public void OperatorLessThanSignedLimb()
public void IntOperatorLessThanSignedLimb()
{
using (var a = new HugeInt("-3845721"))
{
@ -270,7 +270,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void OperatorLessThanOrEqualSignedLimb()
public void IntOperatorLessThanOrEqualSignedLimb()
{
using (var a = new HugeInt("-3845721"))
{
@ -287,7 +287,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void OperatorGreaterThanSignedLimb()
public void IntOperatorGreaterThanSignedLimb()
{
using (var a = new HugeInt("-3845721"))
{
@ -301,7 +301,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void OperatorGreaterThanOrEqualSignedLimb()
public void IntOperatorGreaterThanOrEqualSignedLimb()
{
using (var a = new HugeInt("-3845721"))
{
@ -322,7 +322,7 @@ namespace MPIR.Tests.HugeIntTests
#region comparison operators with double
[TestMethod]
public void OperatorLessThanDouble()
public void IntOperatorLessThanDouble()
{
using (var a = new HugeInt("-3845721"))
{
@ -336,7 +336,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void OperatorLessThanOrEqualDouble()
public void IntOperatorLessThanOrEqualDouble()
{
using (var a = new HugeInt("-3845721"))
{
@ -353,7 +353,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void OperatorGreaterThanDouble()
public void IntOperatorGreaterThanDouble()
{
using (var a = new HugeInt("-3845721"))
{
@ -367,7 +367,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void OperatorGreaterThanOrEqualDouble()
public void IntOperatorGreaterThanOrEqualDouble()
{
using (var a = new HugeInt("-3845721"))
{
@ -389,7 +389,7 @@ namespace MPIR.Tests.HugeIntTests
#region Equals
[TestMethod]
public void EqualsHugeInt()
public void IntEqualsHugeInt()
{
using (var a = new HugeInt("-222509832503450298345029835740293845721"))
using (var b = new HugeInt("222509832503450298345029835740293845720"))
@ -403,7 +403,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void EqualsExpression()
public void IntEqualsExpression()
{
using (var a = new HugeInt("-222509832503450298345029835740293845721"))
using (var b = new HugeInt("222509832503450298345029835740293845720"))
@ -416,7 +416,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void EqualsNonExpression()
public void IntEqualsNonExpression()
{
using (var a = new HugeInt("-222509832503450298345029835740293845721"))
{
@ -425,7 +425,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void EqualsLimb()
public void IntEqualsLimb()
{
using (var a = new HugeInt("222509832503"))
{
@ -437,7 +437,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void EqualsSignedLimb()
public void IntEqualsSignedLimb()
{
using (var a = new HugeInt("-222509832505"))
{
@ -449,7 +449,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void EqualsDouble()
public void IntEqualsDouble()
{
using (var a = new HugeInt("-222509832505"))
{
@ -466,7 +466,7 @@ namespace MPIR.Tests.HugeIntTests
#region Equality operators with expr
[TestMethod]
public void EqualsOperatorHugeInt()
public void IntEqualsOperatorHugeInt()
{
using (var a = new HugeInt("-222509832503450298345029835740293845721"))
using (var b = new HugeInt("222509832503450298345029835740293845720"))
@ -479,7 +479,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void NotEqualOperatorHugeInt()
public void IntNotEqualOperatorHugeInt()
{
using (var a = new HugeInt("-222509832503450298345029835740293845721"))
using (var b = new HugeInt("222509832503450298345029835740293845720"))
@ -496,7 +496,7 @@ namespace MPIR.Tests.HugeIntTests
#region Equality operators with Limb
[TestMethod]
public void EqualsOperatorLimb()
public void IntEqualsOperatorLimb()
{
using (var a = new HugeInt("-835740293845721"))
{
@ -508,7 +508,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void NotEqualOperatorLimb()
public void IntNotEqualOperatorLimb()
{
using (var a = new HugeInt("-835740293845721"))
{
@ -524,7 +524,7 @@ namespace MPIR.Tests.HugeIntTests
#region Equality operators with Signed Limb
[TestMethod]
public void EqualsOperatorSignedLimb()
public void IntEqualsOperatorSignedLimb()
{
using (var a = new HugeInt("-835740293845721"))
{
@ -536,7 +536,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void NotEqualOperatorSignedLimb()
public void IntNotEqualOperatorSignedLimb()
{
using (var a = new HugeInt("-835740293845721"))
{
@ -552,7 +552,7 @@ namespace MPIR.Tests.HugeIntTests
#region Equality operators with Double
[TestMethod]
public void EqualsOperatorDouble()
public void IntEqualsOperatorDouble()
{
using (var a = new HugeInt("-835740293845721"))
{
@ -565,7 +565,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void NotEqualOperatorDouble()
public void IntNotEqualOperatorDouble()
{
using (var a = new HugeInt("-835740293845721"))
{
@ -582,7 +582,7 @@ namespace MPIR.Tests.HugeIntTests
#region GetHashCode
[TestMethod]
public void GetHashCodeTest()
public void IntGetHashCodeTest()
{
using (var a = new HugeInt("-222509832503450298345029835740293845721"))
{
@ -597,7 +597,7 @@ namespace MPIR.Tests.HugeIntTests
#region CompareAbsTo
[TestMethod]
public void CompareAbsToHugeInt()
public void IntCompareAbsToHugeInt()
{
using (var a = new HugeInt("-222509832503450298345029835740293845721"))
using (var b = new HugeInt("222509832503450298345029835740293845720"))
@ -611,7 +611,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void CompareAbsToLimb()
public void IntCompareAbsToLimb()
{
using (var a = new HugeInt("-222509821"))
{
@ -626,7 +626,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void CompareAbsToDouble()
public void IntCompareAbsToDouble()
{
using (var a = new HugeInt("-222509821"))
{
@ -647,7 +647,7 @@ namespace MPIR.Tests.HugeIntTests
#region Sign
[TestMethod]
public void Sign()
public void IntSign()
{
using (var a = new HugeInt("-222509832503450298345029835740293845721"))
{

View File

@ -26,7 +26,7 @@ namespace MPIR.Tests.HugeIntTests
public class ConstructionAndDisposal
{
[TestMethod]
public void DefaultConstructor()
public void IntDefaultConstructor()
{
using (var a = new HugeInt())
{
@ -38,7 +38,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void Dispose()
public void IntDispose()
{
var a = new HugeInt();
a.Dispose();
@ -48,7 +48,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void ConstructorFromLong()
public void IntConstructorFromLong()
{
var n = "123456789123456";
using (var a = new HugeInt(long.Parse(n)))
@ -60,7 +60,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void ConstructorFromLongNegative()
public void IntConstructorFromLongNegative()
{
var n = "-123456789123456";
using (var a = new HugeInt(long.Parse(n)))
@ -72,7 +72,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void ConstructorFromULong()
public void IntConstructorFromULong()
{
using (var a = new HugeInt(ulong.MaxValue))
{
@ -83,7 +83,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void ConstructorFromDouble()
public void IntConstructorFromDouble()
{
using (var a = new HugeInt(123456789123456.9))
{
@ -92,7 +92,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void ConstructorFromPower()
public void IntConstructorFromPower()
{
using (var a = new HugeInt(HugeInt.Power(10, 41)))
{
@ -101,7 +101,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void ConstructorFromDoubleNegative()
public void IntConstructorFromDoubleNegative()
{
using (var a = new HugeInt(-123456789123456.9))
{
@ -110,7 +110,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void Allocate()
public void IntAllocate()
{
using (var a = HugeInt.Allocate(129))
{
@ -121,7 +121,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void Reallocate()
public void IntReallocate()
{
using (var a = new HugeInt("543209879487374938579837"))
{
@ -143,7 +143,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void StringConstructor()
public void IntStringConstructor()
{
var n = "5432109876543212345789023245987";
using (var a = new HugeInt(n))
@ -155,13 +155,13 @@ namespace MPIR.Tests.HugeIntTests
[TestMethod]
[ExpectedException(typeof(ArgumentException))]
public void StringConstructorInvalid()
public void IntStringConstructorInvalid()
{
var a = new HugeInt("12345A");
}
[TestMethod]
public void StringConstructorHex()
public void IntStringConstructorHex()
{
using (var a = new HugeInt("143210ABCDEF32123457ACDB324598799", 16))
{
@ -170,7 +170,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void StringConstructorHexPrefix()
public void IntStringConstructorHexPrefix()
{
var n = "143210ABCDEF32123457ACDB324598799";
using (var a = new HugeInt("0x" + n))
@ -180,7 +180,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void StringAssignmentHexPrefix()
public void IntStringAssignmentHexPrefix()
{
var n = "143210ABCDEF32123457ACDB324598799";
using (var a = new HugeInt("0x" + n))
@ -194,7 +194,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void ConstructorFromExpression()
public void IntConstructorFromExpression()
{
using (var a = new HugeInt("2340958273409578234095823045723490587"))
using (var b = new HugeInt(a + 1))

View File

@ -27,7 +27,7 @@ namespace MPIR.Tests.HugeIntTests
public class Conversions
{
[TestMethod]
public void ToStringDecimal()
public void IntToStringDecimal()
{
var n = "-23429384756298357462983476598345623984756";
using (var a = new HugeInt(n))
@ -37,7 +37,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void ToStringHex()
public void IntToStringHex()
{
var n = "-23429abcdef298357462983fedcba345623984756";
using (var a = new HugeInt(n, 16))
@ -48,7 +48,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void ToAndFromUlong()
public void IntToAndFromUlong()
{
using (var a = new HugeInt())
{
@ -63,7 +63,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void ToAndFromLong()
public void IntToAndFromLong()
{
using (var a = new HugeInt())
{
@ -77,7 +77,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void ToAndFromDouble()
public void IntToAndFromDouble()
{
using (var a = new HugeInt())
using (var lo = new HugeInt())
@ -105,7 +105,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void FromString()
public void IntFromString()
{
using (var a = new HugeInt())
{
@ -121,7 +121,7 @@ namespace MPIR.Tests.HugeIntTests
[TestMethod]
[ExpectedException(typeof(ArgumentException))]
public void FromInvalidString()
public void IntFromInvalidString()
{
using (var a = new HugeInt())
{
@ -130,7 +130,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void ToStringTruncated()
public void IntToStringTruncated()
{
var n = string.Concat("123456789".Select(c => new string(c, 30)));
using (var a = new HugeInt(n))
@ -143,7 +143,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void FitsUlong()
public void IntFitsUlong()
{
using (var a = new HugeInt(ulong.MaxValue))
{
@ -158,7 +158,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void FitsLong()
public void IntFitsLong()
{
using (var a = new HugeInt(long.MaxValue))
{
@ -173,7 +173,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void FitsUint()
public void IntFitsUint()
{
using (var a = new HugeInt(uint.MaxValue))
{
@ -188,7 +188,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void FitsInt()
public void IntFitsInt()
{
using (var a = new HugeInt(int.MaxValue))
{
@ -203,7 +203,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void FitsUshort()
public void IntFitsUshort()
{
using (var a = new HugeInt(ushort.MaxValue))
{
@ -218,7 +218,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void FitsShort()
public void IntFitsShort()
{
using (var a = new HugeInt(short.MaxValue))
{
@ -233,7 +233,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void ApproximateSizeInBase()
public void IntApproximateSizeInBase()
{
using (var a = new HugeInt("2983475029834750293429834750298347502934298347502983475029342983475029834750293429834750298347502934"))
{

View File

@ -31,7 +31,7 @@ namespace MPIR.Tests.HugeIntTests
public class ExpressionTests
{
[TestMethod]
public void TestAllExpressions()
public void IntTestAllExpressions()
{
var baseExpr = typeof(IntegerExpression);
var allExpressions =

View File

@ -29,7 +29,7 @@ namespace MPIR.Tests.HugeIntTests
public class IO
{
[TestMethod]
public void InputOutputRaw()
public void IntInputOutputRaw()
{
using (var a = new HugeInt("0x10123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"))
using (var b = new HugeInt())
@ -45,7 +45,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void InputOutputStr()
public void IntInputOutputStr()
{
using (var a = new HugeInt("0x10123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"))
using (var b = new HugeInt())
@ -66,7 +66,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void InputOutputStrHex()
public void IntInputOutputStrHex()
{
using (var a = new HugeInt("0x10123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"))
using (var b = new HugeInt())
@ -91,7 +91,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void InputOutputStrHexLower()
public void IntInputOutputStrHexLower()
{
using (var a = new HugeInt("0x10123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"))
using (var b = new HugeInt())
@ -116,7 +116,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void InputOutputStrOctal()
public void IntInputOutputStrOctal()
{
using (var a = new HugeInt("0x10123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"))
using (var b = new HugeInt())
@ -141,7 +141,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void InputOutputStrBinary()
public void IntInputOutputStrBinary()
{
using (var a = new HugeInt("0x10123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"))
using (var b = new HugeInt())
@ -166,7 +166,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void InputOutputStr62()
public void IntInputOutputStr62()
{
using (var a = new HugeInt("0x10123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"))
using (var b = new HugeInt())
@ -188,7 +188,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void ImportExport()
public void IntImportExport()
{
using (var a = new HugeInt("0x10123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"))
using (var b = new HugeInt())
@ -212,7 +212,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void ImportExportAllocating()
public void IntImportExportAllocating()
{
using (var a = new HugeInt("0x10123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"))
using (var b = new HugeInt())
@ -234,7 +234,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void ImportExportAllocatingShort()
public void IntImportExportAllocatingShort()
{
using (var a = new HugeInt("0x10123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"))
using (var b = new HugeInt())
@ -256,7 +256,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void ImportExportAllocatingZero()
public void IntImportExportAllocatingZero()
{
using (var a = new HugeInt())
using (var b = new HugeInt())
@ -276,7 +276,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void Size()
public void IntSize()
{
using (var a = new HugeInt("-0x10123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"))
{
@ -286,7 +286,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void GetLimb()
public void IntGetLimb()
{
using (var a = new HugeInt("-0x10123456789ABCDEFA123456789ABCDEF0123456789ABCDEF"))
{

View File

@ -28,7 +28,7 @@ namespace MPIR.Tests.HugeIntTests
#region Exponentiation
[TestMethod]
public void PowerModHugeInt()
public void IntPowerModHugeInt()
{
using (var a = new HugeInt("2835698356928736487698769283645293409781234"))
using (var b = new HugeInt("3"))
@ -40,7 +40,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void PowerModLimb()
public void IntPowerModLimb()
{
using (var a = new HugeInt("2835698356928736487698769283645293409781234"))
using (var c = new HugeInt("9786459872639458729387304958673243509870923452745892673402935742456"))
@ -51,7 +51,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void PowerLimb()
public void IntPowerLimb()
{
using (var a = new HugeInt("9785412309485720938412983404349"))
{
@ -65,7 +65,7 @@ namespace MPIR.Tests.HugeIntTests
#region Roots
[TestMethod]
public void Root()
public void IntRoot()
{
var n = "8984948281360922385394772450147012613851354303";
using (var a = new HugeInt(n))
@ -93,7 +93,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void SquareRoot()
public void IntSquareRoot()
{
var n = "8984948281360922385394772450147012613851354303";
using (var a = new HugeInt(n))
@ -113,7 +113,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void IsPerfectPower()
public void IntIsPerfectPower()
{
using (var a = new HugeInt("8984948281360922385394772450147012613851354303"))
using (var b = new HugeInt())
@ -130,7 +130,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void IsPerfectSquare()
public void IntIsPerfectSquare()
{
using (var a = new HugeInt("8984948281360922385394772450147012613851354303"))
using (var b = new HugeInt())

View File

@ -29,7 +29,7 @@ namespace MPIR.Tests.HugeIntTests
public class NumberTheoretic
{
[TestMethod]
public void IsProbablePrime()
public void IntIsProbablePrime()
{
using (var a = new HugeInt("622288097498926496141095869268883999563096063592498055290461"))
using (var random = MpirRandom.Default())
@ -41,7 +41,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void IsLikelyPrime()
public void IntIsLikelyPrime()
{
using (var a = new HugeInt("622288097498926496141095869268883999563096063592498055290461"))
using (var random = MpirRandom.Default())
@ -53,7 +53,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void NextPrimeCandidate()
public void IntNextPrimeCandidate()
{
using (var a = new HugeInt("622288097498926496141095869268883999563096063592498055290460"))
using (var random = MpirRandom.Default())
@ -63,7 +63,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void Gcd()
public void IntGcd()
{
using (var a = new HugeInt("29927402397991286489627837734179186385188296382227"))
using (var b = new HugeInt())
@ -76,7 +76,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void GcdExt()
public void IntGcdExt()
{
using (var a = new HugeInt(12))
using (var b = new HugeInt(21))
@ -92,7 +92,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void GcdExt1()
public void IntGcdExt1()
{
using (var a = new HugeInt(12))
using (var b = new HugeInt(21))
@ -106,7 +106,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void GcdExt2()
public void IntGcdExt2()
{
using (var a = new HugeInt(12))
using (var b = new HugeInt(21))
@ -120,7 +120,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void GcdLimb()
public void IntGcdLimb()
{
using (var a = new HugeInt("29927402397991286489627837734179186385188296382227"))
{
@ -130,7 +130,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void Lcm()
public void IntLcm()
{
using (var a = new HugeInt("29927402397991286489627837734179186385188296382227"))
{
@ -141,7 +141,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void LcmLimb()
public void IntLcmLimb()
{
using (var a = new HugeInt("29927402397991286489627837734179186385188296382227"))
{
@ -151,7 +151,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void Invert()
public void IntInvert()
{
using (var a = new HugeInt("29927402397991286489627837734179186385188296382227"))
using (var m = new HugeInt("622288097498926496141095869268883999563096063592498055290461"))
@ -164,7 +164,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void Jacobi()
public void IntJacobi()
{
using (var a = new HugeInt("9288562863495827364985273645298367452"))
using (var b = new HugeInt("876428957629387610928574612341"))
@ -174,7 +174,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void Legendre()
public void IntLegendre()
{
using (var a = new HugeInt("9288562863495827364985273645298367452"))
using (var p = new HugeInt("29927402397991286489627837734179186385188296382227"))
@ -184,7 +184,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void Kronecker()
public void IntKronecker()
{
using (var a = new HugeInt("9288562863495827364985273645298367452"))
using (var b = new HugeInt("29927402397991286489627837734179186385188296382227"))
@ -199,7 +199,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void RemoveFactors()
public void IntRemoveFactors()
{
using (var a = new HugeInt("9288562863495827364985273645298367452"))
using (var b = new HugeInt("29927402397991286489627837734179186385188296382227"))
@ -212,7 +212,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void Factorial()
public void IntFactorial()
{
using (var a = new HugeInt(HugeInt.Factorial(30)))
using (var b = new HugeInt("50"))
@ -232,7 +232,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void Primorial()
public void IntPrimorial()
{
var N = 256;
var sieve = new bool[N];
@ -252,7 +252,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void Binomial()
public void IntBinomial()
{
using (var a = new HugeInt(HugeInt.Binomial(40, 15)))
using (var b = new HugeInt("41"))
@ -264,7 +264,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void Fibonacci()
public void IntFibonacci()
{
using (var a = new HugeInt(HugeInt.Fibonacci(300)))
using (var b = new HugeInt())
@ -284,7 +284,7 @@ namespace MPIR.Tests.HugeIntTests
}
[TestMethod]
public void Lucas()
public void IntLucas()
{
using (var f299 = new HugeInt())
using (var f300 = new HugeInt(HugeInt.Fibonacci(300).SavingPreviousTo(f299)))

View File

@ -28,7 +28,7 @@ namespace MPIR.Tests.HugeRationalTests
#region Add
[TestMethod]
public void AddHugeRational()
public void RationalAddHugeRational()
{
using (var a = new HugeRational("222509832503450298345029835740293845720"))
using (var b = new HugeRational("222987435987982730594288574029879874539"))
@ -40,7 +40,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void AddLimb()
public void RationalAddLimb()
{
using (var a = new HugeRational("222509832503450298345029835740293845720"))
{
@ -51,7 +51,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void AddToLimb()
public void RationalAddToLimb()
{
using (var a = new HugeRational("222509832503450298345029835740293845720"))
{
@ -62,7 +62,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void AddSignedLimb()
public void RationalAddSignedLimb()
{
using (var a = new HugeRational("222509832503450298345029835740293845720"))
{
@ -73,7 +73,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void AddToSignedLimb()
public void RationalAddToSignedLimb()
{
using (var a = new HugeRational("222509832503450298345029835740293845720"))
{
@ -84,7 +84,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void AddToMaxSignedLimb()
public void RationalAddToMaxSignedLimb()
{
using (var a = new HugeRational("222509832503450298345029835740293845720"))
{
@ -95,7 +95,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void AddExpressionHugeRational()
public void RationalAddExpressionHugeRational()
{
using (var a = new HugeRational("222509832503450298345029835740293845720"))
using (var b = new HugeRational("222987435987982730594288574029879874539"))
@ -111,7 +111,7 @@ namespace MPIR.Tests.HugeRationalTests
#region Subtract
[TestMethod]
public void SubtractHugeRational()
public void RationalSubtractHugeRational()
{
using (var a = new HugeRational("445497268491433028939318409770173720259"))
using (var b = new HugeRational("222987435987982730594288574029879874539"))
@ -122,7 +122,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void SubtractLimb()
public void RationalSubtractLimb()
{
using (var a = new HugeRational("222509832503450298349318409770173720259"))
{
@ -133,7 +133,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void SubtractFromLimb()
public void RationalSubtractFromLimb()
{
using (var a = new HugeRational("222509832503450298349318409770173720259"))
{
@ -144,7 +144,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void SubtractPositiveSignedLimb()
public void RationalSubtractPositiveSignedLimb()
{
using (var a = new HugeRational("222509832503450298349318409770173720259"))
{
@ -155,7 +155,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void SubtractFromPositiveSignedLimb()
public void RationalSubtractFromPositiveSignedLimb()
{
using (var a = new HugeRational("222509832503450298349318409770173720259"))
{
@ -166,7 +166,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void SubtractSignedLimb()
public void RationalSubtractSignedLimb()
{
using (var a = new HugeRational("222509832503450298345029835740293845720"))
{
@ -177,7 +177,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void SubtractFromSignedLimb()
public void RationalSubtractFromSignedLimb()
{
using (var a = new HugeRational("222509832503450298345029835740293845720"))
{
@ -192,7 +192,7 @@ namespace MPIR.Tests.HugeRationalTests
#region Multiply
[TestMethod]
public void MultiplyByHugeRational()
public void RationalMultiplyByHugeRational()
{
using (var a = new HugeRational("90234098723098475098479385345098345"))
using (var b = new HugeRational("7859487359873459872354987610987897"))
@ -203,7 +203,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void MultiplyByLimb()
public void RationalMultiplyByLimb()
{
using (var a = new HugeRational("90234098723098475098479385345098345"))
{
@ -214,7 +214,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void MultiplyLimbBy()
public void RationalMultiplyLimbBy()
{
using (var a = new HugeRational("90234098723098475098479385345098345"))
{
@ -225,7 +225,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void MultiplyBySignedLimb()
public void RationalMultiplyBySignedLimb()
{
using (var a = new HugeRational("90234098723098475098479385345098345"))
{
@ -236,7 +236,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void MultiplySignedLimbBy()
public void RationalMultiplySignedLimbBy()
{
using (var a = new HugeRational("90234098723098475098479385345098345"))
{
@ -251,7 +251,7 @@ namespace MPIR.Tests.HugeRationalTests
#region Add Product
[TestMethod]
public void AddProductHugeRational()
public void RationalAddProductHugeRational()
{
using (var a = new HugeRational("98750293847520938457029384572093480498357"))
using (var c = new HugeRational("23094582093845093574093845093485039450934"))
@ -264,7 +264,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void AddProductLimb()
public void RationalAddProductLimb()
{
using (var a = new HugeRational("98750293847520938457029384572093480498357"))
using (var c = new HugeRational("-23094582093845093574093845093485039450934"))
@ -277,7 +277,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void AddProductLimbTo()
public void RationalAddProductLimbTo()
{
using (var a = new HugeRational("98750293847520938457029384572093480498357"))
using (var c = new HugeRational("-23094582093845093574093845093485039450934"))
@ -290,7 +290,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void AddProductLimbTo2()
public void RationalAddProductLimbTo2()
{
using (var a = new HugeRational("98750293847520938457029384572093480498357"))
using (var c = new HugeRational("-23094582093845093574093845093485039450934"))
@ -303,7 +303,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void AddProductLimbTo3()
public void RationalAddProductLimbTo3()
{
using (var a = new HugeRational("98750293847520938457029384572093480498357"))
using (var c = new HugeRational("-23094582093845093574093845093485039450934"))
@ -317,7 +317,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void AddProductSignedLimb()
public void RationalAddProductSignedLimb()
{
using (var a = new HugeRational("98750293847520938457029384572093480498357"))
using (var c = new HugeRational("23094582093845093574093845093485039450934"))
@ -330,7 +330,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void AddProductSignedLimbTo()
public void RationalAddProductSignedLimbTo()
{
using (var a = new HugeRational("98750293847520938457029384572093480498357"))
using (var c = new HugeRational("-23094582093845093574093845093485039450934"))
@ -343,7 +343,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void AddProductSignedLimbTo2()
public void RationalAddProductSignedLimbTo2()
{
using (var a = new HugeRational("98750293847520938457029384572093480498357"))
using (var c = new HugeRational("-23094582093845093574093845093485039450934"))
@ -356,7 +356,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void AddProductSignedLimbTo3()
public void RationalAddProductSignedLimbTo3()
{
using (var a = new HugeRational("98750293847520938457029384572093480498357"))
using (var c = new HugeRational("23094582093845093574093845093485039450934"))
@ -374,7 +374,7 @@ namespace MPIR.Tests.HugeRationalTests
#region Subtract Product
[TestMethod]
public void SubtractProductHugeRational()
public void RationalSubtractProductHugeRational()
{
using (var a = new HugeRational("98750293847520938457029384572093480498357"))
using (var c = new HugeRational("23094582093845093574093845093485039450934"))
@ -387,7 +387,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void SubtractProductLimb()
public void RationalSubtractProductLimb()
{
using (var a = new HugeRational("98750293847520938457029384572093480498357"))
using (var c = new HugeRational("23094582093845093574093845093485039450934"))
@ -400,7 +400,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void SubtractProductSignedLimb()
public void RationalSubtractProductSignedLimb()
{
using (var a = new HugeRational("98750293847520938457029384572093480498357"))
using (var c = new HugeRational("-23094582093845093574093845093485039450934"))
@ -413,7 +413,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void SubtractProductSignedLimb2()
public void RationalSubtractProductSignedLimb2()
{
using (var a = new HugeRational("98750293847520938457029384572093480498357"))
using (var c = new HugeRational("-23094582093845093574093845093485039450934"))
@ -425,7 +425,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void SubtractProductSignedLimb3()
public void RationalSubtractProductSignedLimb3()
{
using (var a = new HugeRational("98750293847520938457029384572093480498357"))
using (var c = new HugeRational("23094582093845093574093845093485039450934"))
@ -442,7 +442,7 @@ namespace MPIR.Tests.HugeRationalTests
#region Shift Left
[TestMethod]
public void ShiftLeft()
public void RationalShiftLeft()
{
using (var a = new HugeRational("-12345700987ABCDEF2345CBDEFA245230948", 16))
{
@ -457,7 +457,7 @@ namespace MPIR.Tests.HugeRationalTests
#region Shift Right
[TestMethod]
public void ShiftRight()
public void RationalShiftRight()
{
using (var a = new HugeRational("ABCDEF052834524092854092874502983745029345723098457209305983434345", 16))
{
@ -472,7 +472,7 @@ namespace MPIR.Tests.HugeRationalTests
#region Negate
[TestMethod]
public void Negate()
public void RationalNegate()
{
using (var a = new HugeRational("24092854092874502983745029345723098457209"))
{
@ -488,7 +488,7 @@ namespace MPIR.Tests.HugeRationalTests
#region Abs
[TestMethod]
public void MakeAbsolute()
public void RationalMakeAbsolute()
{
using (var a = new HugeRational("-24092854092874502983745029345723098457209"))
{
@ -506,7 +506,7 @@ namespace MPIR.Tests.HugeRationalTests
#region Int
[TestMethod]
public void DivideHugeRational()
public void RationalDivideHugeRational()
{
using (var a = new HugeRational("234052834524092854092874502983745029345723098457209305983434345"))
using (var b = new HugeRational("394580293847502987609283945873594873409587"))
@ -521,7 +521,7 @@ namespace MPIR.Tests.HugeRationalTests
#region Limb
[TestMethod]
public void DivideLimb()
public void RationalDivideLimb()
{
using (var a = new HugeRational("234052834524092854092874502983745029345723098457209305983434345"))
{

View File

@ -26,7 +26,7 @@ namespace MPIR.Tests.HugeRationalTests
public class Assignment
{
[TestMethod]
public void AssignCopy()
public void RationalAssignCopy()
{
using (var a = new HugeRational("-222509832503450298345029835740293845720"))
using (var b = new HugeRational())
@ -37,7 +37,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void Swap()
public void RationalSwap()
{
using (var a = new HugeRational("-222509832503450298345029835740293845720"))
using (var b = new HugeRational("2039847290878794872059384789347534534"))
@ -51,7 +51,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void CompoundOperators()
public void RationalCompoundOperators()
{
using (var a = new HugeRational("938475092834705928347523452345"))
{

View File

@ -28,7 +28,7 @@ namespace MPIR.Tests.HugeRationalTests
#region CompareTo
[TestMethod]
public void CompareToHugeRational()
public void RationalCompareToHugeRational()
{
using (var a = new HugeRational("-222509832503450298345029835740293845721"))
using (var b = new HugeRational("222509832503450298345029835740293845720"))
@ -41,7 +41,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void CompareToObject()
public void RationalCompareToObject()
{
using (var a = new HugeRational("-222509832503450298345029835740293845721"))
using (var b = new HugeRational("222509832503450298345029835740293845720"))
@ -54,7 +54,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void CompareToExpression()
public void RationalCompareToExpression()
{
using (var a = new HugeRational("-222509832503450298345029835740293845721"))
using (var b = new HugeRational("222509832503450298345029835740293845720"))
@ -68,7 +68,7 @@ namespace MPIR.Tests.HugeRationalTests
[TestMethod]
[ExpectedException(typeof(ArgumentException))]
public void CompareToNonExpression()
public void RationalCompareToNonExpression()
{
using (var a = new HugeRational("-222509832503450298345029835740293845721"))
{
@ -77,7 +77,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void CompareToLimb()
public void RationalCompareToLimb()
{
using (var a = new HugeRational("-222509821"))
{
@ -90,7 +90,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void CompareToSignedLimb()
public void RationalCompareToSignedLimb()
{
using (var a = new HugeRational("-222509821"))
{
@ -104,7 +104,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void CompareToSignedDouble()
public void RationalCompareToSignedDouble()
{
using (var a = new HugeRational("-222509821"))
{
@ -122,7 +122,7 @@ namespace MPIR.Tests.HugeRationalTests
#region comparison operators with expr
[TestMethod]
public void OperatorLessThan()
public void RationalOperatorLessThan()
{
using (var a = new HugeRational("-222509832503450298345029835740293845721"))
using (var b = new HugeRational("222509832503450298345029835740293845720"))
@ -138,7 +138,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void OperatorLessThanOrEqual()
public void RationalOperatorLessThanOrEqual()
{
using (var a = new HugeRational("-222509832503450298345029835740293845721"))
using (var b = new HugeRational("222509832503450298345029835740293845720"))
@ -154,7 +154,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void OperatorGreaterThan()
public void RationalOperatorGreaterThan()
{
using (var a = new HugeRational("-222509832503450298345029835740293845721"))
using (var b = new HugeRational("222509832503450298345029835740293845720"))
@ -170,7 +170,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void OperatorGreaterThanOrEqual()
public void RationalOperatorGreaterThanOrEqual()
{
using (var a = new HugeRational("-222509832503450298345029835740293845721"))
using (var b = new HugeRational("222509832503450298345029835740293845720"))
@ -190,7 +190,7 @@ namespace MPIR.Tests.HugeRationalTests
#region comparison operators with limb
[TestMethod]
public void OperatorLessThanLimb()
public void RationalOperatorLessThanLimb()
{
using (var a = new HugeRational("3845721"))
{
@ -204,7 +204,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void OperatorLessThanOrEqualLimb()
public void RationalOperatorLessThanOrEqualLimb()
{
using (var a = new HugeRational("3845721"))
{
@ -221,7 +221,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void OperatorGreaterThanLimb()
public void RationalOperatorGreaterThanLimb()
{
using (var a = new HugeRational("3845721"))
{
@ -235,7 +235,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void OperatorGreaterThanOrEqualLimb()
public void RationalOperatorGreaterThanOrEqualLimb()
{
using (var a = new HugeRational("3845721"))
{
@ -256,7 +256,7 @@ namespace MPIR.Tests.HugeRationalTests
#region comparison operators with signed limb
[TestMethod]
public void OperatorLessThanSignedLimb()
public void RationalOperatorLessThanSignedLimb()
{
using (var a = new HugeRational("-3845721"))
{
@ -270,7 +270,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void OperatorLessThanOrEqualSignedLimb()
public void RationalOperatorLessThanOrEqualSignedLimb()
{
using (var a = new HugeRational("-3845721"))
{
@ -287,7 +287,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void OperatorGreaterThanSignedLimb()
public void RationalOperatorGreaterThanSignedLimb()
{
using (var a = new HugeRational("-3845721"))
{
@ -301,7 +301,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void OperatorGreaterThanOrEqualSignedLimb()
public void RationalOperatorGreaterThanOrEqualSignedLimb()
{
using (var a = new HugeRational("-3845721"))
{
@ -322,7 +322,7 @@ namespace MPIR.Tests.HugeRationalTests
#region comparison operators with double
[TestMethod]
public void OperatorLessThanDouble()
public void RationalOperatorLessThanDouble()
{
using (var a = new HugeRational("-3845721"))
{
@ -336,7 +336,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void OperatorLessThanOrEqualDouble()
public void RationalOperatorLessThanOrEqualDouble()
{
using (var a = new HugeRational("-3845721"))
{
@ -353,7 +353,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void OperatorGreaterThanDouble()
public void RationalOperatorGreaterThanDouble()
{
using (var a = new HugeRational("-3845721"))
{
@ -367,7 +367,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void OperatorGreaterThanOrEqualDouble()
public void RationalOperatorGreaterThanOrEqualDouble()
{
using (var a = new HugeRational("-3845721"))
{
@ -389,7 +389,7 @@ namespace MPIR.Tests.HugeRationalTests
#region Equals
[TestMethod]
public void EqualsHugeRational()
public void RationalEqualsHugeRational()
{
using (var a = new HugeRational("-222509832503450298345029835740293845721"))
using (var b = new HugeRational("222509832503450298345029835740293845720"))
@ -403,7 +403,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void EqualsExpression()
public void RationalEqualsExpression()
{
using (var a = new HugeRational("-222509832503450298345029835740293845721"))
using (var b = new HugeRational("222509832503450298345029835740293845720"))
@ -416,7 +416,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void EqualsNonExpression()
public void RationalEqualsNonExpression()
{
using (var a = new HugeRational("-222509832503450298345029835740293845721"))
{
@ -425,7 +425,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void EqualsLimb()
public void RationalEqualsLimb()
{
using (var a = new HugeRational("222509832503"))
{
@ -437,7 +437,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void EqualsSignedLimb()
public void RationalEqualsSignedLimb()
{
using (var a = new HugeRational("-222509832505"))
{
@ -449,7 +449,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void EqualsDouble()
public void RationalEqualsDouble()
{
using (var a = new HugeRational("-222509832505"))
{
@ -466,7 +466,7 @@ namespace MPIR.Tests.HugeRationalTests
#region Equality operators with expr
[TestMethod]
public void EqualsOperatorHugeRational()
public void RationalEqualsOperatorHugeRational()
{
using (var a = new HugeRational("-222509832503450298345029835740293845721"))
using (var b = new HugeRational("222509832503450298345029835740293845720"))
@ -479,7 +479,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void NotEqualOperatorHugeRational()
public void RationalNotEqualOperatorHugeRational()
{
using (var a = new HugeRational("-222509832503450298345029835740293845721"))
using (var b = new HugeRational("222509832503450298345029835740293845720"))
@ -496,7 +496,7 @@ namespace MPIR.Tests.HugeRationalTests
#region Equality operators with Limb
[TestMethod]
public void EqualsOperatorLimb()
public void RationalEqualsOperatorLimb()
{
using (var a = new HugeRational("-835740293845721"))
{
@ -508,7 +508,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void NotEqualOperatorLimb()
public void RationalNotEqualOperatorLimb()
{
using (var a = new HugeRational("-835740293845721"))
{
@ -524,7 +524,7 @@ namespace MPIR.Tests.HugeRationalTests
#region Equality operators with Signed Limb
[TestMethod]
public void EqualsOperatorSignedLimb()
public void RationalEqualsOperatorSignedLimb()
{
using (var a = new HugeRational("-835740293845721"))
{
@ -536,7 +536,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void NotEqualOperatorSignedLimb()
public void RationalNotEqualOperatorSignedLimb()
{
using (var a = new HugeRational("-835740293845721"))
{
@ -552,7 +552,7 @@ namespace MPIR.Tests.HugeRationalTests
#region Equality operators with Double
[TestMethod]
public void EqualsOperatorDouble()
public void RationalEqualsOperatorDouble()
{
using (var a = new HugeRational("-835740293845721"))
{
@ -565,7 +565,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void NotEqualOperatorDouble()
public void RationalNotEqualOperatorDouble()
{
using (var a = new HugeRational("-835740293845721"))
{
@ -582,7 +582,7 @@ namespace MPIR.Tests.HugeRationalTests
#region GetHashCode
[TestMethod]
public void GetHashCodeTest()
public void RationalGetHashCodeTest()
{
using (var a = new HugeRational("-222509832503450298345029835740293845721"))
{
@ -597,7 +597,7 @@ namespace MPIR.Tests.HugeRationalTests
#region Sign
[TestMethod]
public void Sign()
public void RationalSign()
{
using (var a = new HugeRational("-222509832503450298345029835740293845721"))
{

View File

@ -26,7 +26,7 @@ namespace MPIR.Tests.HugeRationalTests
public class ConstructionAndDisposal
{
[TestMethod]
public void DefaultConstructor()
public void RationalDefaultConstructor()
{
using (var a = new HugeRational())
{
@ -43,7 +43,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void Numerator()
public void RationalNumerator()
{
using (var a = new HugeRational())
{
@ -54,7 +54,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void Denominator()
public void RationalDenominator()
{
using (var a = new HugeRational())
{
@ -65,7 +65,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void Dispose()
public void RationalDispose()
{
var a = new HugeRational();
a.Dispose();
@ -80,7 +80,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void ConstructorFromLong()
public void RationalConstructorFromLong()
{
var n = "123456789123456";
var d = "12764787846358441471";
@ -95,7 +95,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void ConstructorFromLongNegative()
public void RationalConstructorFromLongNegative()
{
var n = "-123456789123456";
var d = "12764787846358441471";
@ -110,7 +110,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void ConstructorFromULong()
public void RationalConstructorFromULong()
{
var d = "12764787846358441471";
using (var a = new HugeRational(ulong.MaxValue, ulong.Parse(d)))
@ -125,7 +125,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void ConstructorFromDouble()
public void RationalConstructorFromDouble()
{
using (var a = new HugeRational(123456789123456.9))
{
@ -134,7 +134,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void ConstructorFromDoubleNegative()
public void RationalConstructorFromDoubleNegative()
{
using (var a = new HugeRational(-123456789123456.9))
{
@ -143,7 +143,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void Allocate()
public void RationalAllocate()
{
using (var a = new HugeRational(129, 193))
{
@ -156,7 +156,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void StringConstructor()
public void RationalStringConstructor()
{
var n = "5432109876543212345789023245987/362736035870515331128527330659";
using (var a = new HugeRational(n))
@ -168,20 +168,20 @@ namespace MPIR.Tests.HugeRationalTests
[TestMethod]
[ExpectedException(typeof(ArgumentException))]
public void StringConstructorInvalid()
public void RationalStringConstructorInvalid()
{
var a = new HugeRational("12345A");
}
[TestMethod]
[ExpectedException(typeof(ArgumentException))]
public void StringConstructorInvalid2()
public void RationalStringConstructorInvalid2()
{
var a = new HugeRational("12345/54321A");
}
[TestMethod]
public void StringConstructorHex()
public void RationalStringConstructorHex()
{
using (var i = new HugeInt("362736035870515331128527330659"))
{
@ -195,7 +195,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void StringConstructorHexPrefix()
public void RationalStringConstructorHexPrefix()
{
using (var i = new HugeInt("362736035870515331128527330659"))
{
@ -210,7 +210,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void StringAssignmentHexPrefix()
public void RationalStringAssignmentHexPrefix()
{
using (var i = new HugeInt("362736035870515331128527330659"))
{
@ -228,7 +228,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void ConstructorFromExpression()
public void RationalConstructorFromExpression()
{
using (var a = new HugeRational("2340958273409578234095823045723490587/362736035870515331128527330659"))
using (var b = new HugeRational(a + 1))

View File

@ -27,7 +27,7 @@ namespace MPIR.Tests.HugeRationalTests
public class Conversions
{
[TestMethod]
public void ToStringDecimal()
public void RationalToStringDecimal()
{
var n = "-23429384756298357462983476598345623984756";
using (var a = new HugeRational(n))
@ -37,7 +37,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void ToStringHex()
public void RationalToStringHex()
{
var n = "-23429abcdef298357462983fedcba345623984756";
using (var a = new HugeRational(n, 16))
@ -48,7 +48,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void FromUlong()
public void RationalFromUlong()
{
using (var a = new HugeRational())
{
@ -60,7 +60,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void FromLong()
public void RationalFromLong()
{
using (var a = new HugeRational())
{
@ -72,7 +72,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void ToAndFromDouble()
public void RationalToAndFromDouble()
{
using (var a = new HugeRational())
using (var lo = new HugeRational())
@ -87,7 +87,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void ToAndFromFloat()
public void RationalToAndFromFloat()
{
using (var a = new HugeRational())
using (var lo = new HugeRational())
@ -103,7 +103,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void FromString()
public void RationalFromString()
{
using (var a = new HugeRational())
{
@ -119,7 +119,7 @@ namespace MPIR.Tests.HugeRationalTests
[TestMethod]
[ExpectedException(typeof(ArgumentException))]
public void FromInvalidString()
public void RationalFromInvalidString()
{
using (var a = new HugeRational())
{
@ -128,7 +128,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void ToStringTruncated()
public void RationalToStringTruncated()
{
var n = string.Concat("123456789".Select(c => new string(c, 30)));
using (var a = new HugeRational(n))
@ -141,7 +141,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void ApproximateSizeInBase()
public void RationalApproximateSizeInBase()
{
using (var a = new HugeRational("2983475029834750293429834750298347502934298347502983475029342983475029834750293429834750298347502934"))
{

View File

@ -31,7 +31,7 @@ namespace MPIR.Tests.HugeRationalTests
public class ExpressionTests
{
[TestMethod]
public void TestAllExpressions()
public void RationalTestAllExpressions()
{
var baseExpr = typeof(RationalExpression);
var allExpressions =

View File

@ -29,7 +29,7 @@ namespace MPIR.Tests.HugeRationalTests
public class IO
{
[TestMethod]
public void InputOutputRaw()
public void RationalInputOutputRaw()
{
Assert.Fail("This test currently crashes");
using (var a = new HugeRational("0x10123456789ABCDEF0123456789ABCDEF0123456789ABCDEF/361720912810755408215708460645842859722715865206816237944587"))
@ -46,7 +46,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void InputOutputStr()
public void RationalInputOutputStr()
{
using (var a = new HugeRational("0x10123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"))
using (var b = new HugeRational())
@ -67,7 +67,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void InputOutputStrHex()
public void RationalInputOutputStrHex()
{
using (var a = new HugeRational("0x10123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"))
using (var b = new HugeRational())
@ -92,7 +92,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void InputOutputStrHexLower()
public void RationalInputOutputStrHexLower()
{
using (var a = new HugeRational("0x10123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"))
using (var b = new HugeRational())
@ -117,7 +117,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void InputOutputStrOctal()
public void RationalInputOutputStrOctal()
{
using (var a = new HugeRational("0x10123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"))
using (var b = new HugeRational())
@ -142,7 +142,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void InputOutputStrBinary()
public void RationalInputOutputStrBinary()
{
using (var a = new HugeRational("0x10123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"))
using (var b = new HugeRational())
@ -167,7 +167,7 @@ namespace MPIR.Tests.HugeRationalTests
}
[TestMethod]
public void InputOutputStr62()
public void RationalInputOutputStr62()
{
using (var a = new HugeRational("0x10123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"))
using (var b = new HugeRational())

View File

@ -65,7 +65,7 @@ namespace MPIR.Tests.RandomTests
}
[TestMethod]
public void SeedingMersenneTwister()
public void RandomSeedingMersenneTwister()
{
using (var r = MpirRandom.MersenneTwister())
{
@ -86,7 +86,7 @@ namespace MPIR.Tests.RandomTests
}
[TestMethod]
public void SeedingDefault()
public void RandomSeedingDefault()
{
using (var r = MpirRandom.Default())
{
@ -107,7 +107,7 @@ namespace MPIR.Tests.RandomTests
}
[TestMethod]
public void SeedingLCSize()
public void RandomSeedingLCSize()
{
using (var r = MpirRandom.LinearCongruential(128))
{
@ -128,7 +128,7 @@ namespace MPIR.Tests.RandomTests
}
[TestMethod]
public void SeedingLC()
public void RandomSeedingLC()
{
using (var a = new HugeInt("5209384572093847098342590872309452304529345409827509283745078"))
using (var r = MpirRandom.LinearCongruential(a, 98570948725939831, 256))
@ -150,7 +150,7 @@ namespace MPIR.Tests.RandomTests
}
[TestMethod]
public void HugeIntBits()
public void RandomHugeIntBits()
{
using (var r = MpirRandom.Default())
using (var a = new HugeInt())
@ -162,7 +162,7 @@ namespace MPIR.Tests.RandomTests
}
[TestMethod]
public void HugeInt1()
public void RandomHugeInt1()
{
using (var r = MpirRandom.Default())
using (var a = new HugeInt())
@ -174,7 +174,7 @@ namespace MPIR.Tests.RandomTests
}
[TestMethod]
public void HugeIntBitsChunky()
public void RandomHugeIntBitsChunky()
{
using (var r = MpirRandom.Default())
using (var a = new HugeInt())