Ejemplo n.º 1
0
		public void AppendStringShorthand()
		{
			IScanner scanner = Provider.NewScanner;
			ArrayList list = NewList;
			Parser parser = new StringParser(Provider.Text)[ActionHandlers.Append(list)];
			parser.Parse(scanner);

			Assert.AreEqual(list.Count, 1);
			Assert.AreEqual(list[0], Provider.Text);

		}
Ejemplo n.º 2
0
		public void AppendString()
		{
			IScanner scanner = Provider.NewScanner;
			StringParser parser = new StringParser(Provider.Text);
			IList list = NewList;
			parser.Act += ActionHandlers.Append(list);
			parser.Parse(scanner);

			Assert.AreEqual(list.Count, 1);
			Assert.AreEqual(list[0], Provider.Text);
		}
Ejemplo n.º 3
0
		public void AssignStringShorthand()
		{
			IScanner scanner = Provider.NewScanner;
			object o = "test";
			Parser parser = new StringParser(Provider.Text)[delegate(Object sender, ActionEventArgs args)
																	{
																		o = args.Value;
																	}];
			parser.Parse(scanner);

			Assert.AreEqual(Provider.Text, o);
		}