Esempio n. 1
0
		public void TrcoUnsignedCompare()
		{
			ProcedureBuilder m = new ProcedureBuilder();
			Identifier ds = m.Local16("ds");
			Expression e = m.Uge(ds, m.Word16(0x0800));

            coll = CreateCollector();
			e.Accept(eqb);
			e.Accept(coll);
			StringWriter sb = new StringWriter();
			handler.Traits.Write(sb);
			string exp = 
				"T_1 (in ds : word16)" + nl +
				"\ttrait_primitive(word16)" + nl +
				"\ttrait_equal(T_2)" + nl +
				"\ttrait_primitive(cups16)" + nl +
				"T_2 (in 0x0800 : word16)" + nl +
				"\ttrait_primitive(word16)" + nl +
				"\ttrait_primitive(cups16)" + nl +
				"T_3 (in ds >=u 0x0800 : bool)" + nl +
				"\ttrait_primitive(bool)" + nl;
			Assert.AreEqual(exp, sb.ToString());
		}