本文整理汇总了C#中nicTest.diff_match_patchTest.patch_splitMax方法的典型用法代码示例。如果您正苦于以下问题:C# diff_match_patchTest.patch_splitMax方法的具体用法?C# diff_match_patchTest.patch_splitMax怎么用?C# diff_match_patchTest.patch_splitMax使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类nicTest.diff_match_patchTest
的用法示例。
在下文中一共展示了diff_match_patchTest.patch_splitMax方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: patch_splitMaxTest
public void patch_splitMaxTest()
{
// Assumes that Match_MaxBits is 32.
var dmp = new diff_match_patchTest();
List<Patch> patches = dmp.patch_make("abcdefghijklmnopqrstuvwxyz01234567890", "XabXcdXefXghXijXklXmnXopXqrXstXuvXwxXyzX01X23X45X67X89X0");
dmp.patch_splitMax(patches);
Assert.AreEqual("@@ -1,32 +1,46 @@\n+X\n ab\n+X\n cd\n+X\n ef\n+X\n gh\n+X\n ij\n+X\n kl\n+X\n mn\n+X\n op\n+X\n qr\n+X\n st\n+X\n uv\n+X\n wx\n+X\n yz\n+X\n 012345\[email protected]@ -25,13 +39,18 @@\n zX01\n+X\n 23\n+X\n 45\n+X\n 67\n+X\n 89\n+X\n 0\n", dmp.patch_toText(patches));
patches = dmp.patch_make("abcdef1234567890123456789012345678901234567890123456789012345678901234567890uvwxyz", "abcdefuvwxyz");
string oldToText = dmp.patch_toText(patches);
dmp.patch_splitMax(patches);
Assert.AreEqual(oldToText, dmp.patch_toText(patches));
patches = dmp.patch_make("1234567890123456789012345678901234567890123456789012345678901234567890", "abc");
dmp.patch_splitMax(patches);
Assert.AreEqual("@@ -1,32 +1,4 @@\n-1234567890123456789012345678\n 9012\[email protected]@ -29,32 +1,4 @@\n-9012345678901234567890123456\n 7890\[email protected]@ -57,14 +1,3 @@\n-78901234567890\n+abc\n", dmp.patch_toText(patches));
patches = dmp.patch_make("abcdefghij , h : 0 , t : 1 abcdefghij , h : 0 , t : 1 abcdefghij , h : 0 , t : 1", "abcdefghij , h : 1 , t : 1 abcdefghij , h : 1 , t : 1 abcdefghij , h : 0 , t : 1");
dmp.patch_splitMax(patches);
Assert.AreEqual("@@ -2,32 +2,32 @@\n bcdefghij , h : \n-0\n+1\n , t : 1 abcdef\[email protected]@ -29,32 +29,32 @@\n bcdefghij , h : \n-0\n+1\n , t : 1 abcdef\n", dmp.patch_toText(patches));
}