Example #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);

		}
Example #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);
		}
		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);
		}