Skip to content

Commit

Permalink
test: add a performance test for PI with many tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
Watson1978 authored and kou committed Aug 1, 2024
1 parent e2546e6 commit 1599e87
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/parse/test_processing_instruction.rb
Original file line number Diff line number Diff line change
Expand Up @@ -116,5 +116,12 @@ def test_linear_performance_gt
REXML::Document.new("<?xml version=\"1.0\" " + ">" * n + " ?>")
end
end

def test_linear_performance_tab
seq = [10000, 50000, 100000, 150000, 200000]
assert_linear_performance(seq, rehearsal: 10) do |n|
REXML::Document.new("<?name" + "\t" * n + "version=\"1.0\" > ?>")
end
end
end
end

0 comments on commit 1599e87

Please sign in to comment.