public void Ctor_NUInt_LargeValue()
        {
            nuint  largeValue = unchecked (((nuint)uint.MaxValue) + 1);
            CULong value      = new CULong(largeValue);

            Assert.Equal(largeValue, value.Value);
        }
 public void EqualsTest(CULong culong, object obj, bool expected)
 {
     if (obj is CULong culong2)
     {
         Assert.Equal(expected, culong.Equals(culong2));
         Assert.Equal(expected, culong.GetHashCode().Equals(culong2.GetHashCode()));
     }
     Assert.Equal(expected, culong.Equals(obj));
 }
Exemple #3
0
 internal static unsafe partial int setattrlist(string path, AttrList *attrList, void *attrBuf, nint attrBufSize, CULong options);
        public static void ToStringTest(uint value, string expected)
        {
            CULong culong = new CULong(value);

            Assert.Equal(expected, culong.ToString());
        }
        public void Ctor_NUInt()
        {
            CULong value = new CULong((nuint)42);

            Assert.Equal(42u, value.Value);
        }
        public void Ctor_UInt()
        {
            CULong value = new CULong(42u);

            Assert.Equal(42u, value.Value);
        }
        public void Ctor_Empty()
        {
            CULong value = new CULong();

            Assert.Equal(0u, value.Value);
        }
Exemple #8
0
        internal static unsafe int fsetattrlist(SafeHandle handle, AttrList *attrList, void *attrBuf, nint attrBufSize, CULong options)
        {
            bool refAdded = false;

            try
            {
                handle.DangerousAddRef(ref refAdded);
                return(fsetattrlist(handle.DangerousGetHandle().ToInt32(), attrList, attrBuf, attrBufSize, options));
            }
            finally
            {
                if (refAdded)
                {
                    handle.DangerousRelease();
                }
            }
        }
Exemple #9
0
 private static unsafe partial int fsetattrlist(int fd, AttrList *attrList, void *attrBuf, nint attrBufSize, CULong options);