From: Oleg T. <he...@us...> - 2004-11-01 05:44:54
|
Update of /cvsroot/mvp-xml/XInclude/v1/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9467/v1/test Modified Files: Elliotte_Rusty_HaroldTests.cs EntryPoint.cs FourThoughtTests.cs LTG_Edinburgh_UnivTests.cs NistTests.cs RedhatTests.cs TestsGen.xslt XIncludeReaderTests.cs XIncludeSyntaxTests.cs XIncludeTest.csproj Log Message: Ok, no in-memory mode for XIncludingReader. Only streaming mode. Index: XIncludeTest.csproj =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/XIncludeTest.csproj,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- XIncludeTest.csproj 31 Oct 2004 08:02:44 -0000 1.10 +++ XIncludeTest.csproj 1 Nov 2004 05:44:44 -0000 1.11 @@ -100,11 +100,6 @@ BuildAction = "Compile" /> <File - RelPath = "Elliotte_Rusty_HaroldTests_NS.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File RelPath = "EntryPoint.cs" SubType = "Code" BuildAction = "Compile" @@ -115,11 +110,6 @@ BuildAction = "Compile" /> <File - RelPath = "FourThoughtTests_NS.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File RelPath = "generate-tests.cmd" BuildAction = "None" /> @@ -129,31 +119,16 @@ BuildAction = "Compile" /> <File - RelPath = "LTG_Edinburgh_UnivTests_NS.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File RelPath = "NISTTests.cs" SubType = "Code" BuildAction = "Compile" /> <File - RelPath = "NISTTests_NS.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File RelPath = "RedhatTests.cs" SubType = "Code" BuildAction = "Compile" /> <File - RelPath = "RedhatTests_NS.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File RelPath = "TestsGen.xslt" BuildAction = "Content" /> Index: EntryPoint.cs =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/EntryPoint.cs,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- EntryPoint.cs 31 Oct 2004 08:02:44 -0000 1.10 +++ EntryPoint.cs 1 Nov 2004 05:44:44 -0000 1.11 @@ -12,7 +12,7 @@ //XIncludeReaderTests rt = new XIncludeReaderTests(); //LTG_Edinburgh_UnivTests rt = new LTG_Edinburgh_UnivTests(); //NistTests rt = new NistTests(); - Elliotte_Rusty_HaroldTests_NS rt = new Elliotte_Rusty_HaroldTests_NS(); + Elliotte_Rusty_HaroldTests rt = new Elliotte_Rusty_HaroldTests(); //FourThoughtTests rt = new FourThoughtTests(); //XIncludeSyntaxTests rt = new XIncludeSyntaxTests(); try Index: XIncludeSyntaxTests.cs =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/XIncludeSyntaxTests.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- XIncludeSyntaxTests.cs 28 Oct 2004 18:27:06 -0000 1.3 +++ XIncludeSyntaxTests.cs 1 Nov 2004 05:44:44 -0000 1.4 @@ -31,18 +31,6 @@ } /// <summary> - /// No href and no xpointer attribute - non streaming. - /// </summary> - [Test] - [ExpectedException(typeof(MissingHrefAndXpointerException))] - public void NoHrefAndNoXPointerAttributes_NonStreaming() - { - XIncludingReader xir = new XIncludingReader("../../tests/nohref.xml", false); - while (xir.Read()); - xir.Close(); - } - - /// <summary> /// xi:include child of xi:include. /// </summary> [Test] @@ -53,19 +41,7 @@ while (xir.Read()); xir.Close(); } - - /// <summary> - /// xi:include child of xi:include - non streaming. - /// </summary> - [Test] - [ExpectedException(typeof(XIncludeSyntaxError))] - public void IncludeChildOfInclude_NonStreaming() - { - XIncludingReader xir = new XIncludingReader("../../tests/includechildofinclude.xml", false); - while (xir.Read()); - xir.Close(); - } - + /// <summary> /// xi:fallback not child of xi:include. /// </summary> @@ -77,19 +53,7 @@ while (xir.Read()); xir.Close(); } - - /// <summary> - /// xi:fallback not child of xi:include - non streaming. - /// </summary> - [Test] - [ExpectedException(typeof(XIncludeSyntaxError))] - public void FallbackNotChildOfInclude_NonStreaming() - { - XIncludingReader xir = new XIncludingReader("../../tests/fallbacknotchildinclude.xml", false); - while (xir.Read()); - xir.Close(); - } - + /// <summary> /// Unknown value of parse attribute. /// </summary> @@ -103,18 +67,6 @@ } /// <summary> - /// Unknown value of parse attribute - non streaming. - /// </summary> - [Test] - [ExpectedException(typeof(UnknownParseAttributeValueException))] - public void UnknownParseAttribute_NonStreaming() - { - XIncludingReader xir = new XIncludingReader("../../tests/unknownparseattr.xml", false); - while (xir.Read()); - xir.Close(); - } - - /// <summary> /// Two xi:fallback. /// </summary> [Test] @@ -124,19 +76,6 @@ XIncludingReader xir = new XIncludingReader("../../tests/twofallbacks.xml"); while (xir.Read()); xir.Close(); - } - - /// <summary> - /// Two xi:fallback - non streaming. - /// </summary> - [Test] - [ExpectedException(typeof(XIncludeSyntaxError))] - public void TwoFallbacks_NonStreaming() - { - XIncludingReader xir = new XIncludingReader("../../tests/twofallbacks.xml", false); - while (xir.Read()); - xir.Close(); - } - + } } } Index: Elliotte_Rusty_HaroldTests.cs =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/Elliotte_Rusty_HaroldTests.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Elliotte_Rusty_HaroldTests.cs 31 Oct 2004 08:02:28 -0000 1.4 +++ Elliotte_Rusty_HaroldTests.cs 1 Nov 2004 05:44:44 -0000 1.5 @@ -27,7 +27,7 @@ { XIncludeReaderTests.RunAndCompare( "../../XInclude-Test-Suite/Harold/test/" + source, - "../../XInclude-Test-Suite/Harold/test/" + result, false, true); + "../../XInclude-Test-Suite/Harold/test/" + result); } @@ -83,7 +83,6 @@ /// include element including the sibling element after that one. /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] public void harold_05() { RunAndCompare("marshtest.xml", "../result/marshtest.xml"); @@ -95,7 +94,6 @@ /// Include a document that uses XPointers to reference various parts of itself /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] public void harold_06() { RunAndCompare("includedocumentwithintradocumentreferences.xml", "../result/includedocumentwithintradocumentreferences.xml"); @@ -145,7 +143,6 @@ /// According to RFC 2396 empty string URI always refers to the current document irrespective of base URI. /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] public void harold_10() { RunAndCompare("marshtestwithxmlbase.xml", "../result/marshtestwithxmlbase.xml"); @@ -158,7 +155,6 @@ /// There's no difference between href="" and no href attribute. /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] public void harold_11() { RunAndCompare("marshtestwithxmlbaseandemptyhref.xml", "../result/marshtestwithxmlbase.xml"); @@ -171,7 +167,6 @@ /// Make sure base URIs are preserved when including from the same document. /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] public void harold_12() { RunAndCompare("includefromsamedocumentwithbase.xml", "../result/includefromsamedocumentwithbase.xml"); @@ -182,13 +177,8 @@ /// <summary> /// Syntactically incorrect IRI is a fatal error (Eitehr I'm missing something or the spec needs to state this prinicple more clearly.) /// </summary> - /// <remarks>According to the spec: - /// "A value that results in a syntactically invalid URI or IRI should be - /// reported as a fatal error, but some implementations may find it - /// impractical to distinguish this case from a resource error." - /// We do treat it as resource error.</remarks> [Test] - [ExpectedException(typeof(DirectoryNotFoundException))] + [ExpectedException(typeof(Exception))] public void harold_13() { RunAndCompare("badiri.xml", ""); @@ -199,13 +189,8 @@ /// <summary> /// Syntactically incorrect IRI with an unrecognized scheme is a fatal error /// </summary> - /// <remarks>According to the spec: - /// "A value that results in a syntactically invalid URI or IRI should be - /// reported as a fatal error, but some implementations may find it - /// impractical to distinguish this case from a resource error." - /// We do treat it as resource error.</remarks> [Test] - [ExpectedException(typeof(DirectoryNotFoundException))] + [ExpectedException(typeof(Exception))] public void harold_14() { RunAndCompare("badiri2.xml", ""); @@ -228,7 +213,7 @@ /// accept attribute contains carriage-return/linefeed pair /// </summary> [Test] - [ExpectedException(typeof(InvalidAcceptHTTPHeaderValue))] + [ExpectedException(typeof(Exception))] public void harold_16() { RunAndCompare("badaccept1.xml", ""); @@ -240,7 +225,7 @@ /// accept attribute contains Latin-1 character (non-breaking space) /// </summary> [Test] - [ExpectedException(typeof(InvalidAcceptHTTPHeaderValue))] + [ExpectedException(typeof(Exception))] public void harold_17() { RunAndCompare("badaccept2.xml", ""); @@ -285,7 +270,6 @@ /// An included document can use a fallback that points into the included document /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] public void harold_21() { RunAndCompare("metafallbacktest6.xml", "../result/metafallbacktest6.xml"); @@ -308,7 +292,7 @@ /// A fallback element in an included document contains an include element with a parse attribute with an illegal value. /// </summary> [Test] - [ExpectedException(typeof(UnknownParseAttributeValueException))] + [ExpectedException(typeof(Exception))] public void harold_23() { RunAndCompare("metafallbacktest3.xml", ""); @@ -320,7 +304,7 @@ /// A fallback element in an included document contains an include element with neither an xpointer nor an href attribute. /// </summary> [Test] - [ExpectedException(typeof(MissingHrefAndXpointerException))] + [ExpectedException(typeof(Exception))] public void harold_24() { RunAndCompare("metafallbacktest4.xml", ""); @@ -333,7 +317,7 @@ /// A fallback element in an included document contains an include element whose href attribute has a fragment ID. /// </summary> [Test] - [ExpectedException(typeof(FragmentIdentifierInHrefAttribute))] + [ExpectedException(typeof(Exception))] public void harold_25() { RunAndCompare("metafallbacktestwithfragmentid.xml", ""); @@ -345,7 +329,7 @@ /// The XPointer does not select anything in the acquired infoset, but does select something in the source infoset. /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] + [ExpectedException(typeof(Exception))] public void harold_26() { RunAndCompare("metafallbacktest5.xml", ""); @@ -393,7 +377,7 @@ /// then fails to find a resource, which is a fatal error if there's no fallback. /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] + [ExpectedException(typeof(Exception))] public void harold_30() { RunAndCompare("metamissingfallbacktestwithxpointer.xml", ""); @@ -406,7 +390,7 @@ /// then fails to find a resource, but it has a fallback, which itself has an include child, which then throws a fatal error. /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] + [ExpectedException(typeof(Exception))] public void harold_31() { RunAndCompare("metafallbackwithbadxpointertest.xml", ""); @@ -429,7 +413,7 @@ /// An include element points to a document that includes it, using an xpointer to select part of that document. /// </summary> [Test] - [ExpectedException(typeof(CircularInclusionException))] + [ExpectedException(typeof(Exception))] public void harold_33() { RunAndCompare("legalcircle.xml", ""); @@ -441,7 +425,6 @@ /// An include element points to another include element in the same document. /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] public void harold_34() { RunAndCompare("recursewithinsamedocument.xml", "../result/recursewithinsamedocument.xml"); @@ -475,7 +458,7 @@ /// Detect an inclusion loop when an include element refers to itself /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] + [ExpectedException(typeof(Exception))] public void harold_37() { RunAndCompare("internalcircular.xml", ""); @@ -488,7 +471,7 @@ /// in the same document /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] + [ExpectedException(typeof(Exception))] public void harold_38() { RunAndCompare("internalcircularviaancestor.xml", ""); @@ -545,7 +528,7 @@ /// testIncludeElementsCannotHaveIncludeChildren /// </summary> [Test] - [ExpectedException(typeof(XIncludeSyntaxError))] + [ExpectedException(typeof(Exception))] public void harold_43() { RunAndCompare("nestedxinclude.xml", ""); @@ -557,7 +540,7 @@ /// Include elements cannot have children from the xinclude namespace except for fallback. /// </summary> [Test] - [ExpectedException(typeof(XIncludeSyntaxError))] + [ExpectedException(typeof(Exception))] public void harold_44() { RunAndCompare("nestedxincludenamespace.xml", ""); @@ -569,7 +552,7 @@ /// Fallback can only be a child of xinclude element /// </summary> [Test] - [ExpectedException(typeof(XIncludeSyntaxError))] + [ExpectedException(typeof(Exception))] public void harold_45() { RunAndCompare("nakedfallback.xml", ""); @@ -581,7 +564,7 @@ /// A fallback element cannot have a fallback child element. /// </summary> [Test] - [ExpectedException(typeof(XIncludeSyntaxError))] + [ExpectedException(typeof(Exception))] public void harold_46() { RunAndCompare("fallbackcontainsfallback.xml", ""); @@ -595,7 +578,7 @@ /// In this test the fallback is activated. /// </summary> [Test] - [ExpectedException(typeof(XIncludeSyntaxError))] + [ExpectedException(typeof(Exception))] public void harold_47() { RunAndCompare("multiplefallbacks.xml", ""); @@ -609,7 +592,7 @@ /// In this test the fallback is not activated. /// </summary> [Test] - [ExpectedException(typeof(XIncludeSyntaxError))] + [ExpectedException(typeof(Exception))] public void harold_48() { RunAndCompare("multiplefallbacks2.xml", ""); @@ -621,7 +604,7 @@ /// A document cannot include itself /// </summary> [Test] - [ExpectedException(typeof(CircularInclusionException))] + [ExpectedException(typeof(Exception))] public void harold_49() { RunAndCompare("circle1.xml", ""); @@ -633,7 +616,7 @@ /// Document A includes document B which includes document A /// </summary> [Test] - [ExpectedException(typeof(CircularInclusionException))] + [ExpectedException(typeof(Exception))] public void harold_50() { RunAndCompare("circle2a.xml", ""); @@ -645,7 +628,7 @@ /// Include element is missing an href and xpointer attribute /// </summary> [Test] - [ExpectedException(typeof(MissingHrefAndXpointerException))] + [ExpectedException(typeof(Exception))] public void harold_51() { RunAndCompare("missinghref.xml", ""); @@ -657,7 +640,7 @@ /// parse attribute must have value xml or text /// </summary> [Test] - [ExpectedException(typeof(UnknownParseAttributeValueException))] + [ExpectedException(typeof(Exception))] public void harold_52() { RunAndCompare("badparseattribute.xml", ""); @@ -669,7 +652,7 @@ /// Missing resource is fatal when there's no fallback /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] + [ExpectedException(typeof(Exception))] public void harold_53() { RunAndCompare("missingfile.xml", ""); @@ -725,7 +708,7 @@ /// XPointer that selects nothing is a resource error, and fatal because there's no fallback. /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] + [ExpectedException(typeof(Exception))] public void harold_58() { RunAndCompare("xptridtest2.xml", ""); @@ -760,7 +743,7 @@ /// the second XPointer part is still a fatal error. /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] + [ExpectedException(typeof(Exception))] public void harold_61() { RunAndCompare("laterfailure.xml", ""); @@ -773,7 +756,7 @@ /// the second XPointer part is still a fatal error. /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] + [ExpectedException(typeof(Exception))] public void harold_62() { RunAndCompare("laterfailure2.xml", ""); @@ -785,7 +768,6 @@ /// You can include another element from the same document without an href attribute. /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] public void harold_63() { RunAndCompare("onlyxpointer.xml", "../result/onlyxpointer.xml"); @@ -861,7 +843,7 @@ /// An XPointer that doesn't point to anything is a resource error; and fatal because there's no fallback /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] + [ExpectedException(typeof(Exception))] public void harold_69() { RunAndCompare("xptrtumblertest2.xml", ""); @@ -873,7 +855,7 @@ /// Syntax error in an XPointer is a resource error; and fatal because there's no fallback /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] + [ExpectedException(typeof(Exception))] public void harold_70() { RunAndCompare("badxptr.xml", ""); @@ -885,7 +867,7 @@ /// Syntax error in an XPointer is a resource error; and fatal because there's no fallback /// </summary> [Test] - [ExpectedException(typeof(FragmentIdentifierInHrefAttribute))] + [ExpectedException(typeof(Exception))] public void harold_71() { RunAndCompare("badxptr2.xml", ""); @@ -985,7 +967,7 @@ /// Syntax error in an XPointer is a resource error; and fatal becaue there's no fallback /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] + [ExpectedException(typeof(Exception))] public void harold_80() { RunAndCompare("badxptr3.xml", ""); @@ -997,7 +979,7 @@ /// Syntax error in an XPointer is a resource error; and fatal becaue there's no fallback /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] + [ExpectedException(typeof(Exception))] public void harold_81() { RunAndCompare("badxptr4.xml", ""); @@ -1009,7 +991,7 @@ /// Circular references via xpointer are fatal /// </summary> [Test] - [ExpectedException(typeof(CircularInclusionException))] + [ExpectedException(typeof(Exception))] public void harold_82() { RunAndCompare("circlepointer1.xml", ""); @@ -1021,7 +1003,7 @@ /// href attribute with fragment ID is a fatal error even when there's an xpointer attribute /// </summary> [Test] - [ExpectedException(typeof(FragmentIdentifierInHrefAttribute))] + [ExpectedException(typeof(Exception))] public void harold_83() { RunAndCompare("xpointeroverridesfragmentid.xml", ""); @@ -1033,7 +1015,7 @@ /// href attribute with fragment ID is a fatal error /// </summary> [Test] - [ExpectedException(typeof(FragmentIdentifierInHrefAttribute))] + [ExpectedException(typeof(Exception))] public void harold_84() { RunAndCompare("ignoresfragmentid.xml", ""); @@ -1057,7 +1039,7 @@ /// syntax of fragment IDs from RFC 2396. /// </summary> [Test] - [ExpectedException(typeof(FragmentIdentifierInHrefAttribute))] + [ExpectedException(typeof(Exception))] public void harold_86() { RunAndCompare("meaninglessfragmentid.xml", ""); @@ -1125,7 +1107,7 @@ /// Unrecognized scheme in XPointer is a fatal error if there's no fallback /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] + [ExpectedException(typeof(Exception))] public void harold_91() { RunAndCompare("unrecognizedscheme.xml", ""); @@ -1159,7 +1141,7 @@ /// Included document has an include element with neither href nor xpointer attribute /// </summary> [Test] - [ExpectedException(typeof(MissingHrefAndXpointerException))] + [ExpectedException(typeof(Exception))] public void harold_94() { RunAndCompare("toplevel.xml", ""); Index: LTG_Edinburgh_UnivTests.cs =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/LTG_Edinburgh_UnivTests.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- LTG_Edinburgh_UnivTests.cs 30 Oct 2004 09:56:28 -0000 1.2 +++ LTG_Edinburgh_UnivTests.cs 1 Nov 2004 05:44:44 -0000 1.3 @@ -27,7 +27,7 @@ { XIncludeReaderTests.RunAndCompare( "../../XInclude-Test-Suite/EdUni/test/" + source, - "../../XInclude-Test-Suite/EdUni/test/" + result, false, true); + "../../XInclude-Test-Suite/EdUni/test/" + result); } Index: FourThoughtTests.cs =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/FourThoughtTests.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- FourThoughtTests.cs 30 Oct 2004 09:56:28 -0000 1.3 +++ FourThoughtTests.cs 1 Nov 2004 05:44:44 -0000 1.4 @@ -27,7 +27,7 @@ { XIncludeReaderTests.RunAndCompare( "../../XInclude-Test-Suite/FourThought/test/XInclude/docs/" + source, - "../../XInclude-Test-Suite/FourThought/test/XInclude/docs/" + result, false, true); + "../../XInclude-Test-Suite/FourThought/test/XInclude/docs/" + result); } Index: RedhatTests.cs =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/RedhatTests.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- RedhatTests.cs 30 Oct 2004 09:56:28 -0000 1.2 +++ RedhatTests.cs 1 Nov 2004 05:44:44 -0000 1.3 @@ -27,7 +27,7 @@ { XIncludeReaderTests.RunAndCompare( "../../XInclude-Test-Suite/Imaq/test/XInclude/docs/" + source, - "../../XInclude-Test-Suite/Imaq/test/XInclude/docs/" + result, false, true); + "../../XInclude-Test-Suite/Imaq/test/XInclude/docs/" + result); } Index: TestsGen.xslt =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/TestsGen.xslt,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- TestsGen.xslt 31 Oct 2004 08:02:44 -0000 1.3 +++ TestsGen.xslt 1 Nov 2004 05:44:44 -0000 1.4 @@ -2,9 +2,9 @@ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" xmlns:str="http://exslt.org/strings" exclude-result-prefixes="exsl str"> <xsl:template match="testsuite"> - <xsl:apply-templates select="testcases"> + <!--<xsl:apply-templates select="testcases"> <xsl:with-param name="streaming" select="false()"/> - </xsl:apply-templates> + </xsl:apply-templates> --> <xsl:apply-templates select="testcases"> <xsl:with-param name="streaming" select="true()"/> </xsl:apply-templates> @@ -46,7 +46,7 @@ { XIncludeReaderTests.RunAndCompare( "../../XInclude-Test-Suite/<xsl:value-of select="@basedir"/>/" + source, - "../../XInclude-Test-Suite/<xsl:value-of select="@basedir"/>/" + result, false, <xsl:choose><xsl:when test="$streaming">true</xsl:when><xsl:otherwise>false</xsl:otherwise></xsl:choose>); + "../../XInclude-Test-Suite/<xsl:value-of select="@basedir"/>/" + result<!--, false, <xsl:choose><xsl:when test="$streaming">true</xsl:when><xsl:otherwise>false</xsl:otherwise></xsl:choose>-->); } <xsl:apply-templates/> } Index: XIncludeReaderTests.cs =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/XIncludeReaderTests.cs,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- XIncludeReaderTests.cs 31 Oct 2004 08:02:44 -0000 1.11 +++ XIncludeReaderTests.cs 1 Nov 2004 05:44:44 -0000 1.12 @@ -21,39 +21,23 @@ { Debug.Listeners.Add(new TextWriterTraceListener(Console.Error)); } - - /// <summary> - /// Utility method for running tests. - /// </summary> - public static void RunAndCompare(string source, string result, bool textAsCDATA) - { - RunAndCompare(source, result, textAsCDATA, true); - } - + /// <summary> /// Utility method for running tests. /// </summary> public static void RunAndCompare(string source, string result) { - RunAndCompare(source, result, false, true); - } - - /// <summary> - /// Utility method for running tests. - /// </summary> - public static void RunAndCompareNS(string source, string result) - { - RunAndCompare(source, result, false, false); - } + RunAndCompare(source, result, false); + } /// <summary> /// Utility method for running tests. /// </summary> - public static void RunAndCompare(string source, string result, bool textAsCDATA, bool streaming) + public static void RunAndCompare(string source, string result, bool textAsCDATA) { XmlDocument doc = new XmlDocument(); doc.PreserveWhitespace = true; - XIncludingReader xir = new XIncludingReader(source, streaming); + XIncludingReader xir = new XIncludingReader(source); xir.ExposeTextInclusionsAsCDATA = textAsCDATA; // while (xir.Read()) @@ -189,15 +173,7 @@ { RunAndCompare("../../tests/document.xml", "../../results/document.xml"); } - - /// <summary> - /// General test - it should work actually - non streaming. - /// </summary> - [Test] - public void ItWorksAtLeast_NonStreaming() - { - RunAndCompareNS("../../tests/document.xml", "../../results/document.xml"); - } + /// <summary> /// Non XML character in the included document. @@ -207,17 +183,7 @@ public void NonXMLChar() { RunAndCompare("../../tests/nonxmlchar.xml", "../../results/nonxmlchar.xml"); - } - - /// <summary> - /// Non XML character in the included document - non streaming. - /// </summary> - [Test] - [ExpectedException(typeof(NonXmlCharacterException))] - public void NonXMLChar_NonStreaming() - { - RunAndCompareNS("../../tests/nonxmlchar.xml", "../../results/nonxmlchar.xml"); - } + } /// <summary> /// File not found and no fallback. @@ -227,17 +193,7 @@ public void FileNotFound() { RunAndCompare("../../tests/filenotfound.xml", "../../results/filenotfound.xml"); - } - - /// <summary> - /// File not found and no fallback - non streaming. - /// </summary> - [Test] - [ExpectedException(typeof(FatalResourceException))] - public void FileNotFound_NonStreaming() - { - RunAndCompareNS("../../tests/filenotfound.xml", "../../results/filenotfound.xml"); - } + } /// <summary> /// Includes itself by url. @@ -246,16 +202,7 @@ public void IncludesItselfByUrl() { RunAndCompare("../../tests/includesitself.xml", "../../results/includesitself.xml"); - } - - /// <summary> - /// Includes itself by url - non steraming. - /// </summary> - [Test] - public void IncludesItselfByUrl_NonStreaming() - { - RunAndCompareNS("../../tests/includesitself.xml", "../../results/includesitself.xml"); - } + } /// <summary> /// Includes itself by url - no href - as text. @@ -265,16 +212,7 @@ public void IncludesItselfNoHrefText() { RunAndCompare("../../tests/includesitself-nohref-text.xml", "../../results/includesitself-nohref-text.xml"); - } - - /// <summary> - /// Includes itself by url - no href - as text - non streaming. - /// </summary> - [Test] - public void IncludesItselfNoHrefText_NonStreaming() - { - RunAndCompareNS("../../tests/includesitself-nohref-text.xml", "../../results/includesitself-nohref-text.xml"); - } + } /// <summary> /// Text inclusion. @@ -284,16 +222,7 @@ { RunAndCompare("../../tests/working_example.xml", "../../results/working_example.xml"); } - - /// <summary> - /// Text inclusion - non streaming. - /// </summary> - [Test] - public void TextInclusion_NonStreaming() - { - RunAndCompareNS("../../tests/working_example.xml", "../../results/working_example.xml"); - } - + /// <summary> /// Text inclusion. /// </summary> @@ -301,16 +230,7 @@ public void TextInclusion2() { RunAndCompare("../../tests/working_example2.xml", "../../results/working_example2.xml"); - } - - /// <summary> - /// Text inclusion - non streaming. - /// </summary> - [Test] - public void TextInclusion2_NonStreaming() - { - RunAndCompareNS("../../tests/working_example2.xml", "../../results/working_example2.xml"); - } + } /// <summary> /// Fallback. @@ -319,17 +239,7 @@ public void Fallback() { RunAndCompare("../../tests/fallback.xml", "../../results/fallback.xml"); - } - - /// <summary> - /// Fallback - non streaming. - /// </summary> - [Test] - public void Fallback_NonStreaming() - { - RunAndCompareNS("../../tests/fallback.xml", "../../results/fallback.xml"); - } - + } /// <summary> /// XPointer. @@ -338,16 +248,7 @@ public void XPointer() { RunAndCompare("../../tests/xpointer.xml", "../../results/xpointer.xml"); - } - - /// <summary> - /// XPointer - non streaming. - /// </summary> - [Test] - public void XPointer_NonStreaming() - { - RunAndCompareNS("../../tests/xpointer.xml", "../../results/xpointer.xml"); - } + } /// <summary> /// ReadOuterXml() test. @@ -366,26 +267,7 @@ doc.Load(xir); string outerXml2 = doc.DocumentElement.OuterXml; Assert.AreEqual(outerXml, outerXml2); - } - - /// <summary> - /// ReadOuterXml() test - non streaming. - /// </summary> - [Test] - public void OuterXmlTest_NonStreaming() - { - XIncludingReader xir = new XIncludingReader("../../tests/document.xml", false); - xir.MoveToContent(); - string outerXml = xir.ReadOuterXml(); - xir.Close(); - xir = new XIncludingReader("../../tests/document.xml", false); - xir.MoveToContent(); - XmlDocument doc = new XmlDocument(); - doc.PreserveWhitespace = true; - doc.Load(xir); - string outerXml2 = doc.DocumentElement.OuterXml; - Assert.AreEqual(outerXml, outerXml2); - } + } /// <summary> /// ReadInnerXml() test. @@ -404,26 +286,7 @@ doc.Load(xir); string innerXml2 = doc.DocumentElement.InnerXml; Assert.AreEqual(innerXml, innerXml2); - } - - /// <summary> - /// ReadInnerXml() test - non streaming. - /// </summary> - [Test] - public void InnerXmlTest_NonStreaming() - { - XIncludingReader xir = new XIncludingReader("../../tests/document.xml", false); - xir.MoveToContent(); - string innerXml = xir.ReadInnerXml(); - xir.Close(); - xir = new XIncludingReader("../../tests/document.xml", false); - xir.MoveToContent(); - XmlDocument doc = new XmlDocument(); - doc.PreserveWhitespace = true; - doc.Load(xir); - string innerXml2 = doc.DocumentElement.InnerXml; - Assert.AreEqual(innerXml, innerXml2); - } + } /// <summary> /// Depth test. @@ -442,25 +305,7 @@ string expected = "00011211111111223221100"; Assert.AreEqual(sb.ToString(), expected); } - - /// <summary> - /// Depth test - non streaming. - /// </summary> - [Test] - public void DepthTest_NonStreaming() - { - XIncludingReader xir = new XIncludingReader("../../tests/document.xml", false); - StringBuilder sb = new StringBuilder(); - while (xir.Read()) - { - Console.WriteLine("{0} | {1} | {2} | {3}", - xir.NodeType, xir.Name, xir.Value, xir.Depth); - sb.Append(xir.Depth); - } - string expected = "00011211111111223221100"; - Assert.AreEqual(sb.ToString(), expected); - } - + // /// <summary> // /// Custom resolver test. // /// </summary> Index: NistTests.cs =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/NistTests.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- NistTests.cs 30 Oct 2004 09:56:28 -0000 1.4 +++ NistTests.cs 1 Nov 2004 05:44:44 -0000 1.5 @@ -27,7 +27,7 @@ { XIncludeReaderTests.RunAndCompare( "../../XInclude-Test-Suite/Nist/test/docs/" + source, - "../../XInclude-Test-Suite/Nist/test/docs/" + result, false, true); + "../../XInclude-Test-Suite/Nist/test/docs/" + result); } |