Skip to content

Commit 17ff3e7

Browse files
Watson1978kou
authored andcommitted
test: add a performance test for attribute list declaration
1 parent be86b3d commit 17ff3e7

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/parse/test_attribute_list_declaration.rb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,16 @@ def test_linear_performance_space
1515
" root v CDATA #FIXED \"test\">]>")
1616
end
1717
end
18+
19+
def test_linear_performance_tab_and_gt
20+
seq = [10000, 50000, 100000, 150000, 200000]
21+
assert_linear_performance(seq, rehearsal: 10) do |n|
22+
REXML::Document.new("<!DOCTYPE root [<!ATTLIST " +
23+
"\t" * n +
24+
"root value CDATA \"" +
25+
">" * n +
26+
"\">]>")
27+
end
28+
end
1829
end
1930
end

0 commit comments

Comments
 (0)