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

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

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

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

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

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

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

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

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

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

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