2009-10-27 Sebastien Pouliot <[email protected]>
* String.cs: Remove unused (and unneeded) internal call defs.
Reduce duplication (and fix test) for Concat (object,object).
Avoid allocating zero-length strings in the cases where the
FX does not do so.
In Test/System.Text:
2009-10-27 Sebastien Pouliot <[email protected]>
* UnicodeEncodingTest.cs: Add test cases with an odd number of
bytes being used in GetString (it does not crash but it does not
work like MS FX either).
In Test/System:
2009-10-27 Sebastien Pouliot <[email protected]>
* StringTest.cs: Add test case for methods that can return
empty strings.
In System.Globalization:
2009-10-27 Sebastien Pouliot <[email protected]>
* TextInfo.cs: Avoid allocating zero-length strings in ToLower
and ToUpper methods
svn path=/trunk/mcs/; revision=144921
* *.cs: Convert all tests to new-style nunit classes/methods. Add
[Test] attributes to some tests which were missing them.
svn path=/trunk/mcs/; revision=136944
* UTF8Encoding.cs : surrogate characters are handled in
InternalGetChars() but not in InternalGetCharCount().
Fixed bug #415628.
* UTF8EncodingTest.cs : added test for bug #415628.
* 415628.bin : new test resource.
* Makefile: new resource, new EXTRA_DIST mess.
svn path=/trunk/mcs/; revision=125075
2009-01-13 Jb Evain <[email protected]>
* Encoding.cs: when creating a ForwardingEncoder or a
ForwardingDecoder, don't crash if the Encoding doesn't
provide an EncoderFallback or a DecoderFallback.
in Test/System.Text:
2009-01-13 Jb Evain <[email protected]>
* EncoderTest.cs: Make sure we can get an encoder for a custom
encoding.
* DecoderTest.cs: ditto.
svn path=/trunk/mcs/; revision=123196
* UTF7Encoding.cs :
Fixed misplaced leftOverSize reset in InternalGetCharCount().
Fixed base64 value for '+' (the value is actually unused though).
* UTF7EncodingTest.cs : added test for broken GetCharCount() case.
svn path=/trunk/mcs/; revision=100197
* DecoderFallback.cs, EncoderFallback.cs, Encoding.cs :
the same "\uFFFD" fix for encoder fallback.
Reduced extra instantiation of those fallbacks.
* EncoderReplacementFallbackTest.cs,
EncoderReplacementFallbackBufferTest.cs : encoder test for
"\uFFFD" replacement.
svn path=/trunk/mcs/; revision=91947
* UTF8EncodingTest.cs : looks like the issue is not fixed in .NET 1.x
and hence it looked like a regression. (It wasn't.)
svn path=/trunk/mcs/; revision=88248
* DecoderReplacementFallbackBuffer.cs : Reset() should also reset the
input buffer. When fallback is not assigned, just return '\0'.
* UnicodeEncoding.cs : handle throwOnInvalid .ctor argument.
Default replacement fallback buffer is now "\uFFFD".
* UTF8Encoding.cs : couple of replacement buffer size fixes.
Default replacement fallback buffer is now "\uFFFD".
* UTF32Encoding.cs : Default replacement is "\uFFFD" too here.
See http://support.microsoft.com/kb/940521/ for this change.
* UnicodeEncodingTest.cs,
UTF8EncodingTest.cs,
DecoderReplacementFallbackBufferTest.cs,
DecoderReplacementFallbackTest.cs : default replacement buffer fix.
Added test for Reset() for replacement buffer.
svn path=/trunk/mcs/; revision=88150
#332515.
* UTF32Encoding.cs: IsBrowserSave returns false for both Big-Endian and
Little-Endian.
* TestEncoding.cs: Also make class available on 1.0 profile.
* EncodingTest.cs: Added tests for Is* properties.
* UTF7EncodingTest.cs: Added tests for Is* properties.
* UnicodeEncodingTest.cs: Added tests for Is* properties. Fixed
line endings.
* UTF8EncodingTest.cs: Added tests for Is* properties. Spaces to
tabs. Numbered tests.
* ASCIIEncodingTest.cs: Added tests for Is* properties. No longer
derive from TestCase class. Spaces to tabs.
* UTF32EncodingTest.cs: Added tests for Is* properties. No longer
derive from deprecated Assertion class.
svn path=/trunk/mcs/; revision=87593
DecoderFallback test to pass on systems where codepage 932 is valid.
Assert that exception is thrown by DecoderFallback property.
* EncoderReplacementFallbackTest.cs: Fixed DontChangeReadOnlyCodePage-
EncoderFallback test to pass on systems where codepage 932 is valid.
Assert that exception is thrown by EncoderFallback property.
svn path=/trunk/mcs/; revision=81463
* Encoding.cs : the change broke the build, so reverted part of it.
* EncodingTest.cs :
reverted part of the related patch, thus added NotWorking.
svn path=/trunk/mcs/; revision=72087
* Encoding.cs: In GetEncoding (int) do not allow codepage value below zero
and above 0xffff. Modified NotSupportedException to ArgumentException in
GetEncoding (string).
* corlib_test.dll.sources: Added EncodingTest.cs.
svn path=/trunk/mcs/; revision=72052
* Encoder.cs, Decoder.cs : implemented Convert(). Also added argument
check in some methods.
* EncoderTest.cs, DecoderTest.cs : new tests, for Convert().
* corlib_test.dll.sources: added EncoderTest.cs and DecoderTest.cs.
svn path=/trunk/mcs/; revision=58819
* UTF8Encoding.cs : In zero-charbuffer case, byte buffer count should
be checked. Also it should not ignore leftOver characters even if
byte buffer length is 0.
* UTF8EncodingTest.cs : added test for insufficient bytes for
flush=true and leftOver!='\0' case.
svn path=/trunk/mcs/; revision=56533
* UTF7Encoding.cs UTF8Encoding.cs :
Fixed bug #77315 (Patch by [email protected]).
Make strict check for invalid surrogate.
* UTF7EncodingTest.cs : added test for bug #77315.
* UTF8EncodingTest.cs : added test for bug #77315. Also, now a
bunch of tests are working (while they are marked as NotDotNet
under 1.1 profile).
svn path=/trunk/mcs/; revision=55971
* UnicodeEncodingTest.cs, DecoderReplacementFallbackBufferTest.cs,
EncoderReplacementFallbackBufferTest.cs : tests were fixed but
"NotWorking" were not marked correctly.
svn path=/trunk/mcs/; revision=55795
* UTF7EncodingTest.cs UTF8EncodingTest.cs UnicodeEncodingTest.cs :
due to the introduction of fallback, some of their internals have
changed. Thus marked some tests as NotWorking.
* DecoderReplacementFallbackBufferTest.cs,
EncoderReplacementFallbackBufferTest.cs :
some behaviors have changed since beta2, so marked old tests as
NotWorking.
svn path=/trunk/mcs/; revision=55794
* StringBuilderTest.cs: Test case MaxCapacity_Overflow3 doesn't work
under MS 1.1 SP1 (it should throw an ArgumentOutOfRangeException) but
it does work under Mono and MS 2.0 (final). Tagged as "NotWorking".
svn path=/trunk/mcs/; revision=53930
* ASCIIEncoding.cs, Latin1Encoding.cs : added EncoderFallback support.
* Encoding.cs : changed default fallback selection. Seems like only
ASCII and GB18030 uses '?' for replacement.
* UTF8Encoding.cs : now that Fallback is read only by default, we
need special setter.
* EncoderReplacementFallbackTest.cs :
Added Latin1 replacement test.
Updated some test results changed from beta2 to RTM.
* DecoderReplacementFallbackTest.cs : the same updates.
svn path=/trunk/mcs/; revision=53350
* Decoder.cs : added FallbackBuffer property.
* UTF8Encoding.cs : In NET_2_0, use DecoderFallbackBuffer instead of
"throwOnInvalid".
* UTF8EncodingTest.cs : Simply replaced all ArgumentException with
switched alias (it is DecodefFallbackException in NET_2_0).
svn path=/trunk/mcs/; revision=53137
* corlib_test.dll.sources:
Added EncoderReplacementFallbackBudderTest.cs.
* DecoderReplacementFallbackBuffer.cs : it does not have to preserve
byte buffer.
* EncoderReplacementFallbackBuffer.cs : implemented.
* DecoderReplacementFallback.cs, EncoderReplacementFallback.cs :
Removed MonoTODO.
* EncoderReplacementFallbackBufferTest.cs : new test (it's weird, but
mostly identical to DecoderReplacementFallbackBufferTest...)
svn path=/trunk/mcs/; revision=53092
* corlib_test.dll.sources:
Added DecoderReplacementFallbackBudderTest.cs.
* DecoderFallbackBuffer.cs : Reset() does nothing here.
* DecoderReplacementFallbackBuffer.cs : implemented, but no idea how
bytesUnknown is used.
* DecoderReplacementFallbackBufferTest.cs : new test.
svn path=/trunk/mcs/; revision=53077
in mcs:
* driver.cs : Use default encoding on the environment.
Removed (now that) extra parameter for SeekableStreamReader.
* support.cs : (SeekableStreamReader) third .ctor() argument for
StreamReader is not required (always true). preamble size could
be acquired in simpler and safe way.
in tests:
* test-444.cs :
UTF-8 BOM autodetect test (for encoding detection patch).
in class/corlib/System.Text:
* UTF8Encoding.cs : (InternalGetChars/InternalGetCharCount):
Don't exclude FEFF in the resulting text.
in class/corlib/Test/System.Text:
* UTF8EncodingTest.cs : added GetCharsFEFF().
in class/Managed.Windows.Forms:
* Makefile : added /codepage:65001 (otherwise the build gets broken
on KeyboardLayout.cs on some non-iso-8859-1 environment).
svn path=/trunk/mcs/; revision=48826
2005-06-21 Ben Maurer <[email protected]>
* StringBuilderTest.cs: Test replacing with a longer string.
In System.Text:
2005-06-21 Ben Maurer <[email protected]>
* StringBuilder.cs (Replace): Do the correct thing when we replace
with a longer string. Thanks to Vorobiev Maksim
<[email protected]>.
svn path=/trunk/mcs/; revision=46333
2005-05-06 Ben Maurer <[email protected]>
* StringBuilderTest.cs (MaxCapacity_Overflow3): Test for #72244.
In System.Text:
2005-05-06 Ben Maurer <[email protected]>
* StringBuilder.cs (InternalEnsureCapacity): It is possible that
the size we attempt to grow to is more than the max capacity, but
that a smaller size will do. In this case, don't throw an
exception. Fixes#72244
svn path=/trunk/mcs/; revision=44166
* System.Text/StringBuilder.cs: when creating the StringBuilder from a
string, the maximum capacity remains Int32.MaxValue.
* Test/System.Text/StringBuilderTest.cs: new tests for capacity when
the StringBuilder is created from a string.
svn path=/trunk/mcs/; revision=38734
* System.Text/StringBuilder.cs: throw if the new size is greater than
the maximum capacity for the StringBuilder. Patch by [email protected].
Fixes bug #62422.
* Test/System.Text/StringBuilderTest.cs: patch to test for capacity
being exceeded.
svn path=/trunk/mcs/; revision=38640
* UTF8EncodingTest.cs: Ajusted test 3.3.6 and 3.3.7 because MS accept
invalid UTF8 (when it shouldn't) and Mono doesn't. Both case are now
accepted by the unit tests.
svn path=/trunk/mcs/; revision=25486