private void TestInOutString(TestNatives test)
 {
     if (1 != test.InOutString("foo bar", out var b, 32) || b != "foo bar")
     {
         throw new Exception("arg mismatch");
     }
 }
 private void TestInRefOutInt(TestNatives test)
 {
     if (1 != test.InRefOutInt(789, out var b) || b != 789)
     {
         throw new Exception("arg mismatch");
     }
 }
 private void TestInOutInt(TestNatives test)
 {
     if (test.InOutInt(471) != 471)
     {
         throw new Exception("arg mismatch");
     }
 }
 private void TestInIdOutInt(TestNatives test)
 {
     test.Identifier = 5515;
     if (test.InIdOutRef(out var a) != 1 || a != 5515)
     {
         throw new Exception("arg mismatch");
     }
 }
        private void TestInOutFloatArray(TestNatives test)
        {
            var arr = new[] { 5.4544f, 881.121f, 7789.1123f };

            if (1 != test.InOutFloatArray(arr, out var b, 3) || !arr.SequenceEqual(b))
            {
                throw new Exception("arg mismatch");
            }
        }
        private void TestInOutBoolArray(TestNatives test)
        {
            var arr = new[] { true, false, true };

            if (1 != test.InOutBoolArray(arr, out var b, 3) || !arr.SequenceEqual(b))
            {
                throw new Exception("arg mismatch");
            }
        }