Skip to content

Commit 0e33d3a

Browse files
committed
test: improve linear performance test names
Use "test_linear_performance_XXX" style.
1 parent 910e5a2 commit 0e33d3a

8 files changed

+10
-10
lines changed

test/parse/test_attlist.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module REXMLTests
77
class TestParseAttlist < Test::Unit::TestCase
88
include Test::Unit::CoreAssertions
99

10-
def test_gt_linear_performance
10+
def test_linear_performance_gt
1111
seq = [10000, 50000, 100000, 150000, 200000]
1212
assert_linear_performance(seq, rehearsal: 10) do |n|
1313
REXML::Document.new('<!DOCTYPE schema SYSTEM "foo.dtd" [<!ATTLIST ' + " " * n + ' root v CDATA #FIXED "test">]>')

test/parse/test_cdata.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module REXMLTests
77
class TestParseCData < Test::Unit::TestCase
88
include Test::Unit::CoreAssertions
99

10-
def test_gt_linear_performance
10+
def test_linear_performance_gt
1111
seq = [10000, 50000, 100000, 150000, 200000]
1212
assert_linear_performance(seq, rehearsal: 10) do |n|
1313
REXML::Document.new('<description><![CDATA[ ' + ">" * n + ' ]]></description>')

test/parse/test_character_reference.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module REXMLTests
77
class TestParseCharacterReference < Test::Unit::TestCase
88
include Test::Unit::CoreAssertions
99

10-
def test_gt_linear_performance_many_preceding_zeros
10+
def test_linear_performance_many_preceding_zeros
1111
seq = [10000, 50000, 100000, 150000, 200000]
1212
assert_linear_performance(seq, rehearsal: 10) do |n|
1313
REXML::Document.new('<test testing="&#' + "0" * n + '97;"/>')

test/parse/test_comment.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -122,14 +122,14 @@ def test_after_root
122122
assert_equal(" ok comment ", events[:comment])
123123
end
124124

125-
def test_gt_linear_performance
125+
def test_linear_performance_top_level_gt
126126
seq = [10000, 50000, 100000, 150000, 200000]
127127
assert_linear_performance(seq, rehearsal: 10) do |n|
128128
REXML::Document.new('<!-- ' + ">" * n + ' -->')
129129
end
130130
end
131131

132-
def test_gt_linear_performance_in_element
132+
def test_linear_performance_in_element_gt
133133
seq = [10000, 50000, 100000, 150000, 200000]
134134
assert_linear_performance(seq, rehearsal: 10) do |n|
135135
REXML::Document.new('<xml><!-- ' + '>' * n + ' --></xml>')

test/parse/test_document_type_declaration.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ def test_notation_attlist
280280
doctype.children.collect(&:class))
281281
end
282282

283-
def test_gt_linear_performance_malformed_entity
283+
def test_linear_performance_percent_gt
284284
seq = [10000, 50000, 100000, 150000, 200000]
285285
assert_linear_performance(seq, rehearsal: 10) do |n|
286286
begin
@@ -290,7 +290,7 @@ def test_gt_linear_performance_malformed_entity
290290
end
291291
end
292292

293-
def test_gt_linear_performance_comment
293+
def test_linear_performance_comment_gt
294294
seq = [10000, 50000, 100000, 150000, 200000]
295295
assert_linear_performance(seq, rehearsal: 10) do |n|
296296
REXML::Document.new('<!DOCTYPE root [<!-- ' + ">" * n + ' -->]>')

test/parse/test_element.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def test_after_empty_element_tag_root
125125
end
126126
end
127127

128-
def test_gt_linear_performance_attribute_value
128+
def test_linear_performance_attribute_value_gt
129129
seq = [10000, 50000, 100000, 150000, 200000]
130130
assert_linear_performance(seq, rehearsal: 10) do |n|
131131
REXML::Document.new('<test testing="' + ">" * n + '"></test>')

test/parse/test_entity_declaration.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def test_empty
3333
DETAIL
3434
end
3535

36-
def test_gt_linear_performance
36+
def test_linear_performance_gt
3737
seq = [10000, 50000, 100000, 150000, 200000]
3838
assert_linear_performance(seq, rehearsal: 10) do |n|
3939
REXML::Document.new('<!DOCTYPE rubynet [<!ENTITY rbconfig.ruby_version "' + '>' * n + '">')

test/parse/test_processing_instruction.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def test_after_root
7474
assert_equal("abc", events[:processing_instruction])
7575
end
7676

77-
def test_gt_linear_performance
77+
def test_linear_performance_gt
7878
seq = [10000, 50000, 100000, 150000, 200000]
7979
assert_linear_performance(seq, rehearsal: 10) do |n|
8080
REXML::Document.new('<?xml version="1.0" ' + ">" * n + ' ?>')

0 commit comments

Comments
 (0)