Ejemplo n.º 1
0
        public void ToIntPtr()
        {
            var converter = ConverterFactory.Create <short, IntPtr>();

            Assert.Equal(ManualConverter.Int16ToIntPtr(0), converter(0));
            Assert.Equal(ManualConverter.Int16ToIntPtr(1), converter(1));
            Assert.Equal(ManualConverter.Int16ToIntPtr(-1), converter(-1));
            Assert.Equal(ManualConverter.Int16ToIntPtr(Int16.MinValue), converter(Int16.MinValue));
            Assert.Equal(ManualConverter.Int16ToIntPtr(Int16.MaxValue), converter(Int16.MaxValue));
        }