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