Commit Graph
50 Commits
Author SHA1 Message Date
Tomas Matousek 63e76b81d7 Organize test source files
Commit migrated from https://github.com/dotnet/corefx/commit/793bd156e1e81f333ee6feb63862e8b101f075d3
2016-04-29 15:03:53 -07:00
Tomas Matousek 243e5ba426 Encoders: Argument validation and API cleanup
Commit migrated from https://github.com/dotnet/corefx/commit/525a8c4dcae66a67e60f7785b6e03cef84b0ceea
2016-04-29 15:03:47 -07:00
Tomas Matousek 6747be83a1 Add tests
Commit migrated from https://github.com/dotnet/corefx/commit/c5814310ee77d120765b6149d317dc9ffe198557
2016-04-27 15:12:10 -07:00
Tomas Matousek 38ab29d69c Add more tests and comments
Commit migrated from https://github.com/dotnet/corefx/commit/e4cc653667898d444aed85b76865635adcc6828b
2016-04-25 13:00:39 -07:00
Tomas Matousek 019ffc6a0f Implements MetadataReaderProvider
Commit migrated from https://github.com/dotnet/corefx/commit/8d135a6ae8e7121bebd37be836fe687d9b5ffcb9
2016-04-24 12:27:18 -07:00
Eric Mellino 722505f95f Revert PR 7188.
The newest version of MSBuild has fixed the embedded resource culture
issue that was preventing us from using periods in embedded resource
names. This reverts the changes to the System.Reflection.Metadata tests
which removed the periods from some embedded resource file names in the
test assembly.


Commit migrated from https://github.com/dotnet/corefx/commit/933a0cd2faaa26b479b75ae5e54a5b57ed9c15f6
2016-03-28 13:20:08 -07:00
Eric Mellino f00f7619cc Remove periods from embedded resource names in Metadata tests
Commit migrated from https://github.com/dotnet/corefx/commit/d15fca0f9bd9d563869005c3927618b375918f81
2016-03-23 16:00:41 -07:00
Nick Guerrera dfc1c8f5dd Add test coverage for CustomAttributeDecoder
Commit migrated from https://github.com/dotnet/corefx/commit/6ffebba142ec4f9b500a646da8d5754eb4576f07
2016-02-29 17:23:01 -08:00
Jose Perez Rodriguez d4b98f723c Using Full Framework roslyn compilers for Windows builds.
Commit migrated from https://github.com/dotnet/corefx/commit/3b87fdb8a6de3d40560a2db67e52cfffb59aec59
2016-02-19 09:29:21 -08:00
Nick Guerrera 1a9b15e48d Split S.R.Metadata v1.2 and v1.3
We have to lock down a v1.2 S.R.Metadata now, but there are features
(metadata writer, signature decoder) that we're pushing out to a v1.3.

Set up the build to produce both packages and configure the project
such that the default configurations are v1.2 and the *_Future
configurations are v1.3.

Currently, v1.2 just internalizes the features of v1.3, but we can
consider stripping them out entirely.


Commit migrated from https://github.com/dotnet/corefx/commit/7152971f4a940aa897c29fcdbed8934a692a928e
2016-02-05 13:22:17 -08:00
Tomáš Matoušek 468dd309cc Merge pull request dotnet/corefx#5719 from tmat/PdbStreamValidation
Disallow nil MethodDef token as an entry-point in Portable PDB

Commit migrated from https://github.com/dotnet/corefx/commit/8ed29621f59b74d881421c9df2d4d9c13916653c
2016-01-31 11:25:57 -08:00
Tomas Matousek ff193c272e Disallow nil MethodDef token as an entry-point in Portable PDB
Commit migrated from https://github.com/dotnet/corefx/commit/f2124b43f8f77c5fcc2621f03c48d2ff25ed41d6
2016-01-26 18:51:00 -08:00
Tomas Matousek 75c9b24fde Misc small API additions
Commit migrated from https://github.com/dotnet/corefx/commit/538463a0247a4b77de87283e2d8d196d6f92369b
2016-01-22 18:24:34 -08:00
Tomas Matousek c64e8e45e2 Updates System.Reflection.Metadata.sln to VS2015 and the project language to C# 6
Commit migrated from https://github.com/dotnet/corefx/commit/964a3af7cceb68a440d1762d4529ef9d11567596
2016-01-11 11:35:08 -08:00
Nick Guerrera ff862c42ef Add signature decoder to System.Reflection.Metadata
Up to now, System.Reflection.Metadata provides low-level access to
ECMA-335 CLI metadata, but only provides signatures as blobs that must
be parsed with direct knowledge of the format as described in the
section II.23.2 of the CLI specification. There is a BlobReader for
reading various elements out of blobs, but it is up to the caller to
read the right things at the right positions.

This was by-design as the library is designed to sit at the lowest level
behind the scenes of higher level API such as Reflection proper, Roslyn,
or CCI.

The challenge with signatures is that they are variable-length and
encode tree structures, and each higher level model that could sit on
top of System.Reflection.Metadata will have different representations
for the trees. We do not want to introduce an API to build a fully
formed tree that then has to be traversed and rewritten to match the
actual use case.

This API is therefore a middle ground between:

 1. Here are the bytes and some helpers. Read the spec to decode.
    (Status quo.)

 2. Yet another high-level metadata API.
    (Out of scope for this layer.)

It works as follows:

 1. The caller chooses an arbitrary representation, TType, for type
    symbols and implements ISignatureTypeProvider<TType> .

 2. Signatures are parsed by recursive descent and the provider is
    called to create new type nodes:

     * Give me the TType that represents this primitive
     * Give me the TType that represents this TypeDefinition
     * Give me the TType that represents an array of this other TType
     * etc.


Commit migrated from https://github.com/dotnet/corefx/commit/0bc15ebcff855acf36d0970d0ed95d770adf2882
2016-01-07 10:49:12 -08:00
Tomas Matousek 0dc416c285 Implements PE Debug Directory reader.
Commit migrated from https://github.com/dotnet/corefx/commit/bd40b7bc4674a5f536f94f0f80b6c6304650ac87
2015-12-16 03:32:05 +01:00
Matt Ellis fbeb9a7b3a Don't set debug properties in projects
Setting <DebugSymbols> and <DebugType> like this breaks building cross
platform because Roslyn can't emit PDBs. Our top level properties files
define these settings to false when building cross platform and there is
no reason these projects need to be doing their own thing.


Commit migrated from https://github.com/dotnet/corefx/commit/f430cedb84b28ed40b688f8fe5cd6ba5769db9e0
2015-10-27 17:35:45 -07:00
Tomas Matousek 8de14b63f9 Add portable PDB reader to System.Reflection.Metadata
Commit migrated from https://github.com/dotnet/corefx/commit/9ff902c77ad34959c154b1289dac19a54ba2cffb
2015-09-30 12:09:41 -07:00
stephentoub 0c8020ecf6 Enable warnings-as-errors for the build
I also explicitly enabled WarningLevel 4 for all projects, and I fixed a few straggling warnings that fire with the VS2013 compiler but not with VS2015 (by design).


Commit migrated from https://github.com/dotnet/corefx/commit/1a732c1b696979a4d5c659e4f35fc990432e66f4
2015-07-01 14:14:37 -04:00
Ben Bader 4def74bd80 Remove null-padding from parsed section-header names.
Fixes issue dotnet/corefx#1805.


Commit migrated from https://github.com/dotnet/corefx/commit/e9dcbba215d5e2abc9e82d27b7b5f53841891632
2015-05-25 15:25:20 -07:00
Alexander Köplinger b46f878f13 Remove outdated comment about packages.config from csproj's
Since the move to project.json we no longer use packages.config


Commit migrated from https://github.com/dotnet/corefx/commit/1d489b12d2f6b7b7128888d525dc2e49fe2f1782
2015-05-15 20:10:42 +02:00
Lakshmi Priya Sekar 2a499c5cbf Remove XunitTraitDiscoverers from corefx and reference the nuget package xunit.netcore.extensions.
Commit migrated from https://github.com/dotnet/corefx/commit/03e32211d668ee215f32c599849987cb7d9d4e2a
2015-05-07 16:15:32 -07:00
Eric StJohn 5db3ae33bf Convert all remaining package dependencies to project.json
DNX and BuildTools now support all of the nuget v2 conventions that we depend on so we can
move all remaining nuget v2 packages to the project.json file and eliminate packages.config.

This change also adds "frameworks" to the project.json so that dnu restore can calculate
applicable assets.  I am not yet using "runtimes" in the project.json since we are still resolving
our runtime assets manually (eg: build tools copies known files from packages).  A future
change will move us to using our runtime packages and add runtimes sections to projects
as appropriate.


Commit migrated from https://github.com/dotnet/corefx/commit/eb35a304c7e89e8b4335ed13c5d23706360d49a4
2015-05-05 12:36:57 -07:00
Eric StJohn c0e430ddf5 Update to latest CoreFx packages, convert to project.json
This change updates all projects to the latest CoreFx packages which make use of nuget v3 features and thus require project.json.  Packages.config remains for the packages which are not yet compatible with the new build task (mainly because we need to resolve to PCL folders).
The entire change was done by a tool in order to not miss any dependencies, and ensure we have project items for the packages.config/project.json.  One side effect of using the tool is some reformatting of whitespace in the projects.


Commit migrated from https://github.com/dotnet/corefx/commit/e729c5353070b71aedff8f1300ae838573813faf
2015-04-15 12:47:43 -07:00
Alexander Köplinger bc43414863 System.Reflection.Metadata: Fix reference path to System.Collections.Immutable
The 1.1.34-rc-00001 version of the package doesn't have +wp8 in it's path.
Use the 1.1.34-rc version instead, which is also available on nuget.org


Commit migrated from https://github.com/dotnet/corefx/commit/47182a701b9f23ddcd0a2f9acd1f41d4e0cee585
2015-04-03 05:27:40 +02:00
Joel Hendrix 9d218b211e Update Metadata package to depend on latest Immutable package.
Update the System.Reflection.Metadata package to depend on the RC build of
System.Collections.Immutable.

Update packages.config with the S.C.Immutable package.

Update src and test projects for S.R.Metadata to reference the RC build.
The RC builds are real signed so update assembly reference to specify the
full assembly identity.


Commit migrated from https://github.com/dotnet/corefx/commit/2d440a427d30286b786501709bfb2bb4a5d6dd32
2015-02-27 09:28:29 -08:00
Nick Guerrera fdd7a891c4 Fix build break on machines with recent VS 2015 CTP
System.Collections.Immutable.dll is installed to the GAC and this
causes msbuild assembly resolution to decide that copy local isn't
necessary. This doesn't work for us because .NET Core doesn't use
the GAC.

The workaround is to explicitly set Private=true on the reference.


Commit migrated from https://github.com/dotnet/corefx/commit/2bc73d7450fd7f301df28c18f975babf27ef3164
2015-02-25 17:28:08 -08:00
Nick Guerrera 5cac8fa6be Respond to PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/ca2c0bf5b4606109bd00d28b1f5e7102cc448df2
2015-02-25 10:59:03 -08:00
Nick Guerrera b9fd4a1a50 Use immutable nupkg from metadata tests
System.Reflection.Metadata.Tests has a project-to-project (P2P) reference
to System.Collections.Immutable rather than via the nupkg.

This prevents a successful build in VS until after a full build.cmd has
been done on the command line as VS does not support building project
references on demand unless the referenced project is included in the
same solution.

The project reference appears to have been done to workaround missing
support for  portable packages that do not explicitly mention
aspnetcore50 in the interim infrastructure that resolves test
references for deployment.

This change implements a different workaround: reference the dll in
the packages/ folder without mentioning it in packages.config. It
works because we are guaranteed to have the package restored to the
same location for the main System.Reflection.Metadata project.

Fix dotnet/corefx#950


Commit migrated from https://github.com/dotnet/corefx/commit/7a41cba680f9f1c43ecf7216562f6b4a6c813e68
2015-02-22 18:17:15 -08:00
chcosta d1620100c8 Sync changes from TFS as of 2015/02/16 9:30:00 AM
[tfs-changeset: 1416076]


Commit migrated from https://github.com/dotnet/corefx/commit/67bd740c6c732e141835521ff34b2cc18591a9cc
2015-02-16 09:51:49 -08:00
Maxwe11 2d635dae1c Replace relative path to common tests with a variable
Replace relative path "..\..\Common\tests" with $(CommonTestPath) variable.


Commit migrated from https://github.com/dotnet/corefx/commit/56dbc6abc6dcde5874c99c67f379d788c8dd4420
2015-02-08 15:05:37 +02:00
Nick Guerrera 18d59d59f1 Remove PLIB ProjectTypeGuids to allow editing debug options in VS
We control the targeting centrally and we shouldn't be retargeting
from VS. With the new support for running tests on F5, it is best
to be able to see and edit the command line in the property pages.

Before this, we had an arbitrary mix of the guids being present or
not anyhow. At some point, if we need to set it, we can put it back
across the board and hopefully by then we'll have proper VS test
integration anyhow.


Commit migrated from https://github.com/dotnet/corefx/commit/da9663498c4f5e6bb663e97531afc48964ffbdd0
2015-01-22 16:30:00 -08:00
Matt Cohn 242ade5fd0 Metadata reader tests now take a project reference to Immutable
This allows the Metadata reader tests to run against the version
of immutable in the repository.


Commit migrated from https://github.com/dotnet/corefx/commit/d074dccb27513395be22e98f9551a8d3d46fe436
2015-01-06 15:44:10 -08:00
Wes Haggard 27cb98e29a Switch all projects to resolve references from packages.config.
Commit migrated from https://github.com/dotnet/corefx/commit/08503d51d2c61861bf11c5e36da53c69aca092e1
2014-12-19 17:44:16 -08:00
Alexander Köplinger d7ea53dc3d System.Reflection.Metadata.Tests: reference System.Threading contract assembly
This allows the test project to be built with Mono's xbuild.


Commit migrated from https://github.com/dotnet/corefx/commit/460eb24f1ec243fcd96c217ef3f5d1d8d19635b1
2014-12-18 10:34:29 +01:00
Wes Haggard e6b880e80d Fix up a few bad merges and add settings that moved across files.
Commit migrated from https://github.com/dotnet/corefx/commit/932a43839ac6d6bf2a38934f3b5fde42b7629118
2014-12-17 22:02:10 -08:00
Wes Haggard 9e1b10e6f4 Switch to importing dir.props/dir.targets using GetDirectoryNameOfFileAbove.
This commit also updates the new System.IO.Pipes.csproj to follow the pattern.


Commit migrated from https://github.com/dotnet/corefx/commit/5d7072c5caa5cd9aef476221613c78bcc60a003b
2014-12-17 21:01:52 -08:00
Wes Haggard e087c96a74 Clean up some project files for to improve consistency and spacing.
Commit migrated from https://github.com/dotnet/corefx/commit/f02121733303c20da3a7b4ee08fea4079e39273d
2014-12-17 20:54:46 -08:00
Wes Haggard ba98a882d4 Add dir.props/dir.targets to all the test projects and enable building them.
Added */tests/*.csproj file to dirs.proj list of projects to build.

There are some tests like the MetadataReaderTests that build against desktop
framework and so that project needed some hacking to get the correct props used,
we should fix that at another point.


Commit migrated from https://github.com/dotnet/corefx/commit/f5f9d189457df676f857c2e589a30795a6e1f8fa
2014-12-17 20:52:57 -08:00
Matt Cohn c2abfd6a08 Fix merge error in MetadataReader test project
Commit migrated from https://github.com/dotnet/corefx/commit/a5db5281df943f17140d86c46e4fa08bbdaed951
2014-12-17 12:01:44 -08:00
Matt Cohn 6f9af43bca Stop copying contract assemblies to output folder for MDReader tests
And add a reference to System.Threading.Tasks.Parallel 4.0.0


Commit migrated from https://github.com/dotnet/corefx/commit/8254749ad2e0684bd0c218555e1bea18a5a7caed
2014-12-17 10:46:45 -08:00
Matt Cohn 1e64c6282d Merge branch 'mdreader-portable-tests' into test_on_coreclr
Conflicts:
	src/System.Reflection.Metadata/tests/Metadata/MetadataReaderTests.cs
	src/System.Reflection.Metadata/tests/System.Reflection.Metadata.Tests.csproj
	src/System.Reflection.Metadata/tests/packages.config


Commit migrated from https://github.com/dotnet/corefx/commit/353267146ebce9460bf3ba050c7ccad6d64973ef
2014-12-16 15:35:26 -08:00
Nick Guerrera d143cbcc91 Build metadata reader tests as PCL
Commit migrated from https://github.com/dotnet/corefx/commit/e8e2c229fe43a93073c9f59b68af18902e2b0a32
2014-12-15 20:54:08 -08:00
Nick Guerrera 0bc1c1441e Prepare metadata reader tests to be portable
Commit migrated from https://github.com/dotnet/corefx/commit/eee690cff507f53c63795517f2c7930a51e5eec8
2014-12-15 20:54:05 -08:00
Krzysztof Wicher 2011f4685f Upgrade tests to use Xunit 2.0
Commit migrated from https://github.com/dotnet/corefx/commit/9fe538d620b67aa0dd2ba5734ec9fa34379d79e9
2014-12-12 13:36:07 -08:00
Nick Guerrera b83ca84fee Remove ImmutableArrayInterop and work around it
The public ImmutableArrayInterop class has been deemed too dangerous
to be out there for general use.

Remove it and implement a byte[] only version internally in the
metadata reader using an unverifiable union.

Retain the documentation and add a warning to anyone thinking about
reusing the code to do likewise.


Commit migrated from https://github.com/dotnet/corefx/commit/b28ca0e9461e06cefc30980d70310346a5c45eee
2014-12-05 16:20:19 -08:00
Matt Cohn f88fc81b42 Merge branch 'use-msbuild-12-and-14' of https://github.com/FiveTimesTheFun/corefx
Conflicts:
	src/System.Reflection.Metadata/tests/System.Reflection.Metadata.Tests.csproj


Commit migrated from https://github.com/dotnet/corefx/commit/b6b1bccffbc4249f1db65eb742ce975364ef58ab
2014-11-11 23:29:48 -08:00
Matt Cohn 1f9bc6fd27 Replace path to 32-bit program files with an msbuild property.
This change fixes the build of our libraries on an x86 machine
using Dev14 by using an msbuild property to locate the 32-bit
program files directory.


Commit migrated from https://github.com/dotnet/corefx/commit/2de7dce3757fc3805a947462fb366d26f088508e
2014-11-11 21:54:30 -08:00
Nick Guerrera 65b8c43399 Prevent disabled metadata reader tests from issuing build warnings.
One of the disabled tests was obsolete. The design decision that was pending
is closed and the behavior tested did not match the decision. That test is
simply deleted.

The other test is changed from using [Fact(Skip="...")] to /*[Fact]*/. It is
now tracked by Issue dotnet/corefx#26.

Finally, I spotted a typo: 'overload' instead of 'overlong' nearby and fixed it.


Commit migrated from https://github.com/dotnet/corefx/commit/d3b3ac3ab0f20ec5a0f4e07c76554e0cb5ca37c2
2014-11-11 20:20:52 -08:00
dotnet-bot ebabdf9497 Initial commit
_   _ _____ _____   ____            _        _
   | \ | | ____|_   _| |  _ \ ___   ___| | _____| |
   |  \| |  _|   | |   | |_) / _ \ / __| |/ / __| |
  _| |\  | |___  | |   |  _ < (_) | (__|   <\__ \_|
 (_)_| \_|_____| |_|   |_| \_\___/ \___|_|\_\___(_)


Commit migrated from https://github.com/dotnet/corefx/commit/f11305d31a07ef9a2513332edc665b257cc9c5e5
2014-11-07 18:58:41 -08:00