Пример #1
0
        public void Ctor_NUInt_LargeValue()
        {
            nuint  largeValue = unchecked (((nuint)uint.MaxValue) + 1);
            CULong value      = new CULong(largeValue);

            Assert.Equal(largeValue, value.Value);
        }
Пример #2
0
 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));
 }
Пример #3
0
 internal static unsafe partial int setattrlist(string path, AttrList *attrList, void *attrBuf, nint attrBufSize, CULong options);
Пример #4
0
        public static void ToStringTest(uint value, string expected)
        {
            CULong culong = new CULong(value);

            Assert.Equal(expected, culong.ToString());
        }
Пример #5
0
        public void Ctor_NUInt()
        {
            CULong value = new CULong((nuint)42);

            Assert.Equal(42u, value.Value);
        }
Пример #6
0
        public void Ctor_UInt()
        {
            CULong value = new CULong(42u);

            Assert.Equal(42u, value.Value);
        }
Пример #7
0
        public void Ctor_Empty()
        {
            CULong value = new CULong();

            Assert.Equal(0u, value.Value);
        }
Пример #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();
                }
            }
        }
Пример #9
0
 private static unsafe partial int fsetattrlist(int fd, AttrList *attrList, void *attrBuf, nint attrBufSize, CULong options);