Beispiel #1
0
 public static void EnsureIncrementDecrementNegation <T>(bool expectedValue)
 {
     UnaryOperationHelper.SupportsIncrement <T>().ShouldBe(expectedValue);
     UnaryOperationHelper.SupportsDecrement <T>().ShouldBe(expectedValue);
     UnaryOperationHelper.SupportsNegation <T>().ShouldBe(expectedValue);
     UnaryOperationHelper.SupportsIncrement <T>().ShouldBe(expectedValue);
     UnaryOperationHelper.SupportsCheckedNegation <T>().ShouldBe(expectedValue);
 }
Beispiel #2
0
 public void ShouldProperlyDetectPartialUnaryOperationImplementation()
 {
     UnaryOperationHelper.SupportsIncrement <PartiallyUnarySupportedNumber>().ShouldBeTrue();
     UnaryOperationHelper.SupportsDecrement <PartiallyUnarySupportedNumber>().ShouldBeFalse();
     UnaryOperationHelper.SupportsNegation <PartiallyUnarySupportedNumber>().ShouldBeFalse();
     UnaryOperationHelper.SupportsOnesCompliment <PartiallyUnarySupportedNumber>().ShouldBeTrue();
     UnaryOperationHelper.SupportsUnaryPlus <PartiallyUnarySupportedNumber>().ShouldBeFalse();
 }