Commit Graph
39 Commits
Author SHA1 Message Date
Karthik Rajasekaran 5c93b350d3 Add NugetTargetMoniker to test projects and update remaining project references to pkgproj
Commit migrated from https://github.com/dotnet/corefx/commit/13e03705ced065850dc65900fccfd930426e87d7
2016-06-29 12:30:05 -07:00
Hugh Bellamy d4a1f93b53 Add some more tests for Encoding and Encoder/Decoder Fallbacks
- Encoding (ctor, GetEncoding)
- DecoderExceptionFallback
- EncoderExceptionFallback
- DecoderReplacementFallback
- EncoderReplacementFallback


Commit migrated from https://github.com/dotnet/corefx/commit/29e32d8b563e7d04bafb30a9e3e76d4c40bb3689
2016-05-02 22:57:11 +01:00
Hugh Bellamy 088cceb472 Add Latin1Encoding tests
- Decode, Encode
- GetMaxCharCount, GetMaxByteCount
- GetPreamble, Clone, Equals
- EncoderFallback, DecoderFallback
- CodePage, WebName, EncodingName, IsSingleByte

Also fixes up the NegativeEncodingTests to not hardcode specific
Encodings

Contributes to dotnet/corefx#8114


Commit migrated from https://github.com/dotnet/corefx/commit/8714473001b21a33a173e72617d0abac7fc8999d
2016-04-27 20:47:25 +01:00
Tarek Mahmoud Sayed a2b3c6641c Merge pull request dotnet/corefx#8087 from hughbe/utf7-methods-properties-ctor
Add ctor, method and property tests to UTF7Encoding

Commit migrated from https://github.com/dotnet/corefx/commit/8b107f808c21a1884de435a423cbd3ddf2707567
2016-04-26 13:06:14 -07:00
Hugh Bellamy c0de6dd24d Cleanup Encoding tests
- GetEncoding
- Convert


Commit migrated from https://github.com/dotnet/corefx/commit/4285eccc05f69dfa16278be5ada0bf884de56540
2016-04-26 17:48:45 +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 82e6681aed Add UTF32 tests
- Encoding and decoding valid chars and bytes
- Other methods
- Ctors
- Properties


Commit migrated from https://github.com/dotnet/corefx/commit/273c114e0877d4d38d901dc76610fd8e2e465a0c
2016-04-25 23:04:13 +01:00
Stephen Toub 816e63c163 Merge pull request dotnet/corefx#8058 from hughbe/unicode-methods-properties-ctor
Add ctor, method and property tests to UnicodeEncoding

Commit migrated from https://github.com/dotnet/corefx/commit/2f334dc7578bcd56dfd4b1761c55cde8c6135110
2016-04-25 16:36:50 -04:00
Tarek Mahmoud Sayed 4bf81dffa2 Merge pull request dotnet/corefx#8021 from hughbe/ascii-methods-properties
Add ctor, method and property tests to AsciiEncoding

Commit migrated from https://github.com/dotnet/corefx/commit/a06d4c764d8ab6a8b430974c05d17c97b0641a32
2016-04-25 13:02:08 -07:00
Hugh Bellamy b5eecb5fd7 Add ctor, method and property tests to UnicodeEncoding
- Ctor, Ctor_Bool, Ctor_Bool_Bool
- EncoderFallback, DecoderFallback
- WebName, CodePage, EncodingName, IsSingleByte
- Clone, Equals, GetPreamble


Commit migrated from https://github.com/dotnet/corefx/commit/0e963579f6be6846b72ebaa4a62a242a2af18c66
2016-04-25 18:59:08 +01: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 4b98704c1d Add ctor, method and property tests to AsciiEncoding
- Ctor
- EncoderFallback, DecoderFallback
- WebName, CodePage, EncodingName, IsSingleByte
- Clone, Equals, GetPreamble


Commit migrated from https://github.com/dotnet/corefx/commit/bd6e5d8de8b081b8adf317c28bdb5c24eb4c5cd3
2016-04-23 09:30:29 +01:00
Hugh Bellamy fcbd2163a9 Move legacy ASCIIEncoding tests to the modern files
- Also removes some old tests that are now duplicates and were undeleted
due to the recent cleanup


Commit migrated from https://github.com/dotnet/corefx/commit/1ee307e8fd52aaecdf6c920c38c08c73514916b5
2016-04-23 00:13:58 +01:00
Hugh Bellamy 1e9619a74c Move legacy UnicodeEncoding tests to modern files
- Take advantage of EncodingTestHelpers and NegativeEncodingTestHelpers
to remove boilerplate and duplicated code/tests (e.g. we don't need to
test data for all overloads or GetCharCount/GetByteCount as the helpers
handle this for us)
- Move encode and decode tests to the new files


Commit migrated from https://github.com/dotnet/corefx/commit/fc607f9119c24939aa78af0f0908fe54fc5f271f
2016-04-22 18:20:12 +01: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
Tarek Mahmoud Sayed 86db75b827 Merge pull request dotnet/corefx#7963 from hughbe/unicode-encoding-tests
Add tests for UnicodeEncoding

Commit migrated from https://github.com/dotnet/corefx/commit/088ddcd6bc5424b2ce84c0c81b94d4e87f74ddee
2016-04-21 11:41:50 -07:00
Tarek Mahmoud Sayed 2dd7b69581 Merge pull request dotnet/corefx#7955 from hughbe/encoding-neg
Add negative tests for unsafe encoding and decoding

Commit migrated from https://github.com/dotnet/corefx/commit/97ffe974392399166f9ecef60585c964ef4955d1
2016-04-21 10:54:34 -07:00
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 53944240c3 Add tests for UnicodeEncoding
- All ASCII chars
- Valid surrogate pairs
- Invalid surrogate pairs
- Invalid unicode chars
- Invalid bytes


Commit migrated from https://github.com/dotnet/corefx/commit/3be7b3c8968cd558c4ccbedfa4e1b89bce9c63ad
2016-04-21 18:28:43 +01:00
Hugh Bellamy 750dd9fb01 Address PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/44526a3b42e6df1ad22a684dab3974af4d4f4a9d
2016-04-21 17:25:11 +01: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 5a22741170 Add negative tests for unsafe encoding and decoding
Commit migrated from https://github.com/dotnet/corefx/commit/0a7d12706d64fb1b7f335e477791a690edbf64a8
2016-04-21 16:53:15 +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