Tarek Mahmoud Sayed
d75f62ace2
Merge pull request dotnet/corefx#7965 from hughbe/encoding-unsafe
...
Add tests for unsafe decoding and encoding of bytes and strings
Commit migrated from https://github.com/dotnet/corefx/commit/6375a6546eb7721433e754ab9b92abcbcede6413
2016-04-21 16:52:58 -07:00
Hugh Bellamy
76b8e459d0
Add tests for unsafe decoding and encoding of bytes and strings
...
Commit migrated from https://github.com/dotnet/corefx/commit/6a5884052b588ad9429f04fec3ceca46aaebd438
2016-04-21 21:34:25 +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
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
b87a18c990
Address PR feedback
...
Commit migrated from https://github.com/dotnet/corefx/commit/0aeff31bb0a4d56d87283de8a51e731700dd8c6a
2016-04-19 16:19:37 +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
2540ee56b3
Address PR feedback
...
Commit migrated from https://github.com/dotnet/corefx/commit/609e9ab66c7ff6332665fe75dd7cfd1649daaed3
2016-03-31 18:13:04 +01:00
Hugh Bellamy
5afc5d0c67
Actually test GetBytes and GetChars in System.Text.Encoding
...
- Previous tests for GetBytes and GetChars did not test anything apart
from the return value: the method could've created any byte[] or char[]
result and we wouldn't have verified it.
- Also adds more coverage by testing more overloads of GetBytes and
GetChars
Commit migrated from https://github.com/dotnet/corefx/commit/2bd77a8c5f104624f403cb48c0bfabcdb9beaaf8
2016-03-31 11:34:56 +01:00
Ian Hays
b3d9b3147c
Fix System.Text.Encoding test helper.
...
A test helper in System.Text.Encoding had a typo that was causing the GetBytes(char[],...) methods to not be tested for positive validation.
Commit migrated from https://github.com/dotnet/corefx/commit/3ff89d89fe6d4a28435cabd5ca4b83d3a500ceef
2016-03-29 12:18:14 -07: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
Hugh Bellamy
5006c65d11
Address PR feedback
...
Commit migrated from https://github.com/dotnet/corefx/commit/1d5a05a1a8c213d21c3fa678ae019636be260aad
2016-03-18 21:44:32 +00:00
Hugh Bellamy
f9bdf1e4ae
Cleanup UnicodeEncoding tests
...
- Rename tests to follow guidelines, instead of "PosTest1" and
"NegTest2"
- Take advantage of xunit
- Shorten tests by using quicker and newer code
Commit migrated from https://github.com/dotnet/corefx/commit/a40275630abae4e3a0d7b1857565307c0a63227c
2016-02-29 00:33:54 +00:00