Commit Graph
54 Commits
Author SHA1 Message Date
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
Atsushi Eno 99676a9e1c 2003-09-21 Atsushi Enomoto <[email protected]>
* XmlReaderCommonTests.cs : Added ProhibitedMultipleAttributes().
	  Fixed ReadAttributeValue(). Now I think it is MS.NET XmlTextReader
	  which is rather buggy than their XmlNodeReader.
	* XmlTextReaderTests.cs : Added IfNamespacesThenProhibitedAttributes()
	  and trivial messagefix.

svn path=/trunk/mcs/; revision=18241
2003-09-21 08:11:05 +00:00
Atsushi Eno 08158153ce 2003-08-24 Atsushi Enomoto <[email protected]>
* XmlAttributeTests.cs : Added DefaultAttributeRemoval() and
	  EmptyStringHasTextNode().
	* XmlElementTests.cs : Added RemoveDoesNotRemoveDefaultAttributes().
	* XmlReaderCommonTests.cs : Added overroaded AssertNodeValues() and
	  ReadAttributeValue().
	* XmlTextReaderTests.cs :
	  Added NotAllowedCharRef() and ExpandParameterEntity().
	  Also added but ignored tests: UndeclaredEntityInIntSubsetOnlyXml()
	  and UndeclaredEntityInStandaloneXml().
	* XmlValidatingReaderTests.cs : TestAttributeDefaultContribution()
	  refactory.
	* Added XsdParticleValidationTests.cs and XsdValidatingReaderTests.cs.

svn path=/trunk/mcs/; revision=17558
2003-08-24 19:04:01 +00:00
Atsushi Eno aafa71b5af 2003-08-05 Atsushi Enomoto <[email protected]>
* XmlReaderCommonTests.cs : Its XmlValidatingReader.EntityHandling
	  should be ExpandCharEntities.
	* XmlValidatingReaderTests.cs : added ResolveEntity(),
	  ResolveEntity2() and ResolveEntityWithoutDTD().

svn path=/trunk/mcs/; revision=17073
2003-08-05 16:17:37 +00:00
Atsushi Eno 85b67a618e 2003-07-26 Atsushi Enomoto <[email protected]>
* XmlAttributeTests.cs : added IdentityConstraints().
	* XmlDocumentTests.cs : added DocumentTypeNodes().
	* XmlNodeTests.cs : added InnerText().
	* XmlReaderCommonTests.cs : added XmlValidatingReader as one of the
	  testing reader. Added IndexerAndAttributes().
	* XmlValidatingReader.cs : modified TestAttributes() to have
	  ReadAttributeValue() tests. Added TestIdentityConstraints()

svn path=/trunk/mcs/; revision=16718
2003-07-26 19:46:11 +00:00
Atsushi Eno 0e0c9d2c03 2003-06-16 Atsushi Enomoto <[email protected]>
* XmlReaderCommonTests.cs : EmptyElementWithTwoAttributes() is now
	  EmptyElementWithAttributes() and was added namespaced attribute tests.
	* XmlTextWriterTests.cs : added WriteWhitespace().

svn path=/trunk/mcs/; revision=15425
2003-06-15 18:09:46 +00:00
Atsushi Eno df14a8aaf0 2003-05-16 Atsushi Enomoto <[email protected]>
* XmlAttributeTests.cs : added NamespaceAttributes() and WriteTo().
	* XmlDocumentTests.cs : fixed invalid xml of DocumentWithDoctypeDecl()
	  and not well-formed xml of OuterXmlWithDefaultXmlns().
	* XmlElementTests.cs : added IsEmpty(). fixed not well-formed xml of
	  WriteToWithDefaultNamespace().
	* XmlNodeReaderTests.cs : fixed incorrect result expectation of
	  ReadInnerXmlWrongInit().
	* XmlNodeTets.cs : applied USE_VERSION_1_1 for InsertBefore()/-After().
	* XmlReaderCommonTests.cs,
	  XmlTextReaderTests.cs : moved EntityReference() and EntityReference-
	  InsideText() to XmlTextReaderTests.cs, since XmlNodeReader is expected
	  to resolve these entity references.
	* XmlTextWriterTests.cs : removed English-dependent error message check.
	  fixed incorrect state-check ignorant blocks of WriteAttributes ().
	* XmlWriterTests.cs : modified WriteNodeFullDocument() and WriteNode-
	  XmlDecl() as MS.NET results in.

svn path=/trunk/mcs/; revision=14610
2003-05-15 19:09:10 +00:00