public void Create() { // 0 is not defined Assert.Null(CVPixelFormatDescription.Create(0), "0"); using (var dict = CVPixelFormatDescription.Create(CVPixelFormatType.CV16Gray)) { Assert.NotNull(dict, "CV16Gray"); } using (var dict = CVPixelFormatDescription.Create(CVPixelFormatType.CV32ARGB)) { Assert.NotNull(dict, "CV32ARGB"); } }
public void Register() { if (registerDone) { Assert.Ignore("This test can only be executed once, it modifies global state."); } registerDone = true; Assert.Null(CVPixelFormatDescription.Create((CVPixelFormatType)3), "3a"); using (var dict = CVPixelFormatDescription.Create(CVPixelFormatType.CV24RGB)) { Assert.NotNull(dict, "CV24RGB"); CVPixelFormatDescription.Register(dict, (CVPixelFormatType)3); } Assert.NotNull(CVPixelFormatDescription.Create((CVPixelFormatType)3), "3b"); }