Commit Graph
492 Commits
Author SHA1 Message Date
madmir 018e1b82e8 Re-enable xunit warning 2017 (dotnet/corefx#40467)
* Re-enable xunit warning 2017

Use specialized assertions for checking for elements in collections.

* Revert Re-enable xunit warning 2017, revert some test changes

* Address PR feedback


Commit migrated from https://github.com/dotnet/corefx/commit/2fc48e13e87a4e68576d7df7af420ac2874e929e
2019-08-22 10:17:26 -04:00
Stephen Toub cae3309c0a Fix non-ASCII characters across corefx (dotnet/corefx#40318)
* Fix several non-visible characters in test files

* Replace Unicode surrogate pairs with escaped hex values

* Fix non-ASCII characters in most C# files


Commit migrated from https://github.com/dotnet/corefx/commit/027eb8e19c3498cc2c656931c3b879f5ddb63b0d
2019-08-15 08:17:46 -04:00
Stephen Toub 6a988c7d03 Enable StyleCop rules 1205, 1411, 1026, and 1000 (dotnet/corefx#40254)
* Fix StyleCop warning SA1411 (attribute ctor shouldn't use unnecessary parens)

* Fix StyleCop warning SA1026 (new[] spacing)

* Fix StyleCop warning SA1000 (consistent spacing around if, for, switch, etc.)

* Fix StyleCop warning SA1205 (partial elements should declare an access modifier)


Commit migrated from https://github.com/dotnet/corefx/commit/0c4c234a918254d569ffb0f6a607f98193608646
2019-08-12 22:45:34 +02:00
buyaa-n d0d04ec539 Fixing test failure caused from non breaking space (dotnet/corefx#40033)
* Fixing test failure caused from nbsp happening on new Mac Version

* Addressing feedback

* Using system a.m. instead of hard coded one


Commit migrated from https://github.com/dotnet/corefx/commit/79fe3d98a599c5124aa836b4da0178b2786a0cd2
2019-08-08 08:37:38 -04:00
Stephen Toub 60d1224ddd Re-enable StyleCop warnings SA1028 and SA1518 (trailing whitespace and blank lines) (dotnet/corefx#40113)
Mechanical/automated change.  The only manual changes were a) removing the two rules from the CodeAnalysis.ruleset file, b) removing spaces from one line of a .targets file that is used to generate a .cs file, and c) reverting the changes in a few test files where the naive replacement happened in the middle of a verbatim string where the whitespace actually mattered.

Commit migrated from https://github.com/dotnet/corefx/commit/09a6e66b0c2b31bd0f6e7e3170537d14027aeed0
2019-08-07 21:07:58 -04:00
Stephen Toub 573ecf1d61 Re-enable xunit warning 2006 (dotnet/corefx#39848)
Commit migrated from https://github.com/dotnet/corefx/commit/395db04daa4d76999036b3fb75ef2d431bcddfba
2019-07-29 15:11:19 -04:00
Ganbarukamo41 9be9c570be Enable analyzer for xUnit2000 (Constants and literals should be the expected argument) (dotnet/corefx#39842)
* Enable xUnit2000 analyzer

This commit enables xUnit2000 (Constants and literals should be the expected argument) and apply fixes for the existing violating codes.
* a Massive commit fixing xUnit2000
* fixing some 2003 errors

* Fix mistakes

* Fix missed errors for unix


Commit migrated from https://github.com/dotnet/corefx/commit/93d7aa1c1737b6da29d04b78557215e18eb786d4
2019-07-28 15:47:52 -07:00
Zoey McCulloughandJeremy Barton 6820071ac0 Re-enable xunit warning 2002 dotnet/corefx#39696 (dotnet/corefx#39706)
* Removed null checks on value types and enabled xunit 2002

* Updated Fill_OpenDataReader_Throws to use range check

Updated Fill_OpenDataReader_Throws to use range check for passing path

* Removed uneeded asserts and updated others

- Removed any assert for a valuetype where it was succeeded by a value type assertion (e.g. Assert.Equal(1, 1))
- Updated reflection tests to check flags for the specified scenario

* Update src/Microsoft.VisualBasic.Core/tests/FileSystemTests.cs

Co-Authored-By: Jeremy Barton <[email protected]>

* Update src/System.Reflection/tests/AssemblyNameTests.cs

Co-Authored-By: Jeremy Barton <[email protected]>

* Fixed failing reflection tests and removed Assert.NotNull for enum

* Pulled ruleset up from master to merge

* Cleaned up assert ordering for TestGuid

* Updated TestResponseWithoutContentEvents

- Asserted for 200 OK based on response from DefaultAzureServer + EmptyContentHandler


Commit migrated from https://github.com/dotnet/corefx/commit/c96e389f803b043753558878fefb575f3f85c934
2019-07-26 09:58:06 -04:00
Stephen Toub cd3ca6f991 Re-enable xunit warning 2004 (dotnet/corefx#39698)
* Replace "Assert.Equal(true, " with "Assert.True("

* Replace "Assert.Equal(false, " with "Assert.False("

And fix a few Assert.Equal(true cases that deal with objects and thus need to be reverted.

* Replace "Assert.StrictEqual(true, " with "Assert.True("

* Revert a few changes where true/false was being compared to object

* Address PR feedback


Commit migrated from https://github.com/dotnet/corefx/commit/1296bc8386a7283e319ddf723282f16651f9ea5f
2019-07-23 17:05:15 -04:00
Stephen Toub 47f8f6d47d Re-enable xunit warning 2003 (dotnet/corefx#39696)
* Replace "Assert.Equal(null, " with "Assert.Null("

* Replace "Assert.NotEqual(null, " with "Assert.NotNull("

* Replace "Assert.Same(null, " with "Assert.Null("

* Replace "Assert.StrictEqual(null, " with "Assert.Null("


Commit migrated from https://github.com/dotnet/corefx/commit/6de660a02e335eefebfcc3c81ecb0013e2a8148e
2019-07-23 15:49:33 -04:00
Viktor Hofer ef7a0e676a Enable XUnit Analyzers (dotnet/corefx#38676)
* Enable XUnit Analyzers


Commit migrated from https://github.com/dotnet/corefx/commit/b8a7f34e1b64e5c594f591aa8683f34506eb9736
2019-07-05 22:50:57 +02:00
Viktor Hofer a5d5b91672 Delete dead uapaot code (dotnet/corefx#38330)
* Delete dead uapaot code

Commit migrated from https://github.com/dotnet/corefx/commit/8c2be7893fa585cba9c094c27b69d7c8e0822ef3
2019-06-14 15:12:42 +02:00
Viktor Hofer b661c58b1c Replace netstandard test projects with tfms
Netstandard test projects are broken by design and don't support the
Microsoft.Net.Test.SDK. Replacing the netstandard tfm with the concrete
implementation tfms.


Commit migrated from https://github.com/dotnet/corefx/commit/d29c16c99c6045ee67444a7a693dd4476861c463
2019-05-30 16:18:41 +02:00
Adam Sitnik 9fe936e42a remove System.Runtime.Serialization.Json.PerformanceTests
Commit migrated from https://github.com/dotnet/corefx/commit/f98b01f3c61cb94a403fa4ac98a039a62646c245
2019-03-05 07:51:49 +01:00
Viktor Hofer f8a8530d0f Project msbuild syntax cleanup (dotnet/corefx#35686)
* Remove license header from non-shipping files

* Remove obsolete Project attributes

* Remove xml header and remove DefaultTargets


Commit migrated from https://github.com/dotnet/corefx/commit/c390ce7df50252e11f5d322276e9d19e046d1332
2019-03-03 18:55:25 +01:00
dotnet-maestro[bot] 8134ef7dea Update dependencies from dotnet/coreclr (dotnet/corefx#35051)
* Update dependencies from https://github.com/dotnet/coreclr build 20190201.72

This change updates the following dependencies
- Microsoft.NET.Sdk.IL - 3.0.0-preview-27401-72
- Microsoft.NETCore.ILAsm - 3.0.0-preview-27401-72
- Microsoft.NETCore.Runtime.CoreCLR - 3.0.0-preview-27401-72

* Update dependencies from https://github.com/dotnet/coreclr build 20190202.72

This change updates the following dependencies
- Microsoft.NET.Sdk.IL - 3.0.0-preview-27402-72
- Microsoft.NETCore.ILAsm - 3.0.0-preview-27402-72
- Microsoft.NETCore.Runtime.CoreCLR - 3.0.0-preview-27402-72

* Fixing various tests that have new behavior due to the string formatting changes for double/float.


Commit migrated from https://github.com/dotnet/corefx/commit/ebf1c9753ab5624c967b0dbd352b1e73805b1fe5
2019-02-03 16:38:37 +00:00
Viktor Hofer 66e8f64d31 Consume Microsoft.DotNet.CoreFxTesting package (dotnet/corefx#33423)
* Consume Microsoft.DotNet.CoreFxTesting package

* Remove code coverage dedicated runtime dir config files and switch to Coverlet

* Add global tool support in corefx

* Update code coverage docs

Commit migrated from https://github.com/dotnet/corefx/commit/ae38b7cc3762d832fdcebe27a0aab7b22ab2f3fa
2018-12-06 02:56:11 +01:00
Jan Kotas 005c064038 Mark tests exercising CoreLib with TestRuntime tag (dotnet/corefx#32720)
Commit migrated from https://github.com/dotnet/corefx/commit/6b299367382b28ec0b9592bf5b37db48fb02cb67
2018-10-09 12:51:04 -07:00
Paulo Janotti c6efbc3cf4 Coverage do not target CoreLib in bulk (dotnet/corefx#32537)
* Coverage do not target CoreLib in bulk

* Fix 1 project add temp nop to 2 others

* PR feedback: reuse property to disable code coverage

* PR Feedback: add dedicated property to target runtime

* System.Transactions.Local.Tests taking too long on PR


Commit migrated from https://github.com/dotnet/corefx/commit/95eeecb5184e414810bc94fdb496c5748289a720
2018-10-02 06:05:11 -07:00
Viktor Hofer 70bffcd308 Enable netfx perf runs and promote to netstandard
Commit migrated from https://github.com/dotnet/corefx/commit/1b33f6c57bdcb4a2be715a8eaf7ec2483dc5c6c0
2018-08-23 19:55:26 +02:00
Eric Erhardt 779486884e Merge master into SdkProj
Commit migrated from https://github.com/dotnet/corefx/commit/ec546de620c5248f3662d6aaca989ed382b86b6b
2018-06-28 21:28:41 -05:00
Eric Erhardt 8b6d5baf20 Change .csproj to new Configurations property
Change .sln to use the managed C# project system GUID.


Commit migrated from https://github.com/dotnet/corefx/commit/e05508a62d28f4807f85abe9cb7adf8382f792b4
2018-06-28 17:49:22 -05:00
Stephen Toub 4c9eb2ec25 Simplify built-in types across corefx tests (dotnet/corefx#30660)
Commit migrated from https://github.com/dotnet/corefx/commit/7ae1a252d7e68c5513d2658de7a401c37e9b0504
2018-06-25 22:42:04 -07:00
wtgodbe f38ceb30be Convert all .csproj files in src to SDK-style projects
Commit migrated from https://github.com/dotnet/corefx/commit/91d7e62bbf28094a2b419b87847bcd6a7658564d
2018-05-21 11:53:46 -07:00
Joshua Clark dc989dd0ca Added DCS Tests for System.Drawing Types (dotnet/corefx#27082)
* Added DCS Tests for System.Drawing Types

* Revert "Added DCS Tests for System.Drawing Types"

This reverts commit dotnet/corefx@20288796a7.

* Move Utils.cs to CommonTest project

* add references to common helper method file and Utils.cs, add tests

* update references to Utils.cs

* fix indentation


Commit migrated from https://github.com/dotnet/corefx/commit/007f6812bd1454675dbd3d15a9aca814afcd7553
2018-03-16 23:07:19 -04:00
Marco Rossignoli 9c4b4c7d91 "Don't directly throw Exception" System.Runtime.Serialization.Json (dotnet/corefx#25796)
* Don't directly throw Exception


Commit migrated from https://github.com/dotnet/corefx/commit/075df17be2057be1d47f11597f0ee735cb39f60b
2017-12-11 09:29:31 -08:00
Justin Van Patten 098ea03634 XmlJsonWriter: Avoid unnecessary allocations (dotnet/corefx#23736)
* XmlJsonWriter: Avoid unnecessary allocations

While it only runs once to initialize a readonly static field,
`CreateEscapedJsonStringTable` was allocating a lot of unnecessary
garbage. For each char in the table, either 2 box allocations for the
`string.Concat(object, object)` call, or 1 box allocation plus
`string.Format` overhead. These unnecessary allocations can be avoided
by just pre-generating the table.

* Add more DataContractJsonSerializer tests

* Fix typo


Commit migrated from https://github.com/dotnet/corefx/commit/62d27daf94f0131350c6ae32fcafc2bbd4306626
2017-09-01 15:01:18 -07:00
Huangli Wu 700f7e79d5 Add SGEN Automation. (dotnet/corefx#23090)
* Add SGEN Automation.

* update version.

* update

* delete tfm

* print out version

* Update version

* update version

* Update tests.

* Add dummy class for UWP run.

* Disable SGEN on uap.

* add casesensitive parameter for linux run.

* use dotnet instead of dotnet.exe

* update argument.

* Copy existing json file.

* add message

* Copy json to test project

* fix casesensitive

* disable running on Linux and OSX

* Add constants.

* Update condition.

* Add more condition.

* add condition

* Update condition.

* Solve the conflict and make some fixes based on feedback.

* Remove the commented code.

* Remove OSX condition.

* Remove dummy class

* Remove osx from configuration. Add condition on the ItemGroup.


Commit migrated from https://github.com/dotnet/corefx/commit/c69764406ef2450bbf0499aa3c982972676756f3
2017-08-15 14:04:00 -07:00
Tarek Mahmoud Sayed 3765a6069b Moving PlatformDetection to Corefx.Private.TestUtilities assembly (dotnet/corefx#23109)
* Moving PlatformDetection to Corefx.Private.TestUtilities assembly

The purpose of this change is to clean up all test projects instead of including the PlatformDetection code inside every test project, we’ll have it in the Corefx.Private.TestUtilities.
I have refactored the PlatformDetection to split the different implementation of Windows and Linux. If we need to do more refactoring there we can do it later as needed.

* Fix Linux BB

* Update the xunit package reference

* Fix wrong condition on one of the tests

* Update the ConditionalFact/Theory to use Type as a parameter


Commit migrated from https://github.com/dotnet/corefx/commit/878e2fcf5a9f1068015e5fada9231088663e3490
2017-08-10 22:37:36 -07:00
JimboWei 5140903df2 Native case fix (dotnet/corefx#21762)
* Add native test case

* Add native testcase

* netnative cases

* modify project file

delete file DataContractSerializerTestData.cs because the code is included in other file.

* Update XmlSerializerTests.cs

Update

* Update XmlSerializerTests.cs

remove failed case

* Update code to not check exception message

* Address review feedback.

* Update


Commit migrated from https://github.com/dotnet/corefx/commit/62b211eaedcf704d8a57102fb6304e77c41ec369
2017-07-12 10:33:46 -07:00
Hugh Bellamy 98b18432b7 Move AssertExtensions to Corefx.Private.TestUtilities (dotnet/corefx#21799)
* Move AssertExtensions to Corefx.Private.TestUtilities

* Update csprojs

* Fix Linq.Expressions uapaot build


Commit migrated from https://github.com/dotnet/corefx/commit/7e3b0db2892c56a431f8e99af9cd9381adec385a
2017-07-03 09:27:30 -07:00
Shin Mao 046fafa370 Move Entries from Library Rd.xml to Test Rd.xml. (dotnet/corefx#21668)
* Move Entries from Library Rd.xml to Test Rd.xml.

XmlSerializer.Mode iss marked as required by the System.Private.Xml.rd.xml.
Unfortunately, it pulls in the XmlSerializer type itself (has to), which
in turn pulls in a whole lot of code through its static ctor dependencies.
This caused some size-on-disk regressions.

As the property is used by our test project only, the fix is to move the
entry from the library rd.xml to the test rd.xml.

Fix dotnet/corefx#21667

* Minor changes.


Commit migrated from https://github.com/dotnet/corefx/commit/f4d12ffbef7ea1c4142f5e039602089b16bb73be
2017-06-30 09:31:32 -07:00
Shin Mao 3be9cd7eae Enable Reflection-based Serialization to Call Static Parse Method. (dotnet/corefx#21235)
* Enable Reflection-based Serialization to Call Static Parse Method.

The issue was that, on uapaot, reflection-based serialization cannot invoke primitive types's static `Parse` method due to reflection on primitive types being blocked.

Fix dotnet/corefx#21143

* minor changes.


Commit migrated from https://github.com/dotnet/corefx/commit/f700a743b52cf6e072f980fa688ca7dd89e8cdbf
2017-06-26 17:16:24 -07:00
Hugh Bellamy 7cbcd5ed85 Convert most Assert.Throws<ArgumentException> without param name to AssertExtensions (dotnet/corefx#21455)
* Registry

* Collections

* ComponentModel

* Configuration

* Data

* Globalization

* Drawing

* Diagnostics

* IO

* Linq

* Add System.Net param names in tests

* Move ArgumentExceptions in System.Private.Xml to AssertExtensions

* Add System.Reflection.* ArgumentException param names

* Add param names for System.Runtime* ArgumentExceptions

* Add ArgumentException param names to System.Security.*

* Add ArgumentException param names to System.Text.*

* Add param names to ArgumentExceptions in misc projects

* Add System.Threading.* ArgumentException param names

* Fix missing files

* Fixes for unix and netfx

* Fix more failures and revert a IdnaConformance tests to avoid merge conflicts with dotnet/corefx#21463


Commit migrated from https://github.com/dotnet/corefx/commit/59915687bb261efeae70565d0ca8990ac45ceb9c
2017-06-23 12:33:47 -07:00
Shin Mao 3cb82c6f06 Fix Serialization Tests for Collection Types. (dotnet/corefx#21144)
Fix dotnet/corefx#20478

Commit migrated from https://github.com/dotnet/corefx/commit/355172ed1bc2cef2d50da9e3641effc31b2f6afc
2017-06-16 18:24:05 -04:00
Shin Mao ae1cf1fb2e DCJS_VerifyDictionaryFormat Failed in ReflectionOnly Mode. (dotnet/corefx#20833)
Fix dotnet/corefx#20636

Commit migrated from https://github.com/dotnet/corefx/commit/6ec0ff500b5d1077107b5ef70394f13054cf7e9a
2017-06-09 11:57:43 -07:00
Shin Mao 50c0a70c52 Fix DCJS_VerifyIndentation. (dotnet/corefx#20844)
Fix dotnet/corefx#20844

Commit migrated from https://github.com/dotnet/corefx/commit/208b731703fbe81e4084bae6d52aa257045690fc
2017-06-09 09:50:44 -07:00
Shin Mao ff2777e06b Disable Two DCS/DCJS Tests on uapaot. (dotnet/corefx#20594)
* Disable some DCS tests on uapaot.

* Remove test DCS_NativeDll


Commit migrated from https://github.com/dotnet/corefx/commit/f15bdcfd2e595059525c157da8fb311a29bcd95a
2017-06-01 18:07:20 -07:00
stone-li d6fb7b5bf9 Porting Serialization Tests in NetNative Repo (dotnet/corefx#20308)
* Porting Serialization Tests in NetNative

* Move DCJS_ReadOnlyDictionaryCausingDuplicateInvalidDataContract to DCJS test project

* update

* remove [SkipOnTargetFramework]


Commit migrated from https://github.com/dotnet/corefx/commit/f912f36ca50b14482178aac0b6613529094daf6b
2017-05-31 22:26:36 -07:00
Viktor Hofer 04b535f64b Renabling ReadOnlyDictionary tests on netfx
Commit migrated from https://github.com/dotnet/corefx/commit/ba0f3adb44e328a6fed71462b11eb6b03800db97
2017-05-31 22:37:57 +02:00
Viktor Hofer 06bd357e16 Fix ReadOnlyDictionary JSON DCS test
Commit migrated from https://github.com/dotnet/corefx/commit/9e759bd80cce41423d942b5b80a2650b8334c1da
2017-05-31 22:05:45 +02:00
Shin Mao d594a1a4b4 Disable Serialization Tests Failing on Uapaot
Fix dotnet/corefx#20464


Commit migrated from https://github.com/dotnet/corefx/commit/82cdce6e8c4614a8c62b00f651890c9fc7e6a98f
2017-05-30 16:57:23 -07:00
Shin Mao e31aec50ac Fix the Build of XmlSerializer Tests on UWP (dotnet/corefx#19805)
* The PR addressed the following issues,
1. Fixed the build of XmlSerializer tests on UWP.
2. Fixed a bug that caused pre-generated XmlSerializers being used in reflection only mode.
3. Fixed the incorrect usage of uap/uapaot in Configrations.props across all serialization test projects.

Fix dotnet/corefx#19804.

* Made XmlSerializer.Mode public.

Made XmlSerializer.Mode public so that we can set the property using reflection on UWP.

* Refactor the fix.


Commit migrated from https://github.com/dotnet/corefx/commit/00829fcf72f3c6160baaaf05fd2333d55cddd5fb
2017-05-18 11:49:12 -07:00
Shin Mao c0a4e53f73 Fix rd.xml for Serialization Reflection Only Mode. (dotnet/corefx#19556)
* Fix rd.xml for Serialization Reflection Only Mode.

Fix dotnet/corefx#19067

* Removed GenericParameter Entries.


Commit migrated from https://github.com/dotnet/corefx/commit/3365ac6e8d981062e0170a67e06f907fea98e9a2
2017-05-10 13:05:46 -07:00
Santiago Fernandez Madero 660abe4a95 Disable desktop tests (dotnet/corefx#19522)
* Disable more desktop tests

Commit migrated from https://github.com/dotnet/corefx/commit/0da7c8ad0cf800d878f85b424af520c42acff9fd
2017-05-08 23:12:41 -07:00
Wes Haggard 3968a70735 Refresh VS Configurations
Commit migrated from https://github.com/dotnet/corefx/commit/39d309a9be077e110bab4f05f4196bad95f0d5b4
2017-05-03 09:36:31 -07:00
stone-li 8cbf144f2e Try to fix the issue in fedora (dotnet/corefx#19030)
* Try to fix the issue in fedora

* update

We can't find the time zone setting which set "-0753" in the failed log.


Commit migrated from https://github.com/dotnet/corefx/commit/6597a6357cb81c0453683d2560ae739fa18cbe21
2017-04-27 14:35:44 -07:00
Shin Mao c97666d030 Fixed a bug with DateTimeOffsetAdapter. (dotnet/corefx#18958)
* Fixed a bug with DateTimeOffsetAdapter.

The bug caused behavior difference between NetCore and NetFx.
I also fixed a few tests for DateTime.

Fix dotnet/corefx#18802
Fix dotnet/corefx#18512

* Addressed feedback.


Commit migrated from https://github.com/dotnet/corefx/commit/f4f343182bcb542e672eea0194b8ffe48d527879
2017-04-26 19:25:30 -07:00
Tijoy Tom 4b0be9882a Merge pull request dotnet/corefx#19006 from tijoytom/master
Adding rdxml to Serialization reflection only tests.

Commit migrated from https://github.com/dotnet/corefx/commit/feae0b6a325858adf1a697d6b2576a9424352663
2017-04-26 18:14:37 -07:00
Shin Mao d17fcb18c5 Fix Configurations.props for Serialization Projects. (dotnet/corefx#18991)
* Fix Configurations.props for Serialization Projects.

* remvoed SerializationTypes.netcoreapp.cs.


Commit migrated from https://github.com/dotnet/corefx/commit/ca8e35dfd300484d91102dbb035144d2519c9f23
2017-04-26 15:55:36 -07:00