Exemplo n.º 1
0
        public void Add_Single()
        {
            IStack <Single> stack = new BoundedArray <Single>(1.0f, 2.0f);

            stack.Add();
            Assert.That(stack.Pop()).Equals(3.0f);
        }
Exemplo n.º 2
0
        public void Multiply_Double()
        {
            IStack <Double> stack = new BoundedArray <Double>(4.0, 2.0);

            stack.Multiply();
            Assert.That(stack.Pop()).Equals(4.0 * 2.0);
        }
Exemplo n.º 3
0
        public void Pow_Double()
        {
            IStack <Double> stack = new BoundedArray <Double>(1.0, 2.0);

            stack.Pow();
            Assert.That(stack.Pop()).Equals(Math.Pow(1.0, 2.0));
        }
Exemplo n.º 4
0
        public void Multiply_nuint()
        {
            IStack <nuint> stack = new BoundedArray <nuint>(4, 2);

            stack.Multiply();
            Assert.That(stack.Pop()).Equals(4 * 2);
        }
Exemplo n.º 5
0
        public void Multiply_UInt64()
        {
            IStack <UInt64> stack = new BoundedArray <UInt64>(4, 2);

            stack.Multiply();
            Assert.That(stack.Pop()).Equals(4 * 2);
        }
Exemplo n.º 6
0
        public void Modulus_UInt64()
        {
            IStack <UInt64> stack = new BoundedArray <UInt64>(4, 2);

            stack.Modulus();
            Assert.That(stack.Pop()).Equals(4 % 2);
        }
Exemplo n.º 7
0
        public void Modulus_Double()
        {
            IStack <Double> stack = new BoundedArray <Double>(4.0, 2.0);

            stack.Modulus();
            Assert.That(stack.Pop()).Equals(4.0 % 2.0);
        }
Exemplo n.º 8
0
        public void Divide_nuint()
        {
            IStack <nuint> stack = new BoundedArray <nuint>(4, 2);

            stack.Divide();
            Assert.That(stack.Pop()).Equals(4 / 2);
        }
Exemplo n.º 9
0
        public void Divide_Int32()
        {
            IStack <Int32> stack = new BoundedArray <Int32>(4, 2);

            stack.Divide();
            Assert.That(stack.Pop()).Equals(4 / 2);
        }
Exemplo n.º 10
0
        public void Ceiling_Double()
        {
            IStack <Double> stack = new BoundedArray <Double>(0.5);

            stack.Ceiling();
            Assert.That(stack.Pop()).Equals(Math.Ceiling(0.5));
        }
Exemplo n.º 11
0
        public void CopySign_Double()
        {
            IStack <Double> stack = new BoundedArray <Double>(1.0, -1.0);

            stack.CopySign();
            Assert.That(stack.Pop()).Equals(Math.CopySign(1.0, -1.0));
        }
Exemplo n.º 12
0
        public void BitIncrement_Double()
        {
            IStack <Double> stack = new BoundedArray <Double>(1.0);

            stack.BitIncrement();
            Assert.That(stack.Pop()).Equals(Math.BitIncrement(1.0));
        }
Exemplo n.º 13
0
        public void Add_Decimal()
        {
            IStack <Decimal> stack = new BoundedArray <Decimal>(1.0m, 2.0m);

            stack.Add();
            Assert.That(stack.Pop()).Equals(3.0m);
        }
Exemplo n.º 14
0
        public void Add_Double()
        {
            IStack <Double> stack = new BoundedArray <Double>(1.0, 2.0);

            stack.Add();
            Assert.That(stack.Pop()).Equals(3.0);
        }
Exemplo n.º 15
0
        public void Modulus_nuint()
        {
            IStack <nuint> stack = new BoundedArray <nuint>(4, 2);

            stack.Modulus();
            Assert.That(stack.Pop()).Equals(4 % 2);
        }
Exemplo n.º 16
0
        public void Divide_UInt64()
        {
            IStack <UInt64> stack = new BoundedArray <UInt64>(4, 2);

            stack.Divide();
            Assert.That(stack.Pop()).Equals(4 / 2);
        }
Exemplo n.º 17
0
        public void Modulus_Int32()
        {
            IStack <Int32> stack = new BoundedArray <Int32>(4, 2);

            stack.Modulus();
            Assert.That(stack.Pop()).Equals(4 % 2);
        }
Exemplo n.º 18
0
        public void Divide_Single()
        {
            IStack <Single> stack = new BoundedArray <Single>(4.0f, 2.0f);

            stack.Divide();
            Assert.That(stack.Pop()).Equals(4.0f / 2.0f);
        }
Exemplo n.º 19
0
        public void Modulus_Single()
        {
            IStack <Single> stack = new BoundedArray <Single>(4.0f, 2.0f);

            stack.Modulus();
            Assert.That(stack.Pop()).Equals(4.0f % 2.0f);
        }
Exemplo n.º 20
0
        public void Divide_Double()
        {
            IStack <Double> stack = new BoundedArray <Double>(4.0, 2.0);

            stack.Divide();
            Assert.That(stack.Pop()).Equals(4.0 / 2.0);
        }
Exemplo n.º 21
0
        public void Modulus_Decimal()
        {
            IStack <Decimal> stack = new BoundedArray <Decimal>(4.0m, 2.0m);

            stack.Modulus();
            Assert.That(stack.Pop()).Equals(4.0m % 2.0m);
        }
Exemplo n.º 22
0
        public void Divide_Decimal()
        {
            IStack <Decimal> stack = new BoundedArray <Decimal>(4.0m, 2.0m);

            stack.Divide();
            Assert.That(stack.Pop()).Equals(4.0m / 2.0m);
        }
Exemplo n.º 23
0
        public void Multiply_Int32()
        {
            IStack <Int32> stack = new BoundedArray <Int32>(4, 2);

            stack.Multiply();
            Assert.That(stack.Pop()).Equals(4 * 2);
        }
Exemplo n.º 24
0
        public void Floor_Double()
        {
            IStack <Double> stack = new BoundedArray <Double>(0.5);

            stack.Floor();
            Assert.That(stack.Pop()).Equals(Math.Floor(0.5));
        }
Exemplo n.º 25
0
        public void Multiply_Single()
        {
            IStack <Single> stack = new BoundedArray <Single>(4.0f, 2.0f);

            stack.Multiply();
            Assert.That(stack.Pop()).Equals(4.0f * 2.0f);
        }
Exemplo n.º 26
0
        public void IEEERemainder_Double()
        {
            IStack <Double> stack = new BoundedArray <Double>(4.0, 2.0);

            stack.IEEERemainder();
            Assert.That(stack.Pop()).Equals(Math.IEEERemainder(4.0, 2.0));
        }
Exemplo n.º 27
0
        public void Multiply_Decimal()
        {
            IStack <Decimal> stack = new BoundedArray <Decimal>(4.0m, 2.0m);

            stack.Multiply();
            Assert.That(stack.Pop()).Equals(4.0m * 2.0m);
        }
Exemplo n.º 28
0
        public void Log2_Double()
        {
            IStack <Double> stack = new BoundedArray <Double>(2.0);

            stack.Log2();
            Assert.That(stack.Pop()).Equals(Math.Log2(2.0));
        }
Exemplo n.º 29
0
        public void Sqrt_Double()
        {
            IStack <Double> stack = new BoundedArray <Double>(1.0);

            stack.Sqrt();
            Assert.That(stack.Pop()).Equals(Math.Sqrt(1.0));
        }
Exemplo n.º 30
0
        public void Add_UInt64()
        {
            IStack <UInt64> stack = new BoundedArray <UInt64>(1, 2);

            stack.Add();
            Assert.That(stack.Pop()).Equals(3);
        }