-
Notifications
You must be signed in to change notification settings - Fork 793
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes #148 closes #184 commit a43070e2e0ffb2e4630e4e1e52632aad24d58801 Merge: 5e24472 be66b39 Author: latkin <latkin@microsoft.com> Date: Mon Feb 2 15:40:44 2015 -0800 Merge branch 'xml-fix' of https://github.com/ReedCopsey/visualfsharp into ReedCopsey-xml-fix commit be66b39 Author: ReedCopsey <reed@reedcopsey.com> Date: Mon Feb 2 10:47:51 2015 -0800 Corrected UnitOfMeasure XML Tests These previously required there to be an empty "member" variable for the indices to match. Adjusted indices to match new, correct generated XML commit fe1ef0d Author: ReedCopsey <reed@reedcopsey.com> Date: Fri Jan 30 17:32:28 2015 -0800 Added Basic\xmlDoc005.fs test To check that no empty members are generated. commit 5450b68 Author: ReedCopsey <reed@reedcopsey.com> Date: Fri Jan 30 13:58:43 2015 -0800 Correct writeXmlDoc.addMembers Prevent members from being added to the global member list when the xmlDoc contains no content.
- Loading branch information
Showing
5 changed files
with
84 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// #Regression #XMLDoc | ||
// Verify that XmlDoc names are generated, but no empty members are generated re: issue #148 | ||
//<Expects status=success></Expects> | ||
|
||
#light | ||
|
||
namespace MyRather.MyDeep.MyNamespace | ||
open System.Xml | ||
|
||
/// class1 | ||
type Class1() = | ||
/// x | ||
member this.X = "X" | ||
|
||
type Class2() = | ||
member this.Y = "Y" | ||
|
||
///testModule | ||
module MyModule = | ||
|
||
let check (xml:XmlDocument) name xmlDoc = | ||
let foundDoc = ((xml.SelectSingleNode ("/doc/members/member[@name='" + name + "']")).SelectSingleNode "summary").InnerText.Trim() | ||
if xmlDoc <> foundDoc then | ||
printfn "%s: generated xmlDoc <%s> differs from excpected <%s>" name foundDoc xmlDoc | ||
xmlDoc = foundDoc | ||
|
||
let hasEmptyMembers (xml:XmlDocument) = | ||
let node = xml.SelectSingleNode ("/doc/members/member[@name='']") | ||
if node <> null then | ||
printfn "Empty member name entries found." | ||
node <> null | ||
|
||
let test = | ||
let myname = System.Reflection.Assembly.GetExecutingAssembly().Location | ||
let xmlname = System.IO.Path.ChangeExtension(myname, "xml") | ||
|
||
|
||
#if WITHXMLVERIFICATION | ||
let xml = new XmlDocument() | ||
xml.Load xmlname | ||
if check xml "P:MyRather.MyDeep.MyNamespace.Class1.X" "x" | ||
&& check xml "T:MyRather.MyDeep.MyNamespace.Class1" "class1" | ||
&& not(hasEmptyMembers xml) | ||
then 0 else 1 | ||
#else | ||
0 | ||
#endif | ||
|
||
test |> exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters