Commit Graph
550 Commits
Author SHA1 Message Date
dotnet-maestro[bot] 608418d496 [master] Update dependencies from dotnet/coreclr (dotnet/corefx#42443)
* Arm64: Update reference assembly for ReverseBitOrder

* Arm64: Update reference assembly for AddAcross

* Add UnzipEven & UnzipOdd

* Add Ziplow & ZipHigh

* Expose and test MemoryExtensions.Sort

* Improve diagnostics from failing SendRecvIovMaxTcp_Success test

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


Commit migrated from https://github.com/dotnet/corefx/commit/2e513ecac65f5a3fa9433df6f267544435914611
2019-11-09 20:33:43 +00:00
Marco Rossignoli dcde54fdd2 Implement SequenceReader.TryPeek(long offset, out T value) (dotnet/corefx#42364)
* implement trypeek offset

* updates

* address PR feedback

* amend comments


Commit migrated from https://github.com/dotnet/corefx/commit/43d30a1184fda891d53062b42f7b4fd8f5303e06
2019-11-07 10:31:48 -08:00
Levi Broderick 5d8d5738b2 Add Encoding extensions which work with sequences (dotnet/corefx#41810)
Commit migrated from https://github.com/dotnet/corefx/commit/6696f1665bb01bb571a3fc333f85a0ab0945fddf
2019-10-22 15:18:05 -07:00
Viktor Hofer 9b88ca1d72 Remove UAP target (dotnet/corefx#41759)
* Remove Uap target

* Remove RemoteInvokeForUap wrapper calls entirely

* Harvest S.D.SqlClient on UWP

* Disable UWP PInvoke analyzer

* Enable WindowsRuntime* tests on netcoreapp

Commit migrated from https://github.com/dotnet/corefx/commit/3b6ec2ba944fb72f921f95b99b6ebf2e7bb3dc5a
2019-10-17 15:04:39 +02:00
Santiago Fernandez Madero ebce975828 Add missing dummy types to reference assemblies (dotnet/corefx#41147)
Commit migrated from https://github.com/dotnet/corefx/commit/4aea703673e942756c02b222e6b5babaf8612a25
2019-09-16 22:10:48 -07:00
Stephen Toub 8e061d8c2c Replace HashHelpers.Combine with HashCode.Combine in netcoreapp projects (dotnet/corefx#40935)
Commit migrated from https://github.com/dotnet/corefx/commit/8c221ca346b64e1e80ab4bde240b0f479bd203fc
2019-09-09 16:44:56 -04:00
Viktor Hofer d5079dda17 Remove ProjectGUIDs from project files and Project and Name attributes from P2Ps (dotnet/corefx#40926)
* Remove ProjectGUIDs from P2Ps

* Remove ProjectGUIDs from project files

Commit migrated from https://github.com/dotnet/corefx/commit/c22714d65151968a17c3b232748880d5e7961dee
2019-09-09 18:21:25 +02:00
Santiago Fernandez Madero 67f48653f1 Add missing dummy primitive to ReadOnlySequence<T>.Enumerator (dotnet/corefx#40910)
Commit migrated from https://github.com/dotnet/corefx/commit/59c6b1ab96aa2e99ed6ecb33a8bcf9283ce1ea27
2019-09-07 10:54:58 -04:00
Stephen Toub 9548bea38a Make many fields readonly or const across corefx (dotnet/corefx#40298)
* Make many fields readonly or const

* Address PR feedback

- Updated asn.xslt
- Regenerated .xml.cs files


Commit migrated from https://github.com/dotnet/corefx/commit/0cc22ccba707d7552159363d586262fa9c4e8a2a
2019-08-14 14:19:30 -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
Roman Marusyk ed0c4fe5dc Refactor and clean up the SpanTestHelper helpers for asserting that a ref struct method throws (dotnet/corefx#39186)
* Refactor and clean up the SpanTestHelper helpers for asserting that a ref struct method throws

* Fix build

* Fix StringTests

* Fix StringTests

* Code review fixes

* Code review fixes

* Fix


Commit migrated from https://github.com/dotnet/corefx/commit/31e0725aadb8c241652ed20ffa93205005e3a625
2019-08-08 20:35:03 -07: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 c8df52dd02 Re-enable xunit warning 1026 (unused theory arguments) (dotnet/corefx#40079)
* Re-enable xunit warning 1026 (unused theory arguments)

Some of these were addressed by explicitly discarding theory arguments, generally in cases where either a) the argument was being used as a description to aid in debugging failures, or b) the argument was part of a member data that was used by some theories and not by others all sharing the same member data.

However, there are quite a few legitimate bugs being fixed here, enough that highlights it's worthwhile to have the rule enabled.  Some are cases where the argument was supposed to be used but wasn't.  Some are cases where the argument isn't used at all, and in many cases where we end up running the same test over and over and wasting cycles.  Some are cases where we're unnecessarily including irrelevant inputs to the tests and making the input data more complicated than it needs to be.  Etc.

(Along the way, I also fixed some cases where VS was warning about lambdas being used instead of local functions, and in cases where I agreed I fixed them, via auto-fixers.)

* Address PR feedback


Commit migrated from https://github.com/dotnet/corefx/commit/daf93ee0e5e5233141eb762c64b6049cfd7d123e
2019-08-07 08:00:27 +02:00
Stephen Toub 6e335aa872 Enable several StyleCopAnalyzers (dotnet/corefx#39921)
* Fix ordering of keywords in member signatures

* Add StyeCop.Analyzers

Most rules are disabled.  Many of them we'll want to leave disabled, however there are a handful it'll be good to enable over time.

* Use built-in type alias

* Fix straggling stylecop warnings in all configurations

* Replace tabs with spaces


Commit migrated from https://github.com/dotnet/corefx/commit/a12c557a72988070b8624cc7ecc46899629895c4
2019-07-31 19:10:59 -04:00
Stephen Toub 423f255b6d Re-enable xunit warning 2005 (dotnet/corefx#39866)
Commit migrated from https://github.com/dotnet/corefx/commit/7b013c44b8d38df51f3ec8db64bdcb1f83a8b421
2019-07-29 20:56:11 -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
Stephen Toub aa11d6cbbf Re-enable CA1200 (avoid cref tag prefixes) (dotnet/corefx#39773)
* Re-enable CA1200 (avoid cref tag prefixes)

Specifying the prefix prevents the compiler from validating what comes after it.

* Fix netfx build


Commit migrated from https://github.com/dotnet/corefx/commit/58a4d24eb808936f7dc61e68265e968291470b42
2019-07-25 22:04:39 -04:00
Steve Harter 3cfddb1f54 Reduce memory usage of tests and fix asserts for escaped size (dotnet/corefx#39751)
Commit migrated from https://github.com/dotnet/corefx/commit/3e36efc9a3c3f22b87c5f33a25c0ad5dbfeb9396
2019-07-25 15:24:44 -05:00
Stephen Toub bf9054c38c Re-enable xUnit1025 (duplicate InlineData) (dotnet/corefx#39737)
Commit migrated from https://github.com/dotnet/corefx/commit/47d96f89df41ce18d3ba77b38007ec68f7f66fc6
2019-07-25 10:45:20 +02: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
Stephen Toub c36edeac9b Re-enable ~20 xunit analyzers (dotnet/corefx#39671)
* Re-enable ~20 xunit analyzers

All but one of these had no associated warnings firing.  I fixed one warning to be able to re-enable another analyzer.

* Fix netfx build failures


Commit migrated from https://github.com/dotnet/corefx/commit/c60b8172cfcd1e7f0d8104872f279781fd288b68
2019-07-22 16:45:03 -04:00
Stephen Toub 625eca6c4b Remove a few unnecessary !s (dotnet/corefx#39531)
Commit migrated from https://github.com/dotnet/corefx/commit/2b6f38911bb45548c8d1db015526518276e6c888
2019-07-16 11:10:12 -04:00
Stephen Toub 97d1516fdf Remove stale nullable !s and pragmas (dotnet/corefx#39376)
Also update TODO-NULLABLE comments to be more specific where appropriate.

Commit migrated from https://github.com/dotnet/corefx/commit/1ea12d43e92e9ceb0c28157d81ffd6224cf05706
2019-07-11 08:51:57 -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
Stephen Toub 06703f3d51 Workaround potential compiler nullability bug
Commit migrated from https://github.com/dotnet/corefx/commit/5e3b0ae04986e9527eb51d3717ab96727c215c03
2019-06-28 22:26:40 -04:00
Prashanth Govindarajan e078defd58 Improve default handling in ReadOnlySequence.Slice (dotnet/corefx#38431)
* Improve default handling in ReadOnlySequence.Slice


Commit migrated from https://github.com/dotnet/corefx/commit/5f6cba88228bc48e4d0cb6ce2608eeeb7938c71b
2019-06-28 09:42:10 -07:00
Anirudh Agnihotry 59c5617312 Tests for nullable reference types in Span apis (dotnet/corefx#38625)
* Some more null index checks

* adding test for ReadonlySpan overload and refactoring all overloads into a single test

* FIxing the tests with ben change and rebasing


Commit migrated from https://github.com/dotnet/corefx/commit/96a713d3434af8d443f87874e915f5d36c47a564
2019-06-26 11:54:06 -07:00
Ahson Khan accb316004 Use SpanTestHelpers from Common within StringTests rather than TestHelpers which doesn't exist (dotnet/corefx#38865)
* Revert "Fix build break for TestHelpers, move to common and rename to MemoryTestHelpers"

This reverts commit dotnet/corefx@61f9b4c443.

* Use SpanTestHelpers from Common rather than TestHelpers which doesn't
exist.


Commit migrated from https://github.com/dotnet/corefx/commit/edbee902747970e86dbcf19727e72b8216946bb8
2019-06-25 11:36:15 -07:00
Santiago Fernandez Madero 29a18569e0 Fix build break for TestHelpers, move to common and rename to MemoryTestHelpers
Commit migrated from https://github.com/dotnet/corefx/commit/61f9b4c44336a7e32f8679e0a186a9177d384c49
2019-06-24 19:08:57 -05:00
Marco Rossignoli ec73aaf4b4 update MemoryExtensions ToUpper/ToLower tests for throws on overlapping buffer
address PR feedback

update tests

Address PR feedback

address PR feedback


Commit migrated from https://github.com/dotnet/corefx/commit/3d9e91a1885577f0043884f8818c9c3c97a72298
2019-06-24 19:08:57 -05:00
dotnet-maestro[bot] a83ac4abab [master] Update dependencies from dotnet/coreclr (dotnet/corefx#38679)
* Update dependencies from https://github.com/dotnet/coreclr build 20190618.4

- Microsoft.NET.Sdk.IL - 3.0.0-preview7.19318.4
- Microsoft.NETCore.ILAsm - 3.0.0-preview7.19318.4
- Microsoft.NETCore.Runtime.CoreCLR - 3.0.0-preview7.19318.4

* IndexOfAny ZeroLength values

* Test updates for relaxed Array.Copy type checks

Fixes dotnet/corefx#38535


Commit migrated from https://github.com/dotnet/corefx/commit/51a9c8f1dc56d366f5eb435f231052e2614c7a76
2019-06-20 01:50:19 +00:00
Adam Sitnik d4d2714cd9 writing to too small buffer should throw an exception (dotnet/corefx#37661)
fixes dotnet/corefx#35231

Commit migrated from https://github.com/dotnet/corefx/commit/721a570b005c53a839947603dcf76f8a3e5fc56a
2019-06-19 10:06:28 +02:00
Santiago Fernandez Madero 9e99b02b79 Add nullable annotations to System.Memory ref assembly (dotnet/corefx#38299)
* Add nullable annotations to System.Memory ref assembly

* Nullable feedback

* Include where T inside pragma to be consistent with sources

* Make CultureInfo nullable in ToLower/Upper to match updates we did on String

* Revert comparer nullable change in BinarySearch per pr feedback in implementation


Commit migrated from https://github.com/dotnet/corefx/commit/ad961d0dc9d9054942c6a7e3a8c96c8684dd16cc
2019-06-18 16:16:18 -07:00
Viktor Hofer 5f98ba6a2b Enable project restore for test projects (dotnet/corefx#38151)
* Factor out repo restore into seperate props/targets

* Use configuration system msbuild sdk

* Remove XUnit.Runtime.depproj

* Remove TargetGroup usages in test projects

* Fix ILLink configuration

The ILLink package contains netcoreapp2.0 assets which are compatible
with netstandard2.0. Removing the old TargetFramework to restore
successfully.

* Remove usages from TargetGroup in Directory.Build.props

* Remove dead net4* configurations

* Change tests.builds to tests.proj sdk proj

* Make externals dir proj an sdk project

* Consume Microsoft.DotNet.CoreFxTesting as an msbuild sdk

* Use runtimeconfig.template.json

* Remove SupplementalTestData

* Map shared framework version to product version

* Stop binplacing tests

* Move some tool depprojs to targets during restore

* Remove dead code

* Use PackageReference instead of RefFromRuntime in test

* Disable using an apphost

* Copy compression testdata manually cause unicode bug

* Remove target batching in optimizationData

* Reference packaging tools from CoreFx.Private.TestUtilities


Commit migrated from https://github.com/dotnet/corefx/commit/c4c1985531cc1f25c805bbc4801b85c98e0dfee0
2019-06-15 21:27:13 +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
Stephen Toub 37806d0f7b Update corefx for compiler nullable attribute updates
Commit migrated from https://github.com/dotnet/corefx/commit/3c129ac0340a3843ab5b00a9c730730e7b60729b
2019-06-13 18:26:36 -04:00
Anirudh Agnihotry 25b2471bcc Tests for nullable reference types in Span apis (dotnet/corefx#38468)
Commit migrated from https://github.com/dotnet/corefx/commit/159fbc07c938f5ee6f136c60559ca16dc295d859
2019-06-13 15:14:00 -07:00
Stephen Toub ab3ee8ae86 Add nullable attributes to partial facade implementations (dotnet/corefx#38309)
* Add nullable attributes to partial facade implementations

* Address PR feedback


Commit migrated from https://github.com/dotnet/corefx/commit/3ea7b55e275fb6367f67e7fb0432be4bb3902f09
2019-06-06 21:54:11 -04:00
Viktor Hofer cacc1ff968 Remove NetNative uapaot support (dotnet/corefx#38170)
* Remove NetNative uapaot support

* Remove uapaot assets from packages

* Disable emit lightweight and ilgen version check


Commit migrated from https://github.com/dotnet/corefx/commit/ab58ff6e649852b85fdb99b15992a2fa3a7d8834
2019-06-06 21:39:46 +02:00
Bradley Grainger 20a33da60e Improve ReadOnlySequence.Slice docs (dotnet/corefx#38150)
* Improve ReadOnlySequence.Slice docs. Fixes dotnet/corefx#32021

* Synchronise documentation with dotnet-api-docs.


Commit migrated from https://github.com/dotnet/corefx/commit/7626863d5a48f771513f7d22977189aab14dcd0b
2019-06-06 09:29:10 -04:00
Santiago Fernandez Madero 9d04b1b8fc Re-generate System.Memory ref assembly against implementation (dotnet/corefx#38287)
Commit migrated from https://github.com/dotnet/corefx/commit/7b87ec99d747478ddcb1eba048411be24e9b9b87
2019-06-05 21:11:32 -07: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
Jeremy Kuhne 95a80b335c Add readonly modifiers to SequenceReader. (dotnet/corefx#37718)
* Add readonly modifiers to SequenceReader.

Clearly marking where we don't mutate faciliates passing stack allocated spans and allows composing additional helpers that also want to describe that they don't mutate.

* Address some feedback

* Cache length again

* Change to compare to < 0

* put back the private field stripped out by the tool

* Add dummy primitive for SequenceReader


Commit migrated from https://github.com/dotnet/corefx/commit/0bae12c1967eaee2f1b20421df768e70d73da69c
2019-05-29 14:09:09 -07:00
Günther Foidl af1995c68f Base64 encoding with simd-support (dotnet/corefx#34529)
* Optimized scalar code-path

* Fixed label names

* Implemented vectorized versions

* Added reference to source of algorithm

* Added back missing namespace

* Unsafe.Add instead of Unsafe.Subtract

Fixed build-failure (https://ci3.dot.net/job/dotnet_corefx/job/master/job/linux-musl-TGroup_netcoreapp+CGroup_Debug+AGroup_x64+TestOuter_false_prtest/8247/console)
Seems like the internal Unsafe doesn't have a Subtract method, so use Add instead.

* Added THIRD-PARTY-NOTICES

* PR Feedback

* THIRD-PARTY-NOTICES in repo-base instead instead in folder

Cf. https://github.com/dotnet/corefx/pull/34529#issuecomment-453510246

* PR Feedback

* https://github.com/dotnet/corefx/pull/34529#discussion_r247200659
* https://github.com/dotnet/corefx/pull/34529#discussion_r247214904

* Rewritten to use raw-pointers instead of GC-tracked refs

Cf. https://github.com/dotnet/corefx/pull/34529#discussion_r247197669

* Initialized the static fields directly (i.e. w/o cctor)

Cf. https://github.com/dotnet/corefx/pull/34529#discussion_r247193419

* Added a test for decoding a (encoded) Guid

The case with decoding encoded 16 bytes was not covered by tests, so a wrong code got commited before, resulting
in DestinationTooSmall instead of the correct Done.

* EncodingMap / DecodingMap as byref instead of pointer

So got rid of the `rep stosd` in the prolog. Cf. https://github.com/dotnet/corefx/pull/34529#discussion_r248075157

* PR Feedback

* https://github.com/dotnet/corefx/pull/34529#discussion_r262165689

* Debug.Fail instead throwing for the assertion

Cf. https://github.com/dotnet/corefx/pull/34529#discussion_r263894301

* ROSpan for static data

* ROS for lookup maps

* In decode avoided stack spill and hoisted zero-vector outside the loops

Cf. https://github.com/dotnet/corefx/pull/34529#discussion_r287613894

* Assert assumption about destLength

Cf. https://github.com/dotnet/corefx/pull/34529#discussion_r287605561

* Added comments from original source and some changes to variable names

Cf. https://github.com/dotnet/corefx/pull/34529#discussion_r287606634 and https://github.com/dotnet/corefx/pull/34529#discussion_r287606714

* Use TestZ instead of MoveMask in AVX2-path

Cf. https://github.com/dotnet/corefx/pull/34529#discussion_r287825385

* Fixed too complicated mask2F creation

Improved the version done in dotnet/corefx@c8b6cb3387, so the static data isn't needed and code is more compact and readable.


Commit migrated from https://github.com/dotnet/corefx/commit/036e0a64bd190e80f1685c3b267e495b03bb2962
2019-05-29 08:29:31 -07:00
Santiago Fernandez Madero 5c5b7bbf70 Update to new compiler toolset by using arcade's property (dotnet/corefx#37883)
* Update to new compiler toolset by using arcade's property

* Run manual darc update


Commit migrated from https://github.com/dotnet/corefx/commit/daa005b23d4954d4a41b1663171d6ada2d960bd2
2019-05-22 21:28:22 -07:00
Jeremy Kuhne d6fdb2aafe Improve test coverage for SequenceReader. (dotnet/corefx#37416)
One of the tests was inadvertently private. Added additional coverage and clarification text to TryCopyTo.

Commit migrated from https://github.com/dotnet/corefx/commit/203f61e27e93b098dcc0736fbfe2b38528dcf9aa
2019-05-15 12:08:19 -07:00
Stephen Toub 445267a46d Nullable: System.Memory.dll
Commit migrated from https://github.com/dotnet/corefx/commit/789f770a67472896d69f77b9516dff12f8270eac
2019-05-09 06:42:58 -04:00
Jose Perez Rodriguez 7d8177c8c3 Fix VS Configurations for all projects in corefx (dotnet/corefx#37477)
Commit migrated from https://github.com/dotnet/corefx/commit/1c48331eb5784c58b81309665257f454abd7d322
2019-05-06 14:46:10 -07:00
Stephen Toub 8d80b9e768 Fix MultipleCallsToGetSpan test with pinning (dotnet/corefx#37373)
The test is getting two pointers to an array and validating that they're the same pointer.  But if the array is moved by the GC between the two calls, the test fails.  The fix is to pin the array.

Commit migrated from https://github.com/dotnet/corefx/commit/1a2401cd4c3f56c022173d2ac1e0c34799d387e3
2019-05-02 14:41:02 -04:00
Dan Moseley 651310ae61 Typos etc (dotnet/corefx#37349)
Commit migrated from https://github.com/dotnet/corefx/commit/b57618e6d1caa03c809e343885f06a5b0791b2c2
2019-05-01 21:14:26 -07:00