Esempio n. 1
0
        public void CharArrayRefParameter()
        {
            char[] array    = CharacterTests.CharacterMappings().Select(o => (char)o[0]).ToArray();
            var    newArray = array;

            NativeExportsNE.Arrays.ReverseChars(ref newArray, array.Length);
            Assert.Equal(array.Reverse(), newArray);
        }
Esempio n. 2
0
 public void CharArrayMarshalledToNativeAsExpected()
 {
     char[] array = CharacterTests.CharacterMappings().Select(o => (char)o[0]).ToArray();
     Assert.Equal(array.Sum(c => c), NativeExportsNE.Arrays.SumChars(array, array.Length));
 }
Esempio n. 3
0
 public void CharArray_ByValue()
 {
     char[] array = CharacterTests.CharacterMappings().Select(o => (char)o[0]).ToArray();
     Assert.Equal(array.Sum(c => c), NativeExportsNE.Arrays.Custom.SumChars(array, array.Length));
 }