Esempio 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);
        }
Esempio 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);
        }
Esempio 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));
        }
Esempio n. 4
0
        public void Multiply_nuint()
        {
            IStack <nuint> stack = new BoundedArray <nuint>(4, 2);

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

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

            stack.Modulus();
            Assert.That(stack.Pop()).Equals(4 % 2);
        }
Esempio 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);
        }
Esempio n. 8
0
        public void Divide_nuint()
        {
            IStack <nuint> stack = new BoundedArray <nuint>(4, 2);

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

            stack.Divide();
            Assert.That(stack.Pop()).Equals(4 / 2);
        }
Esempio 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));
        }
Esempio 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));
        }
Esempio 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));
        }
Esempio 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);
        }
Esempio 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);
        }
Esempio n. 15
0
        public void Modulus_nuint()
        {
            IStack <nuint> stack = new BoundedArray <nuint>(4, 2);

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

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

            stack.Modulus();
            Assert.That(stack.Pop()).Equals(4 % 2);
        }
Esempio 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);
        }
Esempio 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);
        }
Esempio 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);
        }
Esempio 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);
        }
Esempio 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);
        }
Esempio n. 23
0
        public void Multiply_Int32()
        {
            IStack <Int32> stack = new BoundedArray <Int32>(4, 2);

            stack.Multiply();
            Assert.That(stack.Pop()).Equals(4 * 2);
        }
Esempio 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));
        }
Esempio 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);
        }
Esempio 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));
        }
Esempio 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);
        }
Esempio 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));
        }
Esempio 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));
        }
Esempio n. 30
0
        public void Add_UInt64()
        {
            IStack <UInt64> stack = new BoundedArray <UInt64>(1, 2);

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