Skip to content

Commit

Permalink
test: add a performance test for attribute list declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
Watson1978 authored and kou committed Aug 1, 2024
1 parent be86b3d commit 17ff3e7
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/parse/test_attribute_list_declaration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,16 @@ def test_linear_performance_space
" root v CDATA #FIXED \"test\">]>")
end
end

def test_linear_performance_tab_and_gt
seq = [10000, 50000, 100000, 150000, 200000]
assert_linear_performance(seq, rehearsal: 10) do |n|
REXML::Document.new("<!DOCTYPE root [<!ATTLIST " +
"\t" * n +
"root value CDATA \"" +
">" * n +
"\">]>")
end
end
end
end

0 comments on commit 17ff3e7

Please sign in to comment.