108 Commits
Author SHA1 Message Date
Alexander Köplinger 3d910b7477 [System.XML] Switch tests to use embedded test resources 2018-09-27 22:47:14 +02:00
Alexander Köplinger 5ef930b5f8 [bcl] Build some assemblies with -warnaserror (#5295)
* [bcl] Build some assemblies with -warnaserror

This ensures that we keep the build warning free.

We'll only opt-in a few assemblies that already have zero warnings.
We also only apply this when using csc as mcs might raise different warnings.

For now just opt-in assemblies in the net_4_x profile.
2017-11-24 14:05:39 +01:00
Alexander Köplinger b03e606287 Remove ChangeLog files from the repo
They weren't updated in the last 6 years and aren't helpful anymore (e.g. by causing unrelated matches during git grep searches).
2016-01-29 19:17:06 +01:00
Alexander Köplinger 3a71f84cca [build] Fix a few Makefiles to correctly use net_4_x instead of net_4_5 2015-07-25 17:47:29 +02:00
Atsushi Eno 4990b4c47b First step to import referencesource System.Xml.
It is not simply replacement because we have to workaround dynamic codegen
for Xamarin.iOS.

Also there were several tests failing with MS implementation (e.g. for
W3C DOM conformance), so we had to disable them.

There is one regression that rather needs to be fixed in Reflection.Emit.

Also, some WCF tests fail with this implementation. They need to be
investigated, reviewed and appropriately fixed.
2015-03-02 11:36:38 +08:00
Alexander Köplinger 746650d1b9 [bcl] Remove more NET_2_0 checks from class libs 2015-01-17 05:45:39 +01:00
Eberhard Beilharz 86164dac13 [Sys.Xml] Add unit test for Novell bug #599689
The unit test demonstrates a difference between Mono and .NET
(https://bugzilla.novell.com/show_bug.cgi?id=599689).
2014-02-27 16:28:08 +01:00
Alexander Köplinger 3dfeae598a Fixed inconsistency in XmlSchemaValidatingReader between Mono and MS.NET 2013-09-11 12:38:19 +02:00
Atsushi Eno 2cc36e3331 Fix bug #13716 - use XmlSchemaSettings.XmlResolver to resolve schemas. 2013-08-08 21:38:47 +09:00
Atsushi Eno 874d3b1389 Fix bug #12035 - xsi:nil='true' was ignored in some scenario.
"some scenario" I mean:

- There is a sequence with more than one elements in xsd,
- The second element is nillable and its type has content elements, and
- The corresponding XML element specifies xsi:nil='true'

Then it resulted in a validation error as if it were missing the required
content.
2013-08-08 01:00:10 +09:00
Atsushi Eno 72d14cca36 Fix bug #12469 - add more conversion methods to XmlAtomicValue.
Since XmlAtomicValue is pretty much hidden in the implementation, there is
almost no way to verify how it should work. So the changes are all based on
assumption. Yet I added a test based on bug #12469.

There is still problem on processing *invalid* inputs. They have to be
rejected, but they pass.
2013-08-07 18:54:03 +09:00
Sebastien Pouliot c3b782f4ec Do not assume the unit tests can write in the application directory (e.g. iOS devices). Use the temporary directory and open files in read-only 2013-03-18 17:38:28 -04:00
Rodrigo Kumpera abe9dc6206 Revert "Fix object::GetType when remoting is enabled."
This reverts commit 93e2d1dc48.
2013-03-01 10:54:09 -05:00
Rodrigo Kumpera 93e2d1dc48 Fix object::GetType when remoting is enabled. 2013-03-01 10:52:03 -05:00
Marek Safar dd4cc7ca66 Tests update for mobile profile 2013-03-01 15:31:25 +01:00
Atsushi Eno 19eac76e6e Fix regression in XmlSchemaValidator (bug #10245): collection misoperation due to parameter renaming. 2013-02-13 21:13:27 +09:00
Atsushi Eno acdf48cf71 fix bug #6653: change xs component validation logic regarding recursion check.
Originally this implementation checked recursion based on RELAX NG-inspired
algorithm explained at http://www.thaiopensource.com/relaxng/simplify.html.

This works only for "simple" syntax, which premises that every <element> is
defined under top-level <define> element. XML Schema doesn't follow this
and could result in infinite loop like reported.

The latest REC-xmlschema-1 denotes the explicit rule on illegal recursion
on 3.8.6 (Model Group Correct) as:

2 Circular groups are disallowed. That is, within the {particles} of a group there must not be at any depth a particle whose {term} is the group itself.

... so, I simply replaced the checker with simple Stack.

(oh, and for old Stack I haven't bothered to replace non-generic collection
everywhere. XSD is as dead as System.Collection.)
2013-02-08 20:19:14 +09:00
Wojciech Kotlarski 4e612e4bcc MonoTests.System.Xml: corrected expected/actual parameters position in Assert.AreEqual method.
Tests were written first in .NET environment using Assert.That method which has different order of expected/actual parameters.
2012-06-27 17:04:59 +01:00
Wojciech Kotlarski 9f7f844efb corrected tests to not use UtcNow 2012-06-27 16:44:10 +01:00
Wojciech Kotlarski 69b0edce31 System.XML: added null arguments validation for targetType and namespaceResolver in System.Xml.Schema.XmlSchemaDatatype.ChangeType methods 2012-06-27 16:31:20 +01:00
Wojciech Kotlarski d38eba96ec System.XML: Partial implementation of XmlSchemaDatatype::ChangeType
This is not complete but it meets our current validation needs
(better than NIE). The missing stuff is still marked as
[MonoTODO] and [Cattegory("NotWorking")].
2012-06-27 15:53:25 +01:00
Wojciech Kotlarski d83e96bf59 System.XML: Remove deprecated NET_2_0 preprocessor conditionals 2012-06-27 15:53:24 +01:00
Marek Safar 0dcb829e5e Convert old unit tests 2012-04-17 18:31:13 +01:00
Atsushi Eno b523f411bd Multiple schemas in wsdl could share same SourceUri, so check more identity.
Part of bugfix #670945.
2011-05-09 19:09:19 +09:00
Atsushi Eno c838b12b2e Remove obsolete nunit syntax from tests except for Assertion usage. 2011-04-06 20:01:27 +09:00
Atsushi Eno 627c31320f Fixed xsd derived simpleType cast failures on uint. Fixed bug #676993. 2011-03-07 13:56:37 +09:00
Atsushi Eno 0d4ad4e387 Simple content restriction was not validated when it is in further reference.
Fixed bug #595947. It was complexType [base]-> complexType [base]-> simpleType.
2011-02-08 20:52:20 +09:00
Atsushi Eno 3df62f0850 Fix bug #661400 - fix complicated namespace resolution issue.
Namespaces in nested external schemas have to be validated against
immediately-containing schema. If there is a schema A with urn:x
targetNamespace imports a schema B with urn:y targetNamespace which
in turn includes another schema C, then C must be validated its namespace
against B, not A.
2011-01-31 18:02:09 +09:00
myeisha 5150ffd9f3 Add testcase for multiple missing IDs 2010-11-16 13:04:30 +01:00
Raja R Harinath b293948fb7 EOL handling
This set of .gitattributes was automatically generated from the list of files
that GIT tried to normalize when I enabled automatic EOL conversion.

With this set of attributes, we prevent automated EOL conversion on files that
we know will cause trouble down the road.
2010-07-25 20:17:39 +05:30
Atsushi Eno a5b5e8ce99 2010-03-15 Atsushi Enomoto <[email protected]>
* XmlSchemaComplexType.cs : quick fix for bug #584664. Fill base
	  content type particles in prior to filling its own.

	* XmlSchemaValidatorTests.cs : added test for bug #584664.

	* 584664b.xsd, 584664a.xml, 584664b.xml, 584664a.xsd: new test files
	  by Florian Haag.


svn path=/trunk/mcs/; revision=153559
2010-03-15 06:12:42 +00:00
Atsushi Eno eede1f63d3 2010-01-27 Atsushi Enomoto <[email protected]>
* XmlAtomicValue.cs: handle Decimal here to process xs:decimal as
	  a valid base type for simple types. patch by Luke Ravitch,
	  Fixed bug #557452.

	* XmlSchemaValidatorTests.cs : added test for bug #557452, by
	  Luke Ravitch.


svn path=/trunk/mcs/; revision=150280
2010-01-27 06:32:59 +00:00
Atsushi Eno c64203d33c 2010-01-26 Atsushi Enomoto <[email protected]>
* XmlSchemaValidatorTests.cs : added test for bug #502251, by
	  Jonas Larsson.


svn path=/trunk/mcs/; revision=150196
2010-01-26 06:10:41 +00:00
Atsushi Eno 2f8435c724 2010-01-26 Atsushi Enomoto <[email protected]>
* XmlSchemaSet.cs : when adding a schema with "", it seems treated
	  as if it were null. Fixed bug #571650.

	* XmlSchemaSetTests.cs : added test for bug #571650.


svn path=/trunk/mcs/; revision=150187
2010-01-26 02:19:40 +00:00
Gert Driesen 70cfcbd496 * XmlSchemaTests.cs: Fixed tests for bug #502115.
svn path=/trunk/mcs/; revision=137595
2009-07-09 04:46:00 +00:00
Atsushi Eno 9ff32e41c8 2009-07-09 Atsushi Enomoto <[email protected]>
* XmlSchemaTests.cs : disabled wrong tests. I will revert them
	  unless it gets better shape.


svn path=/trunk/mcs/; revision=137594
2009-07-09 04:06:41 +00:00
Atsushi Eno 7e1dd782a8 2009-06-23 Atsushi Enomoto <[email protected]>
* XmlSchemaAssertion.cs, XmlSchemaTests.cs : migrate from Assertion
	  to Assert (it still uses XmlSchemaAssertion as the base class,
	  but XmlSchemaAssertion is not based on Assertion anymore).


svn path=/trunk/mcs/; revision=136714
2009-06-23 16:19:56 +00:00
Gert Driesen 0e09bcbf3c * XmlSchemaTests.cs: added tests for bug #502115.
* extension-attr-redefine-*.xsd: new test files.

svn path=/trunk/mcs/; revision=134592
2009-05-22 11:02:36 +00:00
Atsushi Eno 8db721b50f 2009-05-07 Jonas Larsson <[email protected]>
* XmlAtomicValue.cs : support more type conversion. fixed bug #501666.

	* XmlSchemaValidatorTests.cs : added test for bug #501666.


svn path=/trunk/mcs/; revision=133903
2009-05-11 16:59:42 +00:00
Atsushi Eno fb729447e3 2009-04-22 Atsushi Enomoto <[email protected]>
* XmlSchemaValidator.cs : quick fix for bug #496205. Reset xsi:type
	  and endelement.

	* XmlSchemaValidatorTests.cs : added test for bug #496192 and #496205.

	* 496192.xml, 496192.xsd : new test files.


svn path=/trunk/mcs/; revision=132351
2009-04-22 08:08:52 +00:00
Atsushi Eno 015ecae5f8 2009-01-30 Atsushi Enomoto <[email protected]>
* XmlSchemaValidator.cs : when xsi:nil is true, do not validate
	  text string. Fixed bug #469713.

	* XsdValidatingReader.cs : when xsi:nil is true, do not validate
	  text string.

	* XmlSchemaValidatorTests.cs : added test for bug #469713.


svn path=/trunk/mcs/; revision=125069
2009-01-30 11:14:22 +00:00
Atsushi Eno 3bfb4f73d0 2008-12-15 Atsushi Enomoto <[email protected]>
* XmlSchema.cs, XmlSchemaSet.cs : move substitutionGroup processing
	  from validation phase to post-subset-collection phase. It caused
	  inconsistent substitutionGroup processing among import and
	  schemaSet.Schemas(). Fixed possible XBRL schema processing.

	* XmlSchemaSetTests.cs : added test for Compile() after "duplicating"
	  call to Add() for such schemas that also have xs:import of the
	  same schema that causes errors on processing substitutionGroup.


svn path=/trunk/mcs/; revision=121509
2008-12-15 10:39:00 +00:00
Atsushi Eno ff8c76700f fix bug #435206.
svn path=/trunk/mcs/; revision=117232
2008-10-28 01:14:03 +00:00
Atsushi Eno 6b68299d0f fix bug #433774.
svn path=/trunk/mcs/; revision=117216
2008-10-27 23:57:04 +00:00
Zoltan Varga f10ff05fc6 2008-10-08 Zoltan Varga <[email protected]>
* Makefile */Makefile build/profiles/*.make: Rename the 'default'
	profile to 'net_1_1'.

svn path=/trunk/mcs/; revision=115166
2008-10-08 05:58:51 +00:00
Atsushi Eno 65acaeb5a9 2008-09-09 Atsushi Enomoto <[email protected]>
* XmlSchemaValidator.cs : do not try to validate CloseStartElement
	  when it should be skipped. Fixed bug #422581.

	* XmlSchemaValidatorTests.cs : added test for bug #422581.

	* 422581.xsd, 422581.xml : new files.


svn path=/trunk/mcs/; revision=112583
2008-09-09 13:20:23 +00:00
Atsushi Eno 5c86dd6fa0 2008-06-06 Atsushi Enomoto <[email protected]>
* XmlSchemaTests.cs : fix file path.


svn path=/trunk/mcs/; revision=105158
2008-06-06 14:35:52 +00:00
Atsushi Eno 13bc5269f3 2008-06-06 Atsushi Enomoto <[email protected]>
* XmlSchema.cs : fixed bug #397612, patch by James Fitzsimons.
	  in ProcessExternal(), Make xs:import without schemaLocation work
	  fine as if it were with schemaLocation.

2008-06-06  James Fitzsimons <[email protected]>

	* XmlSchemaTests.cs: added test for bug #397612.
	* XmlSchemaAssertion.cs : make sure to close schema XmlReader.

2008-06-06  Atsushi Enomoto  <[email protected]>

	* importNamespaceTest.xsd, xsdimporttest.xml, importedNamespace.xsd:
	  new test files.



svn path=/trunk/mcs/; revision=105144
2008-06-06 10:07:22 +00:00
Atsushi Eno 6ae0c56558 2008-06-06 James Fitzsimons <[email protected]>
* XmlSchema.cs : Changed GetResolvedUri to return Uri in correct case
	  to make compatible with the Microsoft.NET framework.

	* XmlSchemaTests.cs: added test to support change to 
	  GetResolvedUri to return Uri in correct case
	  to make compatible with the Microsoft.NET framework.

2008-06-06  Atsushi Enomoto  <[email protected]>

	* resolveUriSchema.xsd : (actually I've incorrectly added it before
	  the actual test checkin) Fixed schemaLocation.


svn path=/trunk/mcs/; revision=105141
2008-06-06 07:39:58 +00:00
Atsushi Eno 5691ba237b 2008-02-19 Atsushi Enomoto <[email protected]>
* XmlSchema.cs : Do recursively process xs:include inside included
	  schemas. Fixed bug #361818.

	* XmlSchemaTests.cs: added test for bug #361818.

	* 361818.xsd, 361818-2.xsd, 361818-3.xsd : new test files.

	* Makefile : extra distfiles (361818*.xsd).


svn path=/trunk/mcs/; revision=96159
2008-02-19 15:59:12 +00:00