Fixes benchmark tests
This commit is contained in:
+7
-4
@@ -62,6 +62,7 @@ class RichTextParserBenchmark {
|
|||||||
RichTextParser().parseText(
|
RichTextParser().parseText(
|
||||||
"first https://m.primal.net/HeKw.jpg second",
|
"first https://m.primal.net/HeKw.jpg second",
|
||||||
EmptyTagList,
|
EmptyTagList,
|
||||||
|
null,
|
||||||
).paragraphs[0].words[1] is ImageSegment,
|
).paragraphs[0].words[1] is ImageSegment,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -74,6 +75,7 @@ class RichTextParserBenchmark {
|
|||||||
RichTextParser().parseText(
|
RichTextParser().parseText(
|
||||||
"first amethyst.social second",
|
"first amethyst.social second",
|
||||||
EmptyTagList,
|
EmptyTagList,
|
||||||
|
null,
|
||||||
).paragraphs[0].words[1] is LinkSegment,
|
).paragraphs[0].words[1] is LinkSegment,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -86,6 +88,7 @@ class RichTextParserBenchmark {
|
|||||||
RichTextParser().parseText(
|
RichTextParser().parseText(
|
||||||
"first #amethyst second",
|
"first #amethyst second",
|
||||||
EmptyTagList,
|
EmptyTagList,
|
||||||
|
null,
|
||||||
).paragraphs[0].words[1] is HashTagSegment,
|
).paragraphs[0].words[1] is HashTagSegment,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -94,14 +97,14 @@ class RichTextParserBenchmark {
|
|||||||
@Test
|
@Test
|
||||||
fun computeTestCase1All() {
|
fun computeTestCase1All() {
|
||||||
benchmarkRule.measureRepeated {
|
benchmarkRule.measureRepeated {
|
||||||
RichTextParser().parseText(testCase1, EmptyTagList)
|
RichTextParser().parseText(testCase1, EmptyTagList, null)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun computeTestCase2All() {
|
fun computeTestCase2All() {
|
||||||
benchmarkRule.measureRepeated {
|
benchmarkRule.measureRepeated {
|
||||||
RichTextParser().parseText(testCase2, EmptyTagList)
|
RichTextParser().parseText(testCase2, EmptyTagList, null)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -129,14 +132,14 @@ class RichTextParserBenchmark {
|
|||||||
@Test
|
@Test
|
||||||
fun computeTestCase3All() {
|
fun computeTestCase3All() {
|
||||||
benchmarkRule.measureRepeated {
|
benchmarkRule.measureRepeated {
|
||||||
RichTextParser().parseText(testCase3, EmptyTagList)
|
RichTextParser().parseText(testCase3, EmptyTagList, null)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun computeTestCaseJapanese() {
|
fun computeTestCaseJapanese() {
|
||||||
benchmarkRule.measureRepeated {
|
benchmarkRule.measureRepeated {
|
||||||
RichTextParser().parseText(testCaseJapanese, testCaseJapaneseTags)
|
RichTextParser().parseText(testCaseJapanese, testCaseJapaneseTags, null)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user