public void test_m1()
        {
            testpod2[] o1 = new testpod2[32];

            for (uint i = 0; i < o1.Length; i++)
            {
                ServiceTest2_pod.fill_testpod2(ref o1[i], 59174 + i);
            }

            if (r.pod_m1.Length != 1024)
            {
                throw new Exception("");
            }

            r.pod_m1.Write(52, o1, 3, 17);

            testpod2[] o2 = new testpod2[32];

            r.pod_m1.Read(53, o2, 2, 16);

            for (uint i = 2; i < 16; i++)
            {
                ServiceTest2_pod.verify_testpod2(ref o2[i], 59174 + i + 2);
            }
        }
        public void test_m2()
        {
            PodMultiDimArray s = new PodMultiDimArray(new uint[] { 3, 3 }, new testpod2[9]);

            for (uint i = 0; i < s.pod_array.Length; i++)
            {
                ServiceTest2_pod.fill_testpod2(ref ((testpod2[])s.pod_array)[i], 75721 + i);
            }

            r.pod_m2.Write(new ulong[] { 0, 0 }, s, new ulong[] { 0, 0 }, new ulong[] { 3, 3 });

            PodMultiDimArray s2 = new PodMultiDimArray(new uint[] { 3, 3 }, new testpod2[9]);

            r.pod_m2.Read(new ulong[] { 0, 0 }, s2, new ulong[] { 0, 0 }, new ulong[] { 3, 3 });

            for (uint i = 0; i < s2.pod_array.Length; i++)
            {
                ServiceTest2_pod.verify_testpod2(ref ((testpod2[])s2.pod_array)[i], 75721 + i);
            }
        }
Beispiel #3
0
        public void test_m1()
        {
            testpod2[] o1 = new testpod2[32];

            for (uint i = 0; i < o1.Length; i++)
            {
                ServiceTest2_pod.fill_testpod2(ref o1[i], 59174 + i);
            }

            RRAssert.AreEqual <ulong>(r.pod_m1.Length, 1024);

            r.pod_m1.Write(52, o1, 3, 17);

            testpod2[] o2 = new testpod2[32];

            r.pod_m1.Read(53, o2, 2, 16);

            for (uint i = 2; i < 16; i++)
            {
                ServiceTest2_pod.verify_testpod2(ref o2[i], 59174 + i + 2);
            }
        }