Commit Graph
18 Commits
Author SHA1 Message Date
Tarek Mahmoud Sayed 219b699288 Merge pull request dotnet/corefx#7957 from hughbe/ascii-tests
Add AsciiEnccoding tests

Commit migrated from https://github.com/dotnet/corefx/commit/b562f7aa8555c9415340958d6534668e81f05b03
2016-04-21 10:31:17 -07:00
Hugh Bellamy 0ddf973612 Add AsciiEnccoding tests
- Invalid bytes
- Valid surrogate pairs
- Invalid surrogate pairs
- Invalid chars


Commit migrated from https://github.com/dotnet/corefx/commit/7f7621f597c65b30ae7be93a28f73e2283726b90
2016-04-21 16:57:58 +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 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 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 f2aa24fa36 Add a test for GetPreamble to ASCIIEncoding
More consistent with other encoding tests


Commit migrated from https://github.com/dotnet/corefx/commit/594e788d21006d680125bfb728d4aca5ffb3249c
2016-03-31 11:51:35 +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
Stephen Toub 90472810aa Merge pull request dotnet/corefx#6498 from hughbe/text-encoding-tests-unicode
Cleanup UnicodeEncoding tests

Commit migrated from https://github.com/dotnet/corefx/commit/d9ed76fe3dbe690b65f15b31d3fd322a3b47749c
2016-03-22 11:23:03 -04: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
Hugh Bellamy 8540b84cc3 Cleanup ASCIIEncoding 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/3fdec68d88d2d5ce9eafc988c3a42158e5b50f70
2016-02-27 15:42:51 +00:00
Ian Hays 851c786922 Perf test targets were buggy and required specific setup to not fail. I've hardened them so that the tests can be more easily built without also running them. I also removed the v5.0 libraries requirement. This commit also allows the perf tests to be run as regular unit tests.
Commit migrated from https://github.com/dotnet/corefx/commit/fa1635c07dc664cfde16f471c296697d4fdb4c42
2015-11-04 07:58:23 -08:00
Ian Hays 1a12a1d25d Update and addition to Performance tests
- Made the existing perf tests for Linq follow the new syntax and use the new runner
- Removed all references to v5.0 libraries being required as they no longer are
- Added new tests using usage data from aspnet/benchmarks
- Modified some existing tests to be more easily comparable using analysis tools that look at inlinedata/memberdata (e.g. System.IO.Compression)
- Updated the lock files to use the latest xunit-performance package
- Modified test structure and innerIteration loops to produce more consistently repeatable results
- Updated docs with change to csproj requirements


Commit migrated from https://github.com/dotnet/corefx/commit/2ad9a6ffa7f6bcd31382372609849af5caa6a1bd
2015-10-13 14:28:01 -07:00
stephentoub ba9fea449f Reorganize src\Common\tests
Our common tests folder has gotten a bit unwieldy in its organization.  This change simply moves files around to better map to how src\Common\src is organized.  Files are now stored in a path based on functionality/namespace.

I mostly kept groups of functionality together and did not attempt to reorganize at that level, e.g. I moved the src\Common\tests\System.Xml.XPath\ folder to be src\Common\tests\System\Xml\XPath\ and did not further reorganize all of the folders/files it contains.  Such cleanup can be done separately on each individual area.

Some of the files also need to be cleaned up internally, e.g. the namespace (or lack thereof), so I put such things in a path that I thought made sense even if it differs from the current namespace in the file; I wanted this change to be relatively simple and just be about moving files around to clean up the main hierarchy.


Commit migrated from https://github.com/dotnet/corefx/commit/9a5546c439f7700d3462564678aa4206c7fbf4f1
2015-10-11 15:44:39 -04:00
Ian Hays 01468ad85f Added performance microbenchmarks
- Added "Performance" folders containing perf xunit tests to a number of highly-used libraries (determined by Usage data)
- Two sets of usage data from store apps; I added a test for every function used in more than 5% of the covered assemblies in both data sets.
- This is a first-round pass of the most highly used libraries and does not include: abstract classes, interfaces, or Attributes
- Created a static utility class for commonly used functions across perf tests, stored in src\Common\tests\Performance.
- These tests will run using ```msbuild /t:BuildAndTest /p:performance=true``` from the projects test directory
- Added conditional properties that check if v5.0 is installed on the user's computer when running perf tests. If it isn't, a detailed error is thrown with a link to a performance-test github page that I've also added.


Commit migrated from https://github.com/dotnet/corefx/commit/11ea534258ced35948e53a4ece8fb1284698bf8a
2015-09-24 10:01:40 -07: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 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