Remove() public method

Removes the last character from the formatted string. (Remove last character in virtual string).
public Remove ( ) : bool
return bool
Ejemplo n.º 1
0
		public void ToString_bool_bool_int_int_Test00008 ()
		{
			MaskedTextProvider mtp;
			//int Int32_out = 0;
			//MaskedTextResultHint MaskedTextResultHint_out = MaskedTextResultHint.Unknown;
			mtp = new MaskedTextProvider (@"abc");
			mtp.Add (@"a");
			mtp.Remove ();
			mtp.InsertAt ('\x61', 1);
			Assert.AreEqual (@"_", mtp.ToString (true, true, -1, 1), "#0");
			MaskedTextProviderTest.AssertProperties (mtp, "ToString_bool_bool_int_int_Test", 1, true, false, 0, 1, CultureInfo.GetCultureInfo ("es-ES"), 1, true, false, false, -1, 3, @"abc", true, false, '\x0', '\x5F', true, true, true, @" bc", @" bc", @" bc", @"_bc", @"_", @" bc", @"");
		}
Ejemplo n.º 2
0
		public void FindAssignedEditPositionInRangeTest4 ()
		{
			MaskedTextProvider mtp;
			//int Int32_out = 0;
			//MaskedTextResultHint MaskedTextResultHint_out = MaskedTextResultHint.Unknown;
			mtp = new MaskedTextProvider (@"a?b?c");
			mtp.Add ("a");
			mtp.Remove ();
			mtp.InsertAt ('\x61', 1);
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (0, 0, false), "#201");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (0, 0, true), "#202");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (0, 1, false), "#203");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (0, 1, true), "#204");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (0, 2, false), "#205");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (0, 2, true), "#206");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (0, 3, false), "#207");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (0, 3, true), "#208");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (0, 4, false), "#209");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (0, 4, true), "#210");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (0, 5, false), "#211");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (0, 5, true), "#212");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (0, 6, false), "#213");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (0, 6, true), "#214");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (1, 0, false), "#215");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (1, 0, true), "#216");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (1, 1, false), "#217");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (1, 1, true), "#218");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (1, 2, false), "#219");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (1, 2, true), "#220");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (1, 3, false), "#221");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (1, 3, true), "#222");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (1, 4, false), "#223");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (1, 4, true), "#224");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (1, 5, false), "#225");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (1, 5, true), "#226");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (1, 6, false), "#227");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (1, 6, true), "#228");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (2, 0, false), "#229");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (2, 0, true), "#230");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (2, 1, false), "#231");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (2, 1, true), "#232");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (2, 2, false), "#233");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (2, 2, true), "#234");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (2, 3, false), "#235");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (2, 3, true), "#236");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (2, 4, false), "#237");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (2, 4, true), "#238");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (2, 5, false), "#239");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (2, 5, true), "#240");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (2, 6, false), "#241");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (2, 6, true), "#242");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (3, 0, false), "#243");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (3, 0, true), "#244");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (3, 1, false), "#245");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (3, 1, true), "#246");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (3, 2, false), "#247");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (3, 2, true), "#248");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (3, 3, false), "#249");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (3, 3, true), "#250");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (3, 4, false), "#251");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (3, 4, true), "#252");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (3, 5, false), "#253");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (3, 5, true), "#254");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (3, 6, false), "#255");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (3, 6, true), "#256");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (4, 0, false), "#257");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (4, 0, true), "#258");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (4, 1, false), "#259");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (4, 1, true), "#260");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (4, 2, false), "#261");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (4, 2, true), "#262");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (4, 3, false), "#263");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (4, 3, true), "#264");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (4, 4, false), "#265");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (4, 4, true), "#266");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (4, 5, false), "#267");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (4, 5, true), "#268");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (4, 6, false), "#269");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (4, 6, true), "#270");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (5, 0, false), "#271");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (5, 0, true), "#272");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (5, 1, false), "#273");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (5, 1, true), "#274");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (5, 2, false), "#275");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (5, 2, true), "#276");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (5, 3, false), "#277");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (5, 3, true), "#278");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (5, 4, false), "#279");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (5, 4, true), "#280");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (5, 5, false), "#281");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (5, 5, true), "#282");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (5, 6, false), "#283");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (5, 6, true), "#284");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (6, 0, false), "#285");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (6, 0, true), "#286");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (6, 1, false), "#287");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (6, 1, true), "#288");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (6, 2, false), "#289");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (6, 2, true), "#290");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (6, 3, false), "#291");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (6, 3, true), "#292");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (6, 4, false), "#293");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (6, 4, true), "#294");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (6, 5, false), "#295");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (6, 5, true), "#296");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (6, 6, false), "#297");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (6, 6, true), "#298");
			AssertProperties (mtp, "FindAssignedEditPositionInRangeTest", 299, true, false, 1, 2, CultureInfo.GetCultureInfo ("en-US"), 3, true, false, false, 1, 5, "a?b?c", true, false, '\x0', '\x5F', true, true, true, @" ab c", @" ab c", @" ab c", @"_ab_c", @"_a_", @" ab c", @" a");
		}
Ejemplo n.º 3
0
		public void Add_string_int_MaskedTextResultHint_Test00012 ()
		{
			MaskedTextProvider mtp;
			int testPosition;
			MaskedTextResultHint resultHint;
			bool result;
			//int Int32_out = 0;
			//MaskedTextResultHint MaskedTextResultHint_out = MaskedTextResultHint.Unknown;
			mtp = new MaskedTextProvider (@"abc");
			mtp.Add (@"a");
			mtp.Remove ();
			mtp.InsertAt ('\x61', 1);
			result = mtp.Add (@"abc", out testPosition, out resultHint);
			Assert.AreEqual (true, result, "Add_string_int_MaskedTextResultHint_Test#0");
			Assert.AreEqual (MaskedTextResultHint.Success, resultHint, "Add_string_int_MaskedTextResultHint_Test#1");
			Assert.AreEqual (2, testPosition, "Add_string_int_MaskedTextResultHint_Test#2");
			MaskedTextProviderTest.AssertProperties (mtp, "Add_string_int_MaskedTextResultHint_Test", 3, true, false, 1, 0, CultureInfo.GetCultureInfo ("es-ES"), 1, true, false, false, 0, 3, @"abc", true, true, '\x0', '\x5F', true, true, true, @"abc", @"abc", @"abc", @"abc", @"a", @"abc", @"a");

		}
Ejemplo n.º 4
0
		public void FindAssignedEditPositionInRangeTest2 ()
		{
			MaskedTextProvider mtp;
			//int Int32_out = 0;
			//MaskedTextResultHint MaskedTextResultHint_out = MaskedTextResultHint.Unknown;
			mtp = new MaskedTextProvider (@"abc");
			mtp.Add ("a");
			mtp.Remove ();
			mtp.InsertAt ('\x61', 1);
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (0, 0, false), "#51");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (0, 0, true), "#52");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (0, 1, false), "#53");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (0, 1, true), "#54");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (0, 2, false), "#55");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (0, 2, true), "#56");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (0, 3, false), "#57");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (0, 3, true), "#58");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (0, 4, false), "#59");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (0, 4, true), "#60");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (1, 0, false), "#61");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (1, 0, true), "#62");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (1, 1, false), "#63");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (1, 1, true), "#64");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (1, 2, false), "#65");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (1, 2, true), "#66");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (1, 3, false), "#67");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (1, 3, true), "#68");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (1, 4, false), "#69");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (1, 4, true), "#70");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (2, 0, false), "#71");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (2, 0, true), "#72");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (2, 1, false), "#73");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (2, 1, true), "#74");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (2, 2, false), "#75");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (2, 2, true), "#76");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (2, 3, false), "#77");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (2, 3, true), "#78");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (2, 4, false), "#79");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (2, 4, true), "#80");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (3, 0, false), "#81");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (3, 0, true), "#82");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (3, 1, false), "#83");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (3, 1, true), "#84");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (3, 2, false), "#85");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (3, 2, true), "#86");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (3, 3, false), "#87");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (3, 3, true), "#88");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (3, 4, false), "#89");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (3, 4, true), "#90");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (4, 0, false), "#91");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (4, 0, true), "#92");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (4, 1, false), "#93");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (4, 1, true), "#94");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (4, 2, false), "#95");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (4, 2, true), "#96");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (4, 3, false), "#97");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (4, 3, true), "#98");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (4, 4, false), "#99");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (4, 4, true), "#100");
			AssertProperties (mtp, "FindAssignedEditPositionInRangeTest", 101, true, false, 0, 1, CultureInfo.GetCultureInfo ("en-US"), 1, true, false, false, -1, 3, "abc", true, false, '\x0', '\x5F', true, true, true, @" bc", @" bc", @" bc", @"_bc", @"_", @" bc", @"");
		}