Skip to content

Mfrac.Visit() throws NullReferenceException #7

Description

@Maximilian-Renner

Here is another bug. If you use the Visit() function on any Mfrac object, it will throw a NullreferenceException. Math term represented in this example: "a/b"
The MathML code was converted by: http://www.mathmlcentral.com/Tools/ToMathML.jsp

[TestMethod]
public void ParseFormula_Mfrac()
{
    string mathMl = "<math><mfrac><mi>a</mi><mi>b</mi></mfrac></math>";
    var a = MathMLToCSharpLib.Parser.Parse(XElement.Parse(mathMl));
    StringBuilder sb = new StringBuilder();
    MathMLToCSharpLib.BuildContext bc = new MathMLToCSharpLib.BuildContext();
    a.Visit(sb, bc);
}

This is one of the easiest test case that could have been written for this library. Please do improve your testing.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions