Exemplo n.º 1
0
		public void BELIntegerStringDivideTest()
		{
			BELInteger source = new BELInteger(10);
			int expectedResult = 5;
			int result = source.Divide("2");
			Assert.AreEqual(expectedResult, result, "Checking that BELInteger(10).Divide(\"2\") = 5");
		}
Exemplo n.º 2
0
		public void BELIntegerDivideByOneTest()
		{
			BELInteger source = new BELInteger(8);
			int result = source.Divide(1);
			Assert.AreEqual(source.Value, result, "Checking that BELInteger(8).Divide(1) = 8");
		}
Exemplo n.º 3
0
		public void BELIntegerDivideMinValueNegativeTest()
		{
			BELInteger source = new BELInteger(int.MinValue);
			int min = int.MinValue;
			int expectedResult = min / -2;
			int result = source.Divide(-2);
			Assert.AreEqual(expectedResult, result, "Checking that BELInteger(int.MinValue).Divide(-2) 'wraps' correctly");
		}
Exemplo n.º 4
0
		public void BELIntegerDivideMinValueTest()
		{
			BELInteger source = new BELInteger(int.MinValue);
			int min = int.MinValue;
			int expectedResult = min / 2;
			int result = source.Divide(2);
			Assert.AreEqual(expectedResult, result, "Checking that BELInteger(int.MinValue).Divide(2) works");
		}
Exemplo n.º 5
0
		public void BELIntegerDivideNegativeSourceTest()
		{
			BELInteger source = new BELInteger(-4);
			int expectedResult = -2;
			int result = source.Divide(2);
			Assert.AreEqual(expectedResult, result, "Checking that BELInteger(-4).Divide(2) = -8");
		}
Exemplo n.º 6
0
		public void BELIntegerDivideZeroTest()
		{
			BELInteger source = new BELInteger(4);
			int result = source.Divide(0);
		}