public void convertFromIntTest_array(int[] data) { runConvertArrayTest <int, int>(data, x => x); runConvertArrayTest <int, uint>(data, x => (uint)x); runConvertArrayTest <int, double>(data, x => (double)x, AssertHelper.floatIdentical); runConvertArrayTest <int, bool>(data, x => x != 0); runConvertArrayTest <int, string>(data, x => ASint.AS_convertString(x)); runConvertArrayTest <int, ASObject>(data, x => x, (expected, actual) => { Assert.IsType <ASint>(actual); Assert.Equal((int)expected, (int)actual); }); runConvertArrayTest <int, ASAny>(data, x => x, (expected, actual) => { Assert.IsType <ASint>(actual.value); Assert.Equal((int)expected, (int)actual); }); runConvertArrayTest(data, invalidConversion <int, GenericTypeConvertersTest_CA>); runConvertArrayTest(data, invalidConversion <int, GenericTypeConvertersTest_IA>); runConvertArrayTest(data, invalidConversion <int, GenericTypeConvertersTest_NonASType1>); }
public void valueOfMethodTest(int value) { Assert.Equal(value, ASint.valueOf(value)); Assert.Equal(value, ((ASint)(ASObject)value).valueOf()); }