public void TestEnum() { // the Interpretation enum is created when the first image is made -- // make it ourselves in case we are run before the first image NetVips.VipsInterpretationGetType(); var interpretationGtype = NetVips.TypeFromName("VipsInterpretation"); var gv = new GValue(); gv.SetType(interpretationGtype); gv.Set("xyz"); var value = gv.Get(); Assert.Equal("xyz", value); }
public void TestEnum() { // the Interpretation enum is created when the first image is made -- // make it ourselves in case we are run before the first image NetVips.VipsInterpretationGetType(); var gtype = NetVips.TypeFromName("VipsInterpretation"); Enums.Interpretation actual; using (var gv = new GValue()) { gv.SetType(gtype); gv.Set(Enums.Interpretation.Xyz); actual = (Enums.Interpretation)gv.Get(); } Assert.Equal(Enums.Interpretation.Xyz, actual); }