Commit Graph
336 Commits
Author SHA1 Message Date
Atsushi Eno f764fa4dfd 2006-04-12 Atsushi Enomoto <[email protected]>
* System.Xml_test.dll.sources :
	  Added Test/System.Xml/XmlDefaultReader.cs.

	* XmlSchemaValidatingReader.cs : don't reject such XmlReader that
	  does not implement IXmlNamespaceResolver.

	* XmlReaderSettingsTests.cs : 
	  Added CreateValidatorFromNonIXmlNamespaceResolver() which is
	  uncovered by NVDL validator.
	* XmlDefaultReader.cs : new file for above.


svn path=/trunk/mcs/; revision=59399
2006-04-12 10:27:57 +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 ac928fb2a9 2006-04-05 Atsushi Enomoto <[email protected]>
* XmlWriter.cs : Create(StringBuilder,XmlWriterSettings) was missing
	  settings argument to pass another .ctor().
	* XmlWriterSettings.cs : set_NewLineChars() should reject null.

	* XmlWriterSettingsTest.cs : added tests on set_Encoding(),
	  set_NewLineChars() and OmitXmlDeclaration.


svn path=/trunk/mcs/; revision=59061
2006-04-05 13:36:56 +00:00
Andrew Skiba b83c49167b merge java tests stuff from mainsoft.1.7 branch
svn path=/trunk/mcs/; revision=58951
2006-04-03 13:47:42 +00:00
Andrew Skiba 2bf6321467 TARGET_JVM: use nunit from mono tree
svn path=/trunk/mcs/; revision=58935
2006-04-03 12:02:23 +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 9275dc19bf 2006-02-24 Atsushi Enomoto <[email protected]>
* XmlTextWriter2.cs :
	  WriteRaw() has stupid second arg. Fixed bug #77623.
	  WriteString() should raise an error when it is called immediately
	  after WriteStartDocument().

	* XmlTextWriterTests.cs : added test for bug #77623. Also fixed
	  WriteString() test which failed to fail (Assert.Fail).


svn path=/trunk/mcs/; revision=57229
2006-02-24 06:58:11 +00:00
Atsushi Eno 578b26de8c 2006-02-22 Atsushi Enomoto <[email protected]>
* XmlChar.cs : (IndexOfInvalidChar) fixed surrogate pairs handling.
	  They were always regarded as invalid.
	* XmlTextWriter2.cs : seems like MS XmlTextWriter outputs invalid
	  characters as character references. It totally does not make sense
	  but corcompare depended on that behavior.

	  This "compatibility" fix causes 10% or more performance loss!!!

	* XmlTextWriterTests.cs : added invalid character processing test.


svn path=/trunk/mcs/; revision=57145
2006-02-22 07:05:20 +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 dd7de66cdd 2006-02-14 Atsushi Enomoto <[email protected]>
* XmlTextReader.cs : When "Significant" is assigned to
	  WhitespaceHandling, it should ignore non-significant whitespaces.

	* XmlTextReaderTests.cs : added WhitespaceHandling tests.


svn path=/trunk/mcs/; revision=56845
2006-02-14 04:34:43 +00:00
Atsushi Eno dc2376e29c 2006-02-14 Atsushi Enomoto <[email protected]>
* XmlTextWriterTests.cs : tiny test name fix, as it does not actually
	  test WriteString().


svn path=/trunk/mcs/; revision=56843
2006-02-14 03:45:44 +00:00
Atsushi Eno f99e279c01 2006-02-14 Atsushi Enomoto <[email protected]>
* XmlTextWriter.cs : WriteRaw("") is not simply ignored but process
	  state check and closes open tag.

	* XmlTextWriterTests.cs : added test WriteRaw("") closes open tag.


svn path=/trunk/mcs/; revision=56842
2006-02-14 03:44:18 +00:00
Atsushi Eno 8701dd6372 2006-02-14 Atsushi Enomoto <[email protected]>
* XmlTextWriterTests.cs : numbered some tests and added some comments.


svn path=/trunk/mcs/; revision=56840
2006-02-14 03:23:14 +00:00
Atsushi Eno 1c8a5029e0 2006-01-25 Atsushi Enomoto <[email protected]>
* XmlConvert.cs : ToString(TimeSpan) should return valid duration
	  for TimeSpan.Zero, rather than "P". Fixed bug #77350

	* XmlConvertTests.cs : added test for bug #77350.


svn path=/trunk/mcs/; revision=56026
2006-01-25 03:36:13 +00:00
Atsushi Eno ee9d802656 2006-01-16 Atsushi Enomoto <[email protected]>
* XmlConvert.cs : handle Ticks. Fixed bug #77252.

	* XmlConvertTests.cs : added test for bug #77252.


svn path=/trunk/mcs/; revision=55620
2006-01-16 06:06:54 +00:00
Atsushi Eno f67469ac41 2006-01-13 Atsushi Enomoto <[email protected]>
* XsdValidatingReader.cs : whitespace nodes should be allowed inside
	  empty or element-only content types. Fixed bug #77241.

	* XsdValidatingReaderTests.cs : test from bug #77241.


svn path=/trunk/mcs/; revision=55523
2006-01-13 17:21:15 +00:00
Atsushi Eno 5d8f9644c4 2006-01-13 Atsushi Enomoto <[email protected]>
* XmlTextWriter.cs : Fixed bug #77082.
	  When the state was Start, after WriteProcessingInstruction() and
	  WriteWhitespace() change it to Prolog.
	  After WriteDocType() set state to WriteState.Element.

	* XmlTextWriterTests.cs : added some tests for XMLdecl state check.

	* XslTransformTests.cs : Output_Indent_Xml_DocType() is working now.


svn path=/trunk/mcs/; revision=55487
2006-01-13 05:03:39 +00:00
Atsushi Eno e2e89695a1 2006-01-12 Atsushi Enomoto <[email protected]>
* XmlTextWriter.cs : Do not local duplicate of automatically-created
	  prefixes (i.e. check local autocreated prefixes other than
	  namespaces from ancestors). Fixed bug #77086 and #77087.

	* XmlTextWriterTests.cs : Split AutoCreatePrefixes() and marked as
	  Ignore rather than NotWorking. Also it is not for bug #77086 and
	  #77077 (they were fixed). See bug #77088.


svn path=/trunk/mcs/; revision=55418
2006-01-12 06:03:06 +00:00
Atsushi Eno d2efba1d17 2006-01-12 Atsushi Enomoto <[email protected]>
* XmlWriter.cs : use XmlChar.IsNmToken() to check argument and throw
	  ArgumentException in WriteNmTokenInternal().

	* XmlTextWriterTests.cs : re-enabled WriteNmToken_InvalidChars().


svn path=/trunk/mcs/; revision=55415
2006-01-12 05:04:09 +00:00
Atsushi Eno 1ca0a71ebf 2006-01-12 Atsushi Enomoto <[email protected]>
* XmlTextWriter.cs : Fixed bug #77094. Only XmlTextWriter checks
	  such invalid "xml" prefix which is being mapped to different
	  namespace URI than the predefined one.
	  Removed comment that does not make sense.
	* XmlNamespaceManager.cs : IsValidDeclaration() could be private.
	  Added some comments.

	* XmlTextWriterTests.cs : re-enabled bug #77094 related tests.


svn path=/trunk/mcs/; revision=55414
2006-01-12 04:47:39 +00:00
Atsushi Eno d364a58d86 2006-01-06 Atsushi Enomoto <[email protected]>
* XmlWriter.cs : In WriteNode(XPathNavigator, bool), Avoid
	  ReadSubtree() for non-element content since they are not allowed
	  in ReadSubtree() (but allowed here).

	* XPathNavigator.cs : use WriteNode(XPathNavigator, bool)
	  rather than WriteNode(XmlWriter, bool) in WriteSubtree().

	* XmlWriterTests.cs : added tests for WriteNode(XPathNavigator, bool)
	  as well as XPathNavigator.WriteSubtree(XmlWriter).


svn path=/trunk/mcs/; revision=55143
2006-01-06 11:56:08 +00:00
Atsushi Eno 12b7f166b6 2006-01-06 Atsushi Enomoto <[email protected]>
* XmlValidatingReader.cs : In ReadTypedValue(), treat Whitespace
	  nodes as target string nodes as well as other text nodes.

	* XsdValidatingReader.cs :
	  Don't use normalized string as input to AssessStringValid(). It 
	  incorrectly invalidates strings against simple types with length-
	  related facets.
	  Now that we don't ignore whitespaces, we need to explicitly allow
	  pure whitespace texts in ElementOnly/Empty model.

	* XmlSchemaSimpleTypeRestriction.cs : maxLength and minLength were
	  likely to be ignored in ValidateNonListValueWithFacets().
	* XmlSchemaValidator.cs : Don't use normalized string value as the
	  input to AssessStringValid().

	* XsdValidatingReaderTests.cs : test for ReadTypeValue() that it
	  does not ignore whitespace nodes, and it does not normalize string
	  incorrectly.


svn path=/trunk/mcs/; revision=55129
2006-01-06 04:47:46 +00:00
Atsushi Eno 2b56366922 2006-01-06 Atsushi Enomoto <[email protected]>
* XmlValidatingReader.cs : ReadTypedValue() was not working with
	  non-XmlSchemaDatatype types.

	* XsdValidatingReaderTests.cs : test for ReadTypeValue() with simple
	  type restriction.


svn path=/trunk/mcs/; revision=55127
2006-01-06 03:36:13 +00:00
Gert Driesen cd7644c997 * XmlTextWriter.cs: Modified WriteWhitespace to throw ArgumentException
if value is null or zero-length string. Modified WriteNmToken to throw
ArgumentException if name is null or zero-length string. Cosmetic
change to WriteStringInternal.
* XmlElement.cs: In 2.0 profile, do not throw ArgumentNullException
if new value for Prefix is null.
* XmlElementTests.cs: Improved tests for setting prefix to null
or zero-length string. On 2.0 profile, setting prefix to null should
not result in ArgumentNullException.
* XmlTextWriterTests.cs: Enabled WriteNmToken tests and
WriteWhitespace tests for null or zero-length value.

svn path=/trunk/mcs/; revision=55115
2006-01-05 20:16:41 +00:00
Atsushi Eno 565db0ae52 2006-01-05 Atsushi Enomoto <[email protected]>
* XmlTextWriterTests.cs : removed silly part from
	  WriteStartElement_XmlPrefix (). We are not reproducing MS bugs.
	  (kept remaining part of this test; see if it makes sense after
	  bug #77094 got fixed).


svn path=/trunk/mcs/; revision=55091
2006-01-05 04:31:31 +00:00
Gert Driesen 980e2e28e0 * XmlTextWriterTests.cs: Do not yet enable tests for WriteWhitespace
with null or zero-length value (await approval for XmlTextWriter
change from Atsushi).

svn path=/trunk/mcs/; revision=54914
2005-12-29 18:45:36 +00:00
Gert Driesen 7e110d0cc3 * XmlTextWriterTests.cs: Do not yet enable tests for WriteNmToken
with null or zero-length value (await approval for XmlTextWriter
change from Atsushi).

svn path=/trunk/mcs/; revision=54868
2005-12-27 11:23:36 +00:00
Gert Driesen 18476997c6 * XmlTextWriterTests.cs: Added tests for WriteWhitespace and WriteNmToken.
svn path=/trunk/mcs/; revision=54867
2005-12-27 11:17:32 +00:00
Gert Driesen f6b46ed5f8 * NameTableTests.cs: Added additional tests for Add and Get methods.
svn path=/trunk/mcs/; revision=54866
2005-12-27 11:03:12 +00:00
Gert Driesen 2ff0bdf8d2 * XmlTextWriterTests.cs: Allow all tests to pass on .NET 1.1.
svn path=/trunk/mcs/; revision=54859
2005-12-27 08:37:50 +00:00
Atsushi Eno 1bdcf7c5fa 2005-12-26 Atsushi Enomoto <[email protected]>
* XmlTextWriter.cs : when namespaceURI is String.Empty, Prefix
          should be just ignored (it is likely to happen that DOM nodes
          with empty namespace URI are specified non-empty prefix by
          users, which had better be just ignored). Fixed bug #77095.

        * XmlTextWriterTests.cs : enabled
          WriteStartElement_Prefix_EmptyNamespace() and
          NamespacesPrefixWithEmptyAndNullNamespaceEmpty().


svn path=/trunk/mcs/; revision=54850
2005-12-26 14:57:23 +00:00
Atsushi Eno d120a4fc6e 2005-12-26 Atsushi Enomoto <[email protected]>
* XmlElement.cs : patch for Prefix property by Vorobiev Maksim.
          - null should cause ArgumentNullException.
          - "" should not raise an error.
          - throws ArgumentException when it is readonly.

        * XmlElementTests.cs : Patch by Vorobiev Maksim.
          - setting null to Prefix should raise ArgumentNullException.
          - setting String.Empty to Prefix should be allowed.


svn path=/trunk/mcs/; revision=54849
2005-12-26 14:33:20 +00:00
Atsushi Eno bf5bf0e19f 2005-12-26 Atsushi Enomoto <[email protected]>
* XsdValidatingReader.cs : Fixed the bug that only the last
        * schema
          URL in a schemaLocation was processed. Patch by Vorobiev
Maksim.

        * XsdValidatingReaderTests.cs : test for multi URLs in
          schemaLocation. Test by Vorobiev Maskim.

        * multi-schemaLocation.xml,
          x-net-config-storage-factory-provider-schema.xsd,
          x-net-config-schema.xsd :
          test support files for XsdValidatingReaderTests
          .MultipleSchemaInSchemaLocation() by Vorobiev Maskim.


svn path=/trunk/mcs/; revision=54848
2005-12-26 14:16:44 +00:00
Gert Driesen 2f6ed89c7f * XmlElementTests.cs: Fixed line endings.
svn path=/trunk/mcs/; revision=54847
2005-12-26 13:58:20 +00:00
Gert Driesen 0d9de1f66b * XmlTextWriterTests.cs: Renamed tests to avoid ambiguity, and
renumbered some tests. Added tests for WriteStartElement and
WriteElementString for zero-length and null local names.
Added tests for bugs #77093, #77094 and #77095.

svn path=/trunk/mcs/; revision=54846
2005-12-26 12:39:40 +00:00
Gert Driesen 999c8cde98 * XmlNamespaceManagerTests.cs: Added tests for xml prefix.
svn path=/trunk/mcs/; revision=54845
2005-12-26 11:50:00 +00:00
Atsushi Eno 61ccf99f78 2005-12-23 Atsushi Enomoto <[email protected]>
* XmlTextWriter.cs : When xml:space or xml:lang attribute was
	  directly written without an element, it caused ArgumentOutOfRange.
	  Fixed bug #77084.

	* XmlTextWriterTests.cs : XmlSpace_Valid() is working now.


svn path=/trunk/mcs/; revision=54793
2005-12-23 20:14:56 +00:00
Atsushi Eno a2f89ee36f 2005-12-23 Atsushi Enomoto <[email protected]>
* XmlTextWriter.cs : (WriteStartAttribute) set prefix as "xmlns" when
	  namespaceURI is that of xmlns attributes.

	* XmlTextWriterTests.cs : XmlNs_Valid2() is working now.


svn path=/trunk/mcs/; revision=54792
2005-12-23 20:04:42 +00:00
Gert Driesen 603a8326e9 * XmlTextWriterTests.cs: Fixed line endings. Enabled XmlPrefix_ValidMS
test. Added bug numbers to test cases.

svn path=/trunk/mcs/; revision=54785
2005-12-23 17:59:43 +00:00
Gert Driesen d356e20cd7 * XmlTextWriterTests.cs: Fixed line endings. Enabled XmlPrefix_ValidMS
test. Added bug numbers to test cases.

svn path=/trunk/mcs/; revision=54784
2005-12-23 17:57:40 +00:00
Gert Driesen f42513507a * XmlTextWriterTests.cs: Improved coverage of xml prefix tests.
* XsltCompileExceptionTests.cs: Added tests for ctors.
* XsltExceptionTests.cs: Added tests for ctors.
* XslTransformTests.cs: Added tests for validation of <xsl:output>
attributes.
* System.Xml_test.dll.sources: Added XsltCompilerExceptionTests.cs and 
XsltExceptionTests.cs.
* IXsltContextFunction.cs: Fixed line endings (all CRLF).
* IXsltContextVariable.cs: Fixed line endings (all CRLF).
* XsltContext.cs: Fixed line endings (all CRLF).
* XsltCompileException.cs: Fixed line endings (all CRLF).
Fixed message to correspond with both MS.NET 1.x and 2.0.
* XslTransform.cs: Fixed line endings (all CRLF).
* XsltArgumentList.cs: Fixed line endings (all CRLF).
* XsltException.cs: Fixed line endings (all CRLF). Fixed message to
correspond with MS.NET 1.x and 2.0.
* XslVariable.cs: Beautify error messages.
* XslElement.cs: Same.
* XslAvt.cs: Same.
* XslAttribute.cs: Same.
* XslApplyTemplates.cs: Same.
* XslTemplateContent.cs: Same.
* XslCallTemplate.cs: Same.
* XslCopy.cs: Same.
* XslChoose.cs: Same.
* ScriptCompilerInfo.cs: Fixed line endings.
* XslStylesheet.cs: Beautify error messages.
* Debug.cs: Fixed line endings.
* XslOutput.cs: Indent is now bool instead of string, use
MoveToAttribute to navigate through attributes instead of using
GetAttribute, as we also need to distinguish attributes with
zero-length value from attributes that are not specified for
correct implementation of DOCTYPE. Implemented validation for
value of "omit-xml-declaration", "standalone" and "indent".
We now throw a XsltCompileException for unknown attribute.
* XmlWriterEmitter.cs: only skip WriteDocType is systemId is null.
* HtmlEmitter.cs: XslOutput.Indent is now bool. Fixed WriteDocType
to match MS.NET.
* XmlDecimalFormat.cs: Beautify error messages.
* XslTemplate.cs: Beautify error messages.
* GenericOutputter.cs: XslOutput.Indent is now bool.
* Compiler.cs: Beautify error messages.

svn path=/trunk/mcs/; revision=54780
2005-12-23 15:32:55 +00:00
Gert Driesen 47e7ed0f0b * XmlTextWriterTests.cs: Fixed some tests that caught exception to
become useful. Added few tests that fail on Mono.

svn path=/trunk/mcs/; revision=54535
2005-12-16 17:04:28 +00:00
Gert Driesen 18d58db8f5 * XmlTextWriterTests.cs: No longer derive from deprecated Assertion
class. Added WriteDocType tests.
* XmlWriterTests.cs: No longer derive from deprecated Assertion class.

svn path=/trunk/mcs/; revision=54531
2005-12-16 14:06:42 +00:00
Konstantin Triger 231afa731c allow null string in WriteCData
svn path=/trunk/mcs/; revision=54441
2005-12-15 10:18:32 +00:00
Atsushi Eno 36b7985e54 2005-12-14 Atsushi Enomoto <[email protected]>
* XmlDocumentTests.cs : (CreateNodeNodeTypeName) the previous fix was 
	  wrong; ArgumentException is the expected exception (it anyways won't
	  work under MS.NET 2.0).
	* XmlNodeTests.cs : added labels to assertions. another NotDotNet case.
	* XmlAttributeTests.cs : ditto.


svn path=/trunk/mcs/; revision=54351
2005-12-14 08:25:40 +00:00
Atsushi Eno 55336d1581 2005-12-14 Atsushi Enomoto <[email protected]>
* XmlDocumentTests.cs, XmlAttributeCollectionTests.cs
	  XmlElementTests.cs, XmlCharacterDataTests.cs :
	  Marked NotDotNet for some tests broken under 2.0 (MS bugs).
	  Marked Ignore for some tests which originally does not make sense.
	  Changed types in ExpectedException for some tests under 2.0.


svn path=/trunk/mcs/; revision=54345
2005-12-14 06:54:23 +00:00
Atsushi Eno 9af8eedec3 2005-12-13 Atsushi Enomoto <[email protected]>
* XPathNavigator.cs : ReplaceSelf() should allow document fragment.
	  Moved implementation to XPathEditableDocument.

	* XPathEditableDocument.cs : implement ReplaceSelf() here.

	* System.Xml_test.dll.sources: Added XmlAssert.cs.

	* XmlAssert.cs : new file.

	* XPathEditableNavigatorTests.cs : added tests that passes empty
	  string to editor methods. Added tests for ReplaceSelf().


svn path=/trunk/mcs/; revision=54278
2005-12-13 12:09:02 +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 fee29e205c 2005-12-09 Atsushi Enomoto <[email protected]>
* XmlInputStream.cs :
	  Added Encoding property on NonBlockingStreamReader
	* XmlTextReader.cs :
	  set Encoding property when it proceeds to xml declaration.

	* XmlTextReaderTests.cs : added test for Encoding property.


svn path=/trunk/mcs/; revision=54166
2005-12-09 16:37:22 +00:00