예제 #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());
        }
예제 #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());
        }
예제 #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());
        }
예제 #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());
		}
예제 #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());
 }