forked from xoofx/markdig
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Tests] Enable ImplictUsings and use file-scoped namespaces
- Loading branch information
Showing
54 changed files
with
5,066 additions
and
5,216 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
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,55 +1,53 @@ | ||
using NUnit.Framework; | ||
using static Markdig.Tests.TestRoundtrip; | ||
|
||
namespace Markdig.Tests.RoundtripSpecs | ||
namespace Markdig.Tests.RoundtripSpecs; | ||
|
||
[TestFixture] | ||
public class TestAtxHeading | ||
{ | ||
[TestFixture] | ||
public class TestAtxHeading | ||
[TestCase("# h")] | ||
[TestCase("# h ")] | ||
[TestCase("# h\n#h")] | ||
[TestCase("# h\n #h")] | ||
[TestCase("# h\n # h")] | ||
[TestCase("# h\n # h ")] | ||
[TestCase(" # h \n # h ")] | ||
public void Test(string value) | ||
{ | ||
[TestCase("# h")] | ||
[TestCase("# h ")] | ||
[TestCase("# h\n#h")] | ||
[TestCase("# h\n #h")] | ||
[TestCase("# h\n # h")] | ||
[TestCase("# h\n # h ")] | ||
[TestCase(" # h \n # h ")] | ||
public void Test(string value) | ||
{ | ||
RoundTrip(value); | ||
} | ||
RoundTrip(value); | ||
} | ||
|
||
[TestCase("\n# h\n\np")] | ||
[TestCase("\n# h\n\np\n")] | ||
[TestCase("\n# h\n\np\n\n")] | ||
[TestCase("\n\n# h\n\np\n\n")] | ||
[TestCase("\n\n# h\np\n\n")] | ||
[TestCase("\n\n# h\np\n\n")] | ||
public void TestParagraph(string value) | ||
{ | ||
RoundTrip(value); | ||
} | ||
[TestCase("\n# h\n\np")] | ||
[TestCase("\n# h\n\np\n")] | ||
[TestCase("\n# h\n\np\n\n")] | ||
[TestCase("\n\n# h\n\np\n\n")] | ||
[TestCase("\n\n# h\np\n\n")] | ||
[TestCase("\n\n# h\np\n\n")] | ||
public void TestParagraph(string value) | ||
{ | ||
RoundTrip(value); | ||
} | ||
|
||
[TestCase("\n# h")] | ||
[TestCase("\n# h\n")] | ||
[TestCase("\n# h\r")] | ||
[TestCase("\n# h\r\n")] | ||
[TestCase("\n# h")] | ||
[TestCase("\n# h\n")] | ||
[TestCase("\n# h\r")] | ||
[TestCase("\n# h\r\n")] | ||
|
||
[TestCase("\r# h")] | ||
[TestCase("\r# h\n")] | ||
[TestCase("\r# h\r")] | ||
[TestCase("\r# h\r\n")] | ||
[TestCase("\r# h")] | ||
[TestCase("\r# h\n")] | ||
[TestCase("\r# h\r")] | ||
[TestCase("\r# h\r\n")] | ||
|
||
[TestCase("\r\n# h")] | ||
[TestCase("\r\n# h\n")] | ||
[TestCase("\r\n# h\r")] | ||
[TestCase("\r\n# h\r\n")] | ||
[TestCase("\r\n# h")] | ||
[TestCase("\r\n# h\n")] | ||
[TestCase("\r\n# h\r")] | ||
[TestCase("\r\n# h\r\n")] | ||
|
||
[TestCase("# h\n\n ")] | ||
[TestCase("# h\n\n ")] | ||
[TestCase("# h\n\n ")] | ||
public void TestNewline(string value) | ||
{ | ||
RoundTrip(value); | ||
} | ||
[TestCase("# h\n\n ")] | ||
[TestCase("# h\n\n ")] | ||
[TestCase("# h\n\n ")] | ||
public void TestNewline(string value) | ||
{ | ||
RoundTrip(value); | ||
} | ||
} |
180 changes: 89 additions & 91 deletions
180
src/Markdig.Tests/RoundtripSpecs/TestFencedCodeBlock.cs
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 |
---|---|---|
@@ -1,107 +1,105 @@ | ||
using NUnit.Framework; | ||
using static Markdig.Tests.TestRoundtrip; | ||
|
||
namespace Markdig.Tests.RoundtripSpecs | ||
namespace Markdig.Tests.RoundtripSpecs; | ||
|
||
[TestFixture] | ||
public class TestFencedCodeBlock | ||
{ | ||
[TestFixture] | ||
public class TestFencedCodeBlock | ||
{ | ||
[TestCase("```\nc\n```")] | ||
[TestCase("```\nc\n```\n")] | ||
[TestCase("\n```\nc\n```")] | ||
[TestCase("\n\n```\nc\n```")] | ||
[TestCase("```\nc\n```\n")] | ||
[TestCase("```\nc\n```\n\n")] | ||
[TestCase("\n```\nc\n```\n")] | ||
[TestCase("\n```\nc\n```\n\n")] | ||
[TestCase("\n\n```\nc\n```\n")] | ||
[TestCase("\n\n```\nc\n```\n\n")] | ||
[TestCase("```\nc\n```")] | ||
[TestCase("```\nc\n```\n")] | ||
[TestCase("\n```\nc\n```")] | ||
[TestCase("\n\n```\nc\n```")] | ||
[TestCase("```\nc\n```\n")] | ||
[TestCase("```\nc\n```\n\n")] | ||
[TestCase("\n```\nc\n```\n")] | ||
[TestCase("\n```\nc\n```\n\n")] | ||
[TestCase("\n\n```\nc\n```\n")] | ||
[TestCase("\n\n```\nc\n```\n\n")] | ||
|
||
[TestCase(" ```\nc\n````")] | ||
[TestCase("```\nc\n````")] | ||
[TestCase("p\n\n```\nc\n```")] | ||
[TestCase(" ```\nc\n````")] | ||
[TestCase("```\nc\n````")] | ||
[TestCase("p\n\n```\nc\n```")] | ||
|
||
[TestCase("```\n c\n```")] | ||
[TestCase("```\nc \n```")] | ||
[TestCase("```\n c \n```")] | ||
[TestCase("```\n c\n```")] | ||
[TestCase("```\nc \n```")] | ||
[TestCase("```\n c \n```")] | ||
|
||
[TestCase(" ``` \n c \n ``` ")] | ||
[TestCase("\t```\t\n\tc\t\n\t```\t")] | ||
[TestCase("\v```\v\n\vc\v\n\v```\v")] | ||
[TestCase("\f```\f\n\fc\f\n\f```\f")] | ||
public void Test(string value) | ||
{ | ||
RoundTrip(value); | ||
} | ||
[TestCase(" ``` \n c \n ``` ")] | ||
[TestCase("\t```\t\n\tc\t\n\t```\t")] | ||
[TestCase("\v```\v\n\vc\v\n\v```\v")] | ||
[TestCase("\f```\f\n\fc\f\n\f```\f")] | ||
public void Test(string value) | ||
{ | ||
RoundTrip(value); | ||
} | ||
|
||
[TestCase("~~~ aa ``` ~~~\nfoo\n~~~")] | ||
[TestCase("~~~ aa ``` ~~~\nfoo\n~~~ ")] | ||
public void TestTilde(string value) | ||
{ | ||
RoundTrip(value); | ||
} | ||
[TestCase("~~~ aa ``` ~~~\nfoo\n~~~")] | ||
[TestCase("~~~ aa ``` ~~~\nfoo\n~~~ ")] | ||
public void TestTilde(string value) | ||
{ | ||
RoundTrip(value); | ||
} | ||
|
||
[TestCase("```\n c \n```")] | ||
[TestCase("```\n c \r```")] | ||
[TestCase("```\n c \r\n```")] | ||
[TestCase("```\r c \n```")] | ||
[TestCase("```\r c \r```")] | ||
[TestCase("```\r c \r\n```")] | ||
[TestCase("```\r\n c \n```")] | ||
[TestCase("```\r\n c \r```")] | ||
[TestCase("```\r\n c \r\n```")] | ||
[TestCase("```\n c \n```")] | ||
[TestCase("```\n c \r```")] | ||
[TestCase("```\n c \r\n```")] | ||
[TestCase("```\r c \n```")] | ||
[TestCase("```\r c \r```")] | ||
[TestCase("```\r c \r\n```")] | ||
[TestCase("```\r\n c \n```")] | ||
[TestCase("```\r\n c \r```")] | ||
[TestCase("```\r\n c \r\n```")] | ||
|
||
[TestCase("```\n c \n```\n")] | ||
[TestCase("```\n c \r```\n")] | ||
[TestCase("```\n c \r\n```\n")] | ||
[TestCase("```\r c \n```\n")] | ||
[TestCase("```\r c \r```\n")] | ||
[TestCase("```\r c \r\n```\n")] | ||
[TestCase("```\r\n c \n```\n")] | ||
[TestCase("```\r\n c \r```\n")] | ||
[TestCase("```\r\n c \r\n```\n")] | ||
[TestCase("```\n c \n```\n")] | ||
[TestCase("```\n c \r```\n")] | ||
[TestCase("```\n c \r\n```\n")] | ||
[TestCase("```\r c \n```\n")] | ||
[TestCase("```\r c \r```\n")] | ||
[TestCase("```\r c \r\n```\n")] | ||
[TestCase("```\r\n c \n```\n")] | ||
[TestCase("```\r\n c \r```\n")] | ||
[TestCase("```\r\n c \r\n```\n")] | ||
|
||
[TestCase("```\n c \n```\r")] | ||
[TestCase("```\n c \r```\r")] | ||
[TestCase("```\n c \r\n```\r")] | ||
[TestCase("```\r c \n```\r")] | ||
[TestCase("```\r c \r```\r")] | ||
[TestCase("```\r c \r\n```\r")] | ||
[TestCase("```\r\n c \n```\r")] | ||
[TestCase("```\r\n c \r```\r")] | ||
[TestCase("```\r\n c \r\n```\r")] | ||
[TestCase("```\n c \n```\r")] | ||
[TestCase("```\n c \r```\r")] | ||
[TestCase("```\n c \r\n```\r")] | ||
[TestCase("```\r c \n```\r")] | ||
[TestCase("```\r c \r```\r")] | ||
[TestCase("```\r c \r\n```\r")] | ||
[TestCase("```\r\n c \n```\r")] | ||
[TestCase("```\r\n c \r```\r")] | ||
[TestCase("```\r\n c \r\n```\r")] | ||
|
||
[TestCase("```\n c \n```\r\n")] | ||
[TestCase("```\n c \r```\r\n")] | ||
[TestCase("```\n c \r\n```\r\n")] | ||
[TestCase("```\r c \n```\r\n")] | ||
[TestCase("```\r c \r```\r\n")] | ||
[TestCase("```\r c \r\n```\r\n")] | ||
[TestCase("```\r\n c \n```\r\n")] | ||
[TestCase("```\r\n c \r```\r\n")] | ||
[TestCase("```\r\n c \r\n```\r\n")] | ||
public void TestNewline(string value) | ||
{ | ||
RoundTrip(value); | ||
} | ||
[TestCase("```\n c \n```\r\n")] | ||
[TestCase("```\n c \r```\r\n")] | ||
[TestCase("```\n c \r\n```\r\n")] | ||
[TestCase("```\r c \n```\r\n")] | ||
[TestCase("```\r c \r```\r\n")] | ||
[TestCase("```\r c \r\n```\r\n")] | ||
[TestCase("```\r\n c \n```\r\n")] | ||
[TestCase("```\r\n c \r```\r\n")] | ||
[TestCase("```\r\n c \r\n```\r\n")] | ||
public void TestNewline(string value) | ||
{ | ||
RoundTrip(value); | ||
} | ||
|
||
[TestCase("```i a\n```")] | ||
[TestCase("```i a a2\n```")] | ||
[TestCase("```i a a2 a3\n```")] | ||
[TestCase("```i a a2 a3 a4\n```")] | ||
[TestCase("```i a\n```")] | ||
[TestCase("```i a a2\n```")] | ||
[TestCase("```i a a2 a3\n```")] | ||
[TestCase("```i a a2 a3 a4\n```")] | ||
|
||
[TestCase("```i\ta\n```")] | ||
[TestCase("```i\ta a2\n```")] | ||
[TestCase("```i\ta a2 a3\n```")] | ||
[TestCase("```i\ta a2 a3 a4\n```")] | ||
[TestCase("```i\ta\n```")] | ||
[TestCase("```i\ta a2\n```")] | ||
[TestCase("```i\ta a2 a3\n```")] | ||
[TestCase("```i\ta a2 a3 a4\n```")] | ||
|
||
[TestCase("```i\ta \n```")] | ||
[TestCase("```i\ta a2 \n```")] | ||
[TestCase("```i\ta a2 a3 \n```")] | ||
[TestCase("```i\ta a2 a3 a4 \n```")] | ||
public void TestInfoArguments(string value) | ||
{ | ||
RoundTrip(value); | ||
} | ||
[TestCase("```i\ta \n```")] | ||
[TestCase("```i\ta a2 \n```")] | ||
[TestCase("```i\ta a2 a3 \n```")] | ||
[TestCase("```i\ta a2 a3 a4 \n```")] | ||
public void TestInfoArguments(string value) | ||
{ | ||
RoundTrip(value); | ||
} | ||
} |
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 |
---|---|---|
@@ -1,20 +1,18 @@ | ||
using NUnit.Framework; | ||
using static Markdig.Tests.TestRoundtrip; | ||
|
||
namespace Markdig.Tests.RoundtripSpecs | ||
namespace Markdig.Tests.RoundtripSpecs; | ||
|
||
[TestFixture] | ||
public class TestHtmlBlock | ||
{ | ||
[TestFixture] | ||
public class TestHtmlBlock | ||
[TestCase("<br>")] | ||
[TestCase("<br>\n")] | ||
[TestCase("<br>\n\n")] | ||
[TestCase("<div></div>\n\n# h")] | ||
[TestCase("p\n\n<div></div>\n")] | ||
[TestCase("<div></div>\n\n# h")] | ||
public void Test(string value) | ||
{ | ||
[TestCase("<br>")] | ||
[TestCase("<br>\n")] | ||
[TestCase("<br>\n\n")] | ||
[TestCase("<div></div>\n\n# h")] | ||
[TestCase("p\n\n<div></div>\n")] | ||
[TestCase("<div></div>\n\n# h")] | ||
public void Test(string value) | ||
{ | ||
RoundTrip(value); | ||
} | ||
RoundTrip(value); | ||
} | ||
} |
Oops, something went wrong.