Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 15 additions & 6 deletions CSharpMath.Editor.Tests/IndexForPointTests.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using Xunit;
using CSharpMath;
using CSharpMath.Atoms;
using CSharpMath.Editor;
using CSharpMath.Enumerations;
using CSharpMath.FrontEnd;
using CSharpMath.Tests.FrontEnd;
using Xunit;

namespace CSharpMath.Editor.Tests {
// Use the "CSharpMath.Editor Test Checker" project in the _Utils folder to visualize the test cases
Expand Down Expand Up @@ -490,5 +485,19 @@ public void Complex(PointF point, MathListIndex expected) =>
};
[Theory, MemberData(nameof(SineData))]
public void Sine(PointF point, MathListIndex expected) => Test(@"\sin\pi", point, expected);

public static TestData Issue64Data =>
new TestData {
{ (0, 15), 0 },
{ (10, 10), 0, (SubIndex.BetweenBaseAndScripts, 1) },
{ (10, 15), 0, (SubIndex.BetweenBaseAndScripts, 1) },
{ (12, 10), 0, (SubIndex.Superscript, 0) },
{ (12, 15), 0, (SubIndex.Superscript, 0) },
{ (35, 10), 1 },
{ (50, 15), 2 },
};
[Theory, MemberData(nameof(Issue64Data))]
public void Issue64(PointF point, MathListIndex expected) => Test(@"1^{123}+", point, expected);

}
}
Loading