Ejemplo n.º 1
0
            internal static unsafe bool Invoke(IntPtr obj, int Actual, EComparisonMethod ShouldBe, int Expected, string What, UObject ContextObject)
            {
                long *p = stackalloc long[] { 0L, 0L, 0L, 0L, 0L, 0L, 0L };
                byte *b = (byte *)p;

                *((int *)(b + 0)) = Actual;
                *(b + 4)          = (byte)ShouldBe;
                *((int *)(b + 8)) = Expected;
                var What_handle = GCHandle.Alloc(What, GCHandleType.Pinned);

                *(IntPtr *)(b + 16)                = What_handle.AddrOfPinnedObject();
                *(int *)(b + IntPtr.Size + 16)     = What.Length;
                *(int *)(b + IntPtr.Size + 4 + 16) = What.Length;
                *((IntPtr *)(b + 32))              = ContextObject;
                Main.GetProcessEvent(obj, AssertValue_Int_ptr, new IntPtr(p));;
                What_handle.Free();
                return(*((bool *)(b + 40)));
            }
        }
Ejemplo n.º 2
0
 ///<summary>Assert on a relationship between two integers.</summary>
 ///<remarks>
 ///@param What  A name to use in the message if the assert fails (What: expected {Actual} to be <ShouldBe> {Expected} for context '')
 ///</remarks>
 public bool AssertValue_Int(int Actual, EComparisonMethod ShouldBe, int Expected, string What, UObject ContextObject) =>
 FunctionalTest_methods.AssertValue_Int_method.Invoke(ObjPointer, Actual, ShouldBe, Expected, What, ContextObject);