コード例 #1
0
        public void test01()
        {
            byte[]          input    = { (byte)((SECSItemFormatCodeFunctions.getNumberFromSECSItemFormatCode(SECSItemFormatCode.I1) << 2) | 0x01), 0x04, 255, 128, 0, 127 };
            I1ArraySECSItem secsItem = new I1ArraySECSItem(input, 0, 0);

            Assert.IsTrue(secsItem.getValue()[0] == -1);
            Assert.IsTrue(secsItem.getValue()[1] == -128);
            Assert.IsTrue(secsItem.getValue()[2] == 0);
            Assert.IsTrue(secsItem.getValue()[3] == 127);
        }
コード例 #2
0
        public void test02()
        {
            sbyte[]         input    = { -1, -128, 0, 127 };
            I1ArraySECSItem secsItem = new I1ArraySECSItem(input);

            Assert.IsTrue(secsItem.getValue().SequenceEqual(input));
        }