public void TestNamedArrays() { var a1 = new transform(); ServiceTest2_pod.fill_transform(ref a1, 3956378); r.testnamedarray1 = a1.translation; var a1_1 = new transform(); a1_1.rotation = a1.rotation; a1_1.translation = r.testnamedarray1; var a1_2 = new transform(); ServiceTest2_pod.fill_transform(ref a1_2, 74637); a1_1.rotation = a1_2.rotation; ServiceTest2_pod.verify_transform(ref a1_1, 74637); var a2 = new transform(); ServiceTest2_pod.fill_transform(ref a2, 827635); r.testnamedarray2 = a2; transform a2_1 = r.testnamedarray2; ServiceTest2_pod.verify_transform(ref a2_1, 1294); r.testnamedarray3 = ServiceTest2_pod.fill_transform_array(6, 19274); ServiceTest2_pod.verify_transform_array(r.testnamedarray3, 8, 837512); r.testnamedarray4 = ServiceTest2_pod.fill_transform_multidimarray(5, 2, 6385); ServiceTest2_pod.verify_transform_multidimarray(r.testnamedarray4, 7, 2, 66134); r.testnamedarray5 = ServiceTest2_pod.fill_transform_multidimarray(3, 2, 7732); ServiceTest2_pod.verify_transform_multidimarray(r.testnamedarray5, 3, 2, 773142); }
public void test_namedarray_m1() { var s = new transform[32]; for (uint i = 0; i < s.Length; i++) { ServiceTest2_pod.fill_transform(ref s[i], 79174 + i); } RRAssert.AreEqual <ulong>(r.namedarray_m1.Length, 512); r.namedarray_m1.Write(23, s, 3, 21); var s2 = new transform[32]; r.namedarray_m1.Read(24, s2, 2, 18); for (uint i = 2; i < 18; i++) { ServiceTest2_pod.verify_transform(ref s2[i], 79174 + i + 2); } }
public async Task test_namedarray_m2() { var s = new NamedMultiDimArray(new uint[] { 3, 3 }, new transform[9]); var s_array = (transform[])s.namedarray_array; for (uint i = 0; i < s.namedarray_array.Length; i++) { ServiceTest2_pod.fill_transform(ref s_array[i], 15721 + i); } await r.namedarray_m2.Write(new ulong[] { 0, 0 }, s, new ulong[] { 0, 0 }, new ulong[] { 3, 3 }); var s2 = new NamedMultiDimArray(new uint[] { 3, 3 }, new transform[9]); await r.namedarray_m2.Read(new ulong[] { 0, 0 }, s2, new ulong[] { 0, 0 }, new ulong[] { 3, 3 }); var s2_array = (transform[])s2.namedarray_array; for (uint i = 0; i < s2.namedarray_array.Length; i++) { ServiceTest2_pod.fill_transform(ref s2_array[i], 15721 + i); } }
public async Task TestNamedArrays() { var a1 = new transform(); ServiceTest2_pod.fill_transform(ref a1, 3956378); await r.set_testnamedarray1(a1.translation); var a1_1 = new transform(); a1_1.rotation = a1.rotation; a1_1.translation = await r.get_testnamedarray1(); var a1_2 = new transform(); ServiceTest2_pod.fill_transform(ref a1_2, 74637); a1_1.rotation = a1_2.rotation; ServiceTest2_pod.verify_transform(ref a1_1, 74637); var a2 = new transform(); ServiceTest2_pod.fill_transform(ref a2, 827635); await r.set_testnamedarray2(a2); transform a2_1 = await r.get_testnamedarray2(); ServiceTest2_pod.verify_transform(ref a2_1, 1294); await r.set_testnamedarray3(ServiceTest2_pod.fill_transform_array(6, 19274)); ServiceTest2_pod.verify_transform_array(await r.get_testnamedarray3(), 8, 837512); await r.set_testnamedarray4(ServiceTest2_pod.fill_transform_multidimarray(5, 2, 6385)); ServiceTest2_pod.verify_transform_multidimarray(await r.get_testnamedarray4(), 7, 2, 66134); await r.set_testnamedarray5(ServiceTest2_pod.fill_transform_multidimarray(3, 2, 7732)); ServiceTest2_pod.verify_transform_multidimarray(await r.get_testnamedarray5(), 3, 2, 773142); }
public async Task test_namedarray_m1() { var s = new transform[32]; for (uint i = 0; i < s.Length; i++) { ServiceTest2_pod.fill_transform(ref s[i], 79174 + i); } if (await r.namedarray_m1.GetLength() != 512) { throw new Exception(); } await r.namedarray_m1.Write(23, s, 3, 21); var s2 = new transform[32]; await r.namedarray_m1.Read(24, s2, 2, 18); for (uint i = 2; i < 18; i++) { ServiceTest2_pod.verify_transform(ref s2[i], 79174 + i + 2); } }