Пример #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);
        }
Пример #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);
        }
Пример #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));
        }
Пример #4
0
        public void Multiply_nuint()
        {
            IStack <nuint> stack = new BoundedArray <nuint>(4, 2);

            stack.Multiply();
            Assert.That(stack.Pop()).Equals(4 * 2);
        }
Пример #5
0
        public void Multiply_UInt64()
        {
            IStack <UInt64> stack = new BoundedArray <UInt64>(4, 2);

            stack.Multiply();
            Assert.That(stack.Pop()).Equals(4 * 2);
        }
Пример #6
0
        public void Modulus_UInt64()
        {
            IStack <UInt64> stack = new BoundedArray <UInt64>(4, 2);

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

            stack.Divide();
            Assert.That(stack.Pop()).Equals(4 / 2);
        }
Пример #9
0
        public void Divide_Int32()
        {
            IStack <Int32> stack = new BoundedArray <Int32>(4, 2);

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

            stack.Modulus();
            Assert.That(stack.Pop()).Equals(4 % 2);
        }
Пример #16
0
        public void Divide_UInt64()
        {
            IStack <UInt64> stack = new BoundedArray <UInt64>(4, 2);

            stack.Divide();
            Assert.That(stack.Pop()).Equals(4 / 2);
        }
Пример #17
0
        public void Modulus_Int32()
        {
            IStack <Int32> stack = new BoundedArray <Int32>(4, 2);

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

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

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