Exemplo n.º 1
0
        public void CfScopeResolution()
        {
            var eq = new EquivalenceClass(new TypeVariable("Eq_2", 2));
            var sr = new ScopeResolution(eq);
            var e  = new FieldAccess(PrimitiveType.Int32, sr, new StructureField(4, PrimitiveType.Int32, "i0004"));

            e.Accept(cf);
            Assert.AreEqual("Eq_2::i0004", sw.ToString());
        }
Exemplo n.º 2
0
        public void CfFieldAccessDeref()
        {
            Identifier id1 = new Identifier("v1", PrimitiveType.Word32, null);
            Expression e   = new FieldAccess(PrimitiveType.Pointer32, new Dereference(PrimitiveType.Word32, id1), "foo");

            e.Accept(cf);

            Assert.AreEqual("v1->foo", sw.ToString());
        }
Exemplo n.º 3
0
        public void CfFieldAccessDeref()
        {
            Identifier id1 = new Identifier("v1", PrimitiveType.Word32, null);
            Expression e   = new FieldAccess(
                PrimitiveType.Ptr32,
                m.Deref(id1),
                new StructureField(4, PrimitiveType.Word32, "foo"));

            e.Accept(cf);

            Assert.AreEqual("v1->foo", sw.ToString());
        }
Exemplo n.º 4
0
		public void CfFieldAccessDeref()
		{
			Identifier id1 = new Identifier("v1", PrimitiveType.Word32, null);
            Expression e = new FieldAccess(
                PrimitiveType.Pointer32,
                new Dereference(PrimitiveType.Word32, id1),
                new StructureField(4, PrimitiveType.Word32, "foo"));
			e.Accept(cf);

			Assert.AreEqual("v1->foo", sw.ToString());
		}
Exemplo n.º 5
0
 public void CfScopeResolution()
 {
     var eq = new EquivalenceClass(new TypeVariable("Eq_2", 2));
     var sr = new ScopeResolution(eq);
     var e = new FieldAccess(PrimitiveType.Int32, sr, new StructureField(4, PrimitiveType.Int32, "i0004"));
     e.Accept(cf);
     Assert.AreEqual("Eq_2::i0004", sw.ToString());
 }