60 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 c4a5b6b5c3 [mcs] Remove NET_4_5 ifdef from the source files
It is always set in all profiles that we support so we can remove it.
2016-08-23 15:15:51 +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
Alistair Bush aba3b1a915 Unit test for reproduction of XmlReader.ReadToNextSibling behaviour 2015-01-28 04:17:52 +13:00
Alexander Köplinger 746650d1b9 [bcl] Remove more NET_2_0 checks from class libs 2015-01-17 05:45:39 +01:00
Marek Safar a6e236b2d6 [system.xml] Support more primitive types in XmlReader::ReadContentAs 2014-02-10 23:10:58 +01: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
Martin Baulig 4c8278ed3b Add .NET 4.5 async methods to XmlReader and XmlWriter. 2012-06-03 04:02:28 +02:00
Atsushi Eno 38c9b6b53a XmlReader.ReadToNextSibling() saved wrong Depth and failed to proceed.
Fixed bug #676020.
2011-03-08 00:47:41 +09:00
atsushieno c7d49e94be Parse list type, and parse QName without prefix, as expected. 2010-08-09 17:43:40 +09:00
Atsushi Eno 5aed01b5aa 2010-03-26 Atsushi Enomoto <[email protected]>
* XmlReader.cs, XmlQualifiedName.cs : ReadElementContentAs() when
	  used for qname, treats non-prefixed name as in default namespace.

	* XmlReaderCommonTests.cs : added test for ReadElementContentAs() for
	  qname, with default namespace.


svn path=/trunk/mcs/; revision=154272
2010-03-26 13:56:39 +00:00
Atsushi Eno 12a17f7f10 2010-01-28 Atsushi Enomoto <[email protected]>
* XmlReaderBinarySupport.cs : eliminate possible extra buffer
	  storing of zeros. Fixed bug #543332.

	* XmlReaderCommonTests.cs : added test for bug #543332.


svn path=/trunk/mcs/; revision=150347
2010-01-28 05:54:20 +00:00
Robert Jordan bd7622796a 2009-06-26 Robert Jordan <[email protected]>
* *.cs: Upgrade to new NUnit style.


svn path=/trunk/mcs/; revision=137010
2009-06-26 21:06:21 +00:00
Sebastien Pouliot cc6d045346 In Test/System.Xml:
2009-04-28  Sebastien Pouliot  <[email protected]> 

	* XmlReaderCommonTests.cs: Add test case for an empty string url

In System.Xml:
2009-04-28  Sebastien Pouliot  <[email protected]>  

	* XmlTextReader.cs (InitializeContext): Under NET_2_1 do not give
	a second change	using Path.GetFullPath. (GetStreamFromUrl) Add
	extra validations that would be missed in NET_2_1


svn path=/trunk/mcs/; revision=132856
2009-04-28 15:55:19 +00:00
Atsushi Eno 68389cd912 2009-03-16 Atsushi Enomoto <[email protected]>
* XmlReaderBinarySupport.cs : ReadContentsAsBase64() could skip
	  EndElement at the next XmlReader.Read(). Fixed bug #480066.

	* XmlReaderCommonTests.cs : added test for bug #480066.


svn path=/trunk/mcs/; revision=129404
2009-03-16 07:37:44 +00:00
Atsushi Eno aa2607300a 2009-01-20 Atsushi Enomoto <[email protected]>
* XmlReaderBinarySupport.cs : do not hang in the middle of reading
	  byte chunk at some node types. Fixed bug #464229.

	* XmlReaderCommonTests.cs : added test for bug #464229.


svn path=/trunk/mcs/; revision=123866
2009-01-20 10:35:44 +00:00
Atsushi Eno b9326e77b1 2009-01-08 Atsushi Enomoto <[email protected]>
* XmlReader.cs : ReadContentAsString() does not reject non-elements.
	  ReadElementContentAsString() rejects non-content nodes.

	* XmlReaderCommonTests.cs : added test for ReadContentAsString()
	  and ReadElementContentAsString() against certain node types.


svn path=/trunk/mcs/; revision=122737
2009-01-08 02:39:23 +00:00
Atsushi Eno a3f31057d1 2008-09-17 Atsushi Enomoto <[email protected]>
* SubtreeXmlReader.cs : Close() should correctly skip empty element.
	  In Read(), make sure to move from Element state.

	* XmlReader.cs : detailed error location in ReadSubtree().

	* XmlReaderCommonTests.cs : another Subtree+EmptyElement case.


svn path=/trunk/mcs/; revision=113339
2008-09-17 17:50:18 +00:00
Atsushi Eno 215f86b887 2008-09-17 Atsushi Enomoto <[email protected]>
* SubtreeXmlReader.cs : make sure to set eof for empty element after
	  Read().

	* XmlReaderCommonTests.cs :
	  added test for NodeType for empty element.


svn path=/trunk/mcs/; revision=113312
2008-09-17 14:24:02 +00:00
Atsushi Eno b3d04b7317 2008-09-17 Atsushi Enomoto <[email protected]>
* XmlReader.cs : ReadSubtree() is valid only on an element.

	* XmlReaderCommonTests.cs :
	  added test for ReadSubtree() on non-element.


svn path=/trunk/mcs/; revision=113304
2008-09-17 13:04:56 +00:00
Atsushi Eno ac161ee6eb 2008-05-07 Atsushi Enomoto <[email protected]>
* XmlReader.cs : force CloseInput to every XmlReader that is created
	  from url (I mean, every internal XmlReader instance).

	* XmlFilterReader.cs : clone settings so that it does not depend on
	  inconsistent settings after creation. Fixed bug #385638.

	* XmlReaderCommonTests.cs : added test for bug #385638.


svn path=/trunk/mcs/; revision=102702
2008-05-07 08:34:57 +00:00
Atsushi Eno d8ad395849 2008-01-25 Atsushi Enomoto <[email protected]>
* XmlReader.cs : MoveToNextSibling() should check EOF (as Skip() does
	  not). Fixed bug #347768.

	* XmlReaderCommonTests.cs : added test for bug #347768.


svn path=/trunk/mcs/; revision=93873
2008-01-25 03:47:12 +00:00
Atsushi Eno e977cbe8df 2007-10-19 Atsushi Enomoto <[email protected]>
* SubtreeXmlReader.cs : when a subtree reader is closed, the original
	  reader moves to the end of the subtree. Fixed bug #334752, patch by
	  Scott Peterson.

	* XmlReaderCommonTests.cs : added test for bug #334752.


svn path=/trunk/mcs/; revision=87812
2007-10-19 05:36:00 +00:00
Atsushi Eno 22c1a62ad1 2007-04-25 Atsushi Enomoto <[email protected]>
* XmlReader.cs : fixed wrong depth comparison in ReadToNextSibling().
	  Fixed bug #81451, by Eric Mercier.

	* XmlReaderCommonTests.cs : added test for bug #81451.


svn path=/trunk/mcs/; revision=76259
2007-04-25 16:02:28 +00:00
Atsushi Eno 31d31bbcc3 2007-02-20 Atsushi Enomoto <[email protected]>
* DTDValidatingReader2.cs, XmlTextReader.cs, XmlNodeReaderImpl.cs:
	  Read() silently returns false when it is closed. Fixed bug #80848.

	* XmlReaderCommonTests.cs : added test for bug #80848.


svn path=/trunk/mcs/; revision=73147
2007-02-20 08:44:13 +00:00
Atsushi Eno 03a84c968b 2007-02-07 Atsushi Enomoto <[email protected]>
* XmlReader.cs : ReadElementContentAsString() and all relevant methods
	  didn't consume empty element correctly.

	* XmlReaderCommonTests.cs : added ReadElementContentAsStringEmpty().


svn path=/trunk/mcs/; revision=72402
2007-02-07 09:10:32 +00:00
Atsushi Eno ec7c2c1d49 2006-09-04 Atsushi Enomoto <[email protected]>
* XmlReader.cs : ReadContentAsString() and its family should allow 
	  attribute node. Fixed bug #79268.

	* XmlReaderCommonTests.cs : added test for bug #79268.


svn path=/trunk/mcs/; revision=64843
2006-09-04 05:06:44 +00:00
Atsushi Eno e7937e3666 2006-06-26 Atsushi Enomoto <[email protected]>
* XmlReader.cs : when Create() received string url, it should set 
	  XmlTextReader2.CloseInput always true. Fixed bug #78706.

	* XmlReaderCommonTests.cs : added test for bug #78706.


svn path=/trunk/mcs/; revision=62053
2006-06-26 04:45:26 +00:00
Atsushi Eno 4bc7d6b705 2006-04-14 Atsushi Enomoto <[email protected]>
* XmlReader.cs : ReadElementContentAsObject() incorrectly rejected
	  the argument type System.Object.

	* XmlReaderCommonTests.cs : added test for ReadElementContentAs()
	  with argument typeof(object).


svn path=/trunk/mcs/; revision=59479
2006-04-14 09:55:16 +00:00
Atsushi Eno bbbe93b299 2006-04-06 Atsushi Enomoto <[email protected]>
* XmlReader.cs : ReadElementContentAsXXX() did not consume empty
	  element correctly.

	* XmlReaderCommonTests.cs : added test for 
	  ReadElementContentAsString() and empty element.


svn path=/trunk/mcs/; revision=59111
2006-04-06 12:12:50 +00:00
Atsushi Eno 45352253ca 2006-03-08 Atsushi Enomoto <[email protected]>
* XmlReader.cs: ReadContentAsXXX() just stops at start element,
	  without rejecting it as an error.
	  ReadElementContentAsXXX() rejects child element nodes.

	* XmlReaderCommonTests.cs : Added tests for ReadContentAsString() and
	  ReadElementContentAsString().


svn path=/trunk/mcs/; revision=57691
2006-03-08 12:33:01 +00:00
Atsushi Eno 9eb523dd9f 2006-02-21 Atsushi Enomoto <[email protected]>
* XmlNamespaceManager.cs : added internal LookupPrefixExclusive()
	  which discards "overriden" namespaces.
	* XmlTextWriter2.cs : fresh implementation.
	  - The source structure is simplified and cleaner.
	  - When outputting escaped string, output directly to TextWriter.
	  - roughly 20% performance improvement.

	  (Also fixed previous perf. evaluation excess in ChangeLog.)


	* XmlReaderCommonTests.cs : added custom assertion overload that takes
	  test label.
	* XmlNodeReaderTests.cs : labeled some.
	* XmlTextWriterTests.cs :
	  Changed the semantics of AttributeNamespacesXmlnsXmlns() and
	  removed NotDotNet (in contrast this test should fail with previous
	  version of XmlTextWriter). See the code comment for details.
	  Added WriteQualifiedNameXmlnsError().


	* System.Xml.dll.sources : removed XmlTextWriterOpenElement.cs and 
	  XmlTextWriter.cs. Added XmlTextWriter2.cs, to be renamed to
	  XmlTextWriter.cs in a few days or weeks.


svn path=/trunk/mcs/; revision=57095
2006-02-21 15:39:10 +00:00
Atsushi Eno fb17c20276 2005-12-12 Atsushi Enomoto <[email protected]>
* XmlReader.cs : fixed several misconception in MoveToNextSibling().
	  It should check its ReadState to avoid infinite loop.

	* XmlReaderCommonTests.cs : enabled MoveToNextSibling() tests.


svn path=/trunk/mcs/; revision=54231
2005-12-12 11:49:32 +00:00
Atsushi Eno 2278c5c420 2005-12-12 Atsushi Enomoto <[email protected]>
* XmlException.cs : added another .ctor() overload that takes both
	  IXmlLineInfo and innerException.
	* XmlQualifiedName.cs : added Parse() overload that takes XmlReader
	  (since XmlReader is not IXmlNamespaceResolver anymore).
	* XmlReader.cs : made several fixes on 2.0 ReadContentAs(),
	  ReadElementContentAs() and all of its variants.

	* XmlReaderCommonTests.cs : added several tests for 2.0 methods.


svn path=/trunk/mcs/; revision=54230
2005-12-12 11:26:27 +00:00
Atsushi Eno 94811f231e 2005-12-09 Atsushi Enomoto <[email protected]>
* XmlReader.cs : ReadToDescendant() should work when its ReadState is
	  Initial.

	* XmlReaderCommonTests.cs : added tests for ReadToDescendant() and
	  ReadToFollowing().


svn path=/trunk/mcs/; revision=54152
2005-12-09 07:52:09 +00:00
Atsushi Eno b78ca0c164 2005-12-08 Atsushi Enomoto <[email protected]>
* XmlReaderSettings.cs : ProhibitDtd is set as default.
	* XmlWriterSettings.cs : no set_OutputMethod.

	* XmlReaderCommonTests.cs : use ProhibitDtd=false in CreateSimple()
	  and added CreateSimpleProhibitDtd().


svn path=/trunk/mcs/; revision=54090
2005-12-08 04:06:22 +00:00
Atsushi Eno 21b9253d8b 2005-10-23 Atsushi Enomoto <[email protected]>
* XmlTextReader.cs, DTDValidatingReader.cs : LookupNamespace("") for
	  default namespace was returning "" instead of null. It didn't check
	  empty namespace URI for non-empty prefixes.

	* XmlTextReaderTests.cs, XmlValidatingReaderTests.cs,
	  XmlReaderCommonTests.cs : added and fixed tests to make sure that
	  LookupNamespace("") returns null for default namespace, and checks
	  that empty namespace URI is not allowed for non-empty prefix.


svn path=/trunk/mcs/; revision=52099
2005-10-23 19:10:47 +00:00
Atsushi Eno 57574a07ef 2005-10-01 Atsushi Enomoto <[email protected]>
* XmlReader.cs, XmlTextReader.cs, XmlTextReader2.cs :
	 XmlReader.Create() with string url argument are not working because
	 of incorrect choice of the .ctor().

	* XmlReaderCommonTests.cs : added simple Create() test.


svn path=/trunk/mcs/; revision=51075
2005-10-01 11:19:18 +00:00
Atsushi Eno 23f231d021 2005-01-13 Atsushi Enomoto <[email protected]>
* XmlReaderCommonTests.cs : added labels for tests.
	  Marked MoveToXmlDeclAttributes() as [Ignore] again because there is
	  no consistent reference implementation to follow.



svn path=/trunk/mcs/; revision=38859
2005-01-13 09:11:04 +00:00
Atsushi Eno b8267fa659 2005-01-13 Atsushi Enomoto <[email protected]>
* XmlValidatingReaderTests.cs,
	  XmlReaderCommonTests.cs,
	  XmlTextWriterTests.cs,
	  XmlUrlResolverTests.cs :
	  Marked as NotDotNet for those tests that fails under MS.NET.
	  Commented out some XmlTextWriter implementation-dependent assertions.
	  Fixed ResolveUriWithNullArgs () expected return type.



svn path=/trunk/mcs/; revision=38844
2005-01-13 04:26:25 +00:00
Atsushi Eno fe69bf6c54 2004-01-11 Atsushi Enomoto <[email protected]>
* XmlReaderCommonTests.cs :
	  Oops, ReadAttributeValue() was not reverted. Now marked as NotDotNet.



svn path=/trunk/mcs/; revision=38679
2005-01-11 06:26:13 +00:00
Atsushi Eno a8d7a80a3c 2004-01-11 Atsushi Enomoto <[email protected]>
* XmlReaderCommonTests.cs : reverted r38601. It is MS XmlTextReader
	  that is buggy on attribute value's Prefix and NamespaceURI.



svn path=/trunk/mcs/; revision=38678
2005-01-11 06:15:18 +00:00
Nick Drochak 2a4ecd67f1 2005-01-10 Nick Drochak <[email protected]>
* XmlWriterTests.cs: Fix build warnings.
	* XmlReaderCommonTests.cs: Make tests pass on Fx1.1.  XmlNodeReader
	has different default attributes it seems.

svn path=/trunk/mcs/; revision=38601
2005-01-10 08:58:42 +00:00
Atsushi Eno 12792953c0 2004-10-29 Atsushi Enomoto <[email protected]>
* XmlReaderCommonTests.cs : ReadAsObject() is removed.
	* XmlTextWriterTests.cs : added CloseTwice().
	* XmlNodeTests.cs : added labels.

svn path=/trunk/mcs/; revision=35418
2004-10-29 02:07:07 +00:00
Atsushi Eno 1fc0d15f0a 2004-09-07 Atsushi Enomoto <[email protected]>
* XmlReaderCommonTests.cs : Added tests for ReadAsObject().

svn path=/trunk/mcs/; revision=33519
2004-09-07 14:03:17 +00:00
Atsushi Eno 0560f9c993 2004-03-15 Atsushi Enomoto <[email protected]>
* XmlReaderCommonTests.cs : Added tests for ReadInner/OuterXml() on
	  EndElement.

svn path=/trunk/mcs/; revision=24030
2004-03-15 02:48:05 +00:00
Atsushi Eno 88eb2f8d4f 2004-02-04 Atsushi Enomoto <[email protected]>
* XmlEntityReferenceTests.cs : renamed TestDescendantsRecursively to
	  DescendantsRecursively and added more test lines.
	  Added ChildNodes().
	* XmlReaderCommonTests.cs : Added MoveToXmlDeclAttribute(). However
	  it is ignored (since XmlNodeReader behaves differently, maybe bug).

svn path=/trunk/mcs/; revision=22768
2004-02-04 17:52:00 +00:00
Atsushi Eno 43143e82c8 2004-02-03 Atsushi Enomoto <[email protected]>
* XmlReaderCommonTests.cs : Added SurrogatePairContent().
	* XmlDocumentTests.cs : Added LoadXmlReaderNamespacesFalse().
	* XmlEntityReferenceTests.cs : Added TestsDescendantsRecursively().

svn path=/trunk/mcs/; revision=22743
2004-02-03 15:25:21 +00:00
Atsushi Eno 443f5dc95e 2003-10-05 Atsushi Enomoto <[email protected]>
* XmlConvertTests.cs : patch by Jonathan Kessler. Added more test
	  methods.
	* XmlUrlResolverTests.cs : Renamed NullArgs to ResolveUriWithNullArgs,
	  and added GetEntityWithNullArgs() (though it is uncommented).
	* XmlReaderCommonTests.cs : Added XML Schema-mode XmlValidatingReader
	  testing phase.

svn path=/trunk/mcs/; revision=18619
2003-10-05 02:42:52 +00:00