Exemple #1
0
        public void TestFlags()
        {
            // the OperationFlags enum is created when the first op is made --
            // make it ourselves in case we are run before that
            NetVips.VipsOperationFlagsGetType();
            var operationflagsGtype = NetVips.TypeFromName("VipsOperationFlags");
            var gv = new GValue();

            gv.SetType(operationflagsGtype);
            gv.Set(12);
            var value = gv.Get();

            Assert.Equal(12u, value);
        }
Exemple #2
0
        public void TestFlags()
        {
            // the OperationFlags enum is created when the first op is made --
            // make it ourselves in case we are run before that
            NetVips.VipsOperationFlagsGetType();
            var gtype = NetVips.TypeFromName("VipsOperationFlags");

            Enums.OperationFlags actual;
            using (var gv = new GValue())
            {
                gv.SetType(gtype);
                gv.Set(Enums.OperationFlags.DEPRECATED);
                actual = (Enums.OperationFlags)gv.Get();
            }

            Assert.Equal(Enums.OperationFlags.DEPRECATED, actual);
        }