Example #1
0
 void AssertGetMergedStateThrows(IState stateA, IState stateB)
 {
     Assert.Throws <InvalidOperationException>(
         () => SolvingFunctions.GetMergedState(stateA, stateB));
     Assert.Throws <InvalidOperationException>(
         () => SolvingFunctions.GetMergedState(stateB, stateA));
 }
Example #2
0
        public void GetMergedState_TwoSameConcreteArrays()
        {
            var res = SolvingFunctions.GetMergedState(Array.Of(Primitive.I32), Array.Of(Primitive.I32));

            Assert.AreEqual(res, Array.Of(Primitive.I32));
        }
Example #3
0
        public void GetMergedState_EmptyConstrainsAndPrimitive()
        {
            var res = SolvingFunctions.GetMergedState(new Constrains(), Primitive.I32);

            Assert.AreEqual(res, Primitive.I32);
        }
Example #4
0
        public void GetMergedState_ConstrainsThatFitAndPrimitive()
        {
            var res = SolvingFunctions.GetMergedState(new Constrains(Primitive.U24, Primitive.I48), Primitive.I32);

            Assert.AreEqual(res, Primitive.I32);
        }
Example #5
0
        public void GetMergedState_TwoSamePrimitives()
        {
            var res = SolvingFunctions.GetMergedState(Primitive.I32, Primitive.I32);

            Assert.AreEqual(res, Primitive.I32);
        }