Hugh Bellamy
e31733cce4
Migrate old UTF8Encoding tests to System.Text.Encoding tests
...
Commit migrated from https://github.com/dotnet/corefx/commit/f9ae6ac2c5e2e0220a7ded9b54ce31910b82fe20
2016-04-28 22:09:03 +01:00
Hugh Bellamy
55e3d33376
Make sure all constructors for any Encoding have the same GetMaxCharCount and GetMaxByteCount results
...
Commit migrated from https://github.com/dotnet/corefx/commit/3c69470d1f3adce4ef98afc0c04ae611737aab87
2016-04-26 18:21:13 +01:00
Tarek Mahmoud Sayed
87cd904502
Merge pull request dotnet/corefx#8020 from hughbe/utf8-methds-properties
...
Add ctor, method and property tests to UTF8Encoding
Commit migrated from https://github.com/dotnet/corefx/commit/d332a37260290e2ebbc3d656b7f9fb7967fcbf64
2016-04-25 08:50:28 -07:00
Hugh Bellamy
7143f55d67
Add ctor, method and property tests to UTF8Encoding
...
- Ctor_Empty, Ctor_Bool, Ctor_Bool
- EncoderFallback, DecoderFallback
- WebName, CodePage, EncodingName, IsSingleByte
- Clone, Equals, GetPreamble
Commit migrated from https://github.com/dotnet/corefx/commit/ff40e2840293b99910d2ad212983ea4d58a407d9
2016-04-23 09:32:38 +01:00
Hugh Bellamy
a89728737e
Add tests for EncoderFallback and DecoderFallback for UTF8Encoding
...
- Also adds a helper method to NegativeEncodingTests to verify
DecodeFallbackExceptions and EncoderFallback exceptions are thrown
Commit migrated from https://github.com/dotnet/corefx/commit/c7b17abe866fe919fa84e407372e6ab7ab1e8b8d
2016-04-22 23:45:12 +01:00
Tarek Mahmoud Sayed
9b67672c20
Merge pull request dotnet/corefx#7972 from hughbe/encoding-move
...
Move legacy UTF8Encoding tests to modern files
Commit migrated from https://github.com/dotnet/corefx/commit/02443b426b4df2dceb347d81742509e8c9865469
2016-04-21 16:20:47 -07:00
Hugh Bellamy
47a2a9b7af
Move legacy UTF8Encoding tests to modern files
...
- Take advantage of EncodingTestHelpers and NegativeEncodingTestHelpers
to remove boilerplate and duplicated code/tests
- Move encode and decode tests to the new files
Commit migrated from https://github.com/dotnet/corefx/commit/96cb298952e09ad7adbd52c6050673187ce1c3b8
2016-04-21 22:36:48 +01:00
Hugh Bellamy
f15da2ff38
Remove random data from System.Text.Encoding tests
...
Commit migrated from https://github.com/dotnet/corefx/commit/c8dd21919875419202bbf8277b776580c783b6aa
2016-04-21 21:32:38 +01:00
Hugh Bellamy
8173890495
Address PR feedback
...
- Add a comment
- Add some more invalid bytes tests
Commit migrated from https://github.com/dotnet/corefx/commit/4667d3dff6639dc5f904aaa802af1db61fa80bee
2016-04-21 15:52:13 +01:00
Hugh Bellamy
ce20775029
Add UTF8Encoding tests
...
- All ASCII chars
- Valid surrogate pairs
- Invalid surrogate pairs
- Invalid unicode chars
- Invalid bytes
- Change Decode(..., char[]) to Decode(..., string) for convenience
Commit migrated from https://github.com/dotnet/corefx/commit/96326160e8979c97bcc77e28a2e0c8960f4f45f7
2016-04-20 21:43:10 +01:00
Hugh Bellamy
e64fce918c
Consolidate GetByteCount/GetByte and GetChars/GetCharCount/GetString tests
...
- Less test code duplication
Commit migrated from https://github.com/dotnet/corefx/commit/1879fbb6fcc4dc5dd83a0458b28302e58d3868eb
2016-04-16 10:50:19 +01:00
Hugh Bellamy
5fa8983705
Cleanup UTF8Encoding tests ( dotnet/corefx#7389 )
...
* Cleanup UTF8Encoding tests
- Fix a bunch of tests that didn't actually test anything. They just
called the method without any assertions or checks after.
- Rename tests to follow guidelines, instead of "PosTest1" and
"NegTest2"
- Take advantage of xunit
- Shorten tests by using quicker and newer code
- Use EncodingTestHelpers
Commit migrated from https://github.com/dotnet/corefx/commit/5574b066325687ca4740cea78dc6ba09a4b2166a
2016-04-08 07:45:20 -04:00
Hugh Bellamy
1fbd1a85f3
Cleanup UTF8Encoding negative tests
...
Commit migrated from https://github.com/dotnet/corefx/commit/941cd1ba251d954a0ebdbeeac1f301e8ce852d11
2016-03-24 19:45:15 +00:00
dotnet-bot
39d1eab950
Update licensing headers
...
Commit migrated from https://github.com/dotnet/corefx/commit/7cad8486cbabbce0236bdf530e30db7036335524
2016-01-27 08:02:28 -08:00
Stephen A. Imhoff
bc392f1c9f
Update test namespace in System.Text.Encoding, per dotnet/corefx#2898 .
...
- Add namespace in lone file.
- Clean up `using`s.
Commit migrated from https://github.com/dotnet/corefx/commit/72f17d002e22670de2d1b9a6528f451715969aaf
2015-10-02 16:35:35 +09:00
Venkatraman Mahalingam
e157c69bbc
Porting System.Text.Encoding from ToF and unified 4.0 and 4.10 tests into same folder
...
[tfs-changeset: 1474146]
Commit migrated from https://github.com/dotnet/corefx/commit/1394fa1c2539f289916b9c0641f81436b73e8794
2015-05-21 15:22:44 -07:00