Esempio n. 1
0
        public void PParser_Variant_Record()
        {
            var src =
                @"RECORD
    CASE INTEGER OF
    1:
        (top: INTEGER;
         left: INTEGER;
         bottom: INTEGER;
         right: INTEGER);
    2:
       (topLeft: Point;
        botRight: Point);
END";

            Given_Parser(src);
            var record = parser.ParseType();

            Assert.AreEqual(
                "record case integer of " +
                "1 : (top : integer;left : integer;bottom : integer;right : integer); " +
                "2 : (topLeft : Point;botRight : Point) end",
                record.ToString());
        }