Commit Graph
19 Commits
Author SHA1 Message Date
Hugh Bellamy 9f285325ba Migrate old UTF7Encoding tests to System.Text.Encoding tests
Commit migrated from https://github.com/dotnet/corefx/commit/715cf66b169f5d133d3c2e913897c52a656de6eb
2016-04-27 22:50:19 +01:00
Hugh Bellamy d0130418af Remove duplicate tests from System.Text.Encoding.Extensions
- Only added tests for GetMaxByteCount/GetMaxByteCount and
encoding/decoding nothing


Commit migrated from https://github.com/dotnet/corefx/commit/99eb9ce017c08d7182ee95f9e5d63fcb82d6d5b6
2016-04-27 18:42:29 +01:00
Tarek Mahmoud Sayed fcfbbf3682 Merge pull request dotnet/corefx#8092 from hughbe/unicode-encoding-neg
Add tests for EncoderFallback and DecoderFallback for UnicodeEncoding

Commit migrated from https://github.com/dotnet/corefx/commit/d5ac356b49b8cae4037f05fe2bfe71474888a86a
2016-04-26 13:06:52 -07: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
Hugh Bellamy 2723493301 Address PR feedback
Remove dead code


Commit migrated from https://github.com/dotnet/corefx/commit/c9512a580b6007420e875a42c9ecd32e6df3e574
2016-04-26 17:50:05 +01:00
Hugh Bellamy 8b9faf5099 Remove GetHashCodeTests
Moved into the modern file


Commit migrated from https://github.com/dotnet/corefx/commit/b51c3cc6608b315acc04c582dded240aacd1e107
2016-04-26 17:18:54 +01:00
Hugh Bellamy 3d7022311d Add ctor, method and property tests to UTF7Encoding
- Ctor, Ctor_Bool
- EncoderFallback, DecoderFallback
- WebName, CodePage, EncodingName, IsSingleByte
- Clone, Equals, GetPreamble

Also removes some files that VS didn't delete in previous cleanups


Commit migrated from https://github.com/dotnet/corefx/commit/9a3faf243b831cbdd2b2a18fce76da7bfdae2f19
2016-04-26 17:16:24 +01:00
Hugh Bellamy 1e0c0c0b16 Add tests ensuring UTF7Encoding performs no error checking on encoding
Commit migrated from https://github.com/dotnet/corefx/commit/2f114d2ec2fda9b34dab15e20b3c9485e857e112
2016-04-25 18:45:44 +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 6593984b91 Add UTF7Encoding tests
- All ASCII chars
- '+'
- Valid surrogate pairs
- Invalid surrogate pairs
- Invalid unicode chars


Commit migrated from https://github.com/dotnet/corefx/commit/9a70ffea2af0d526892626e0a69c63b5d24f8a1b
2016-04-21 16:55:32 +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 d871a6ba6b Cleanup UTF7Encoding 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/241262ac0ec5bea8c7a10e7ff115a142e2636290
2016-04-05 22:37:25 +01:00
Hugh Bellamy 4350cb6024 Cleanup UTF7Encoding negative tests
- Make EncodingHelpers.cs more extensible


Commit migrated from https://github.com/dotnet/corefx/commit/2d49ba5a5d904ddd8a750fdd26e82089ca05a58f
2016-03-23 08:05:41 +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
stephentoub ae493cc005 Fix System.Text.Encoding tests to use non-static RNG
Commit migrated from https://github.com/dotnet/corefx/commit/1b5d9fb7503cc01a6fba08b5d9bf0eb9cfb031b6
2015-07-14 22:15:30 -04:00
Venkatraman Mahalingam 0c000b0684 fixed duplicate class name
[tfs-changeset: 1474349]


Commit migrated from https://github.com/dotnet/corefx/commit/382678818c5adfaa19d32cd8058d40d4818729c9
2015-05-21 15:23:51 -07: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