示例#1
0
        public void ConvertLimitedDestination()
        {
            char [] chars = new char [10000];
            byte [] bytes = new byte [10000];

            Decoder conv = new ExposedDecoder();
            int     charsUsed, bytesUsed;
            bool    done;

            conv.Convert(bytes, 0, 10000, chars, 0, 1000, true,
                         out charsUsed, out bytesUsed, out done);

            Assert.IsFalse(done, "#1");
            Assert.AreEqual(625, charsUsed, "#2");
            Assert.AreEqual(625, bytesUsed, "#3");
        }
示例#2
0
		public void ConvertLimitedDestination ()
		{
			char [] chars = new char [10000];
			byte [] bytes = new byte [10000];

			Decoder conv = new ExposedDecoder ();
			int charsUsed, bytesUsed;
			bool done;

			conv.Convert (bytes, 0, 10000, chars, 0, 1000, true,
				      out charsUsed, out bytesUsed, out done);

			Assert.IsFalse (done, "#1");
			Assert.AreEqual (625, charsUsed, "#2");
			Assert.AreEqual (625, bytesUsed, "#3");
		}