示例#1
0
        public void CfStructCast()
        {
            var s = new StructureType
            {
                Name   = "foo",
                Fields =
                {
                    { 0x0000, PrimitiveType.Int16 },
                    { 0x0002, PrimitiveType.Int16 }
                }
            };
            var id   = new Identifier("id", PrimitiveType.Word32, new TemporaryStorage("id", 4, PrimitiveType.Word32));
            var cast = new Cast(s, id);

            cast.Accept(cf);
            Assert.AreEqual("(struct foo) id", sw.ToString());
        }