diff options
Diffstat (limited to 'test/ruby/enc')
-rw-r--r-- | test/ruby/enc/test_case_comprehensive.rb | 8 | ||||
-rw-r--r-- | test/ruby/enc/test_case_options.rb | 12 |
2 files changed, 10 insertions, 10 deletions
diff --git a/test/ruby/enc/test_case_comprehensive.rb b/test/ruby/enc/test_case_comprehensive.rb index 7176670881..2ee24f86c9 100644 --- a/test/ruby/enc/test_case_comprehensive.rb +++ b/test/ruby/enc/test_case_comprehensive.rb @@ -35,7 +35,7 @@ TestComprehensiveCaseFold.data_files_available? and class TestComprehensiveCase end end - def self.read_data_file (filename) + def self.read_data_file(filename) IO.foreach(expand_filename(filename), encoding: Encoding::ASCII_8BIT) do |line| if $. == 1 if filename == 'UnicodeData' @@ -140,7 +140,7 @@ TestComprehensiveCaseFold.data_files_available? and class TestComprehensiveCase @@tests ||= [] end - def self.generate_unicode_case_mapping_tests (encoding) + def self.generate_unicode_case_mapping_tests(encoding) all_tests.each do |test| attributes = test.attributes.map(&:to_s).join '-' attributes.prepend '_' unless attributes.empty? @@ -158,7 +158,7 @@ TestComprehensiveCaseFold.data_files_available? and class TestComprehensiveCase end end - def self.generate_case_mapping_tests (encoding) + def self.generate_case_mapping_tests(encoding) all_tests # preselect codepoints to speed up testing for small encodings codepoints = @@codepoints.select do |code| @@ -200,7 +200,7 @@ TestComprehensiveCaseFold.data_files_available? and class TestComprehensiveCase end # test for encodings that don't yet (or will never) deal with non-ASCII characters - def self.generate_ascii_only_case_mapping_tests (encoding) + def self.generate_ascii_only_case_mapping_tests(encoding) all_tests # preselect codepoints to speed up testing for small encodings codepoints = @@codepoints.select do |code| diff --git a/test/ruby/enc/test_case_options.rb b/test/ruby/enc/test_case_options.rb index 761c92d51d..e9bf50fcfc 100644 --- a/test/ruby/enc/test_case_options.rb +++ b/test/ruby/enc/test_case_options.rb @@ -3,21 +3,21 @@ require "test/unit" class TestCaseOptions < Test::Unit::TestCase - def assert_raise_functional_operations (arg, *options) + def assert_raise_functional_operations(arg, *options) assert_raise(ArgumentError) { arg.upcase(*options) } assert_raise(ArgumentError) { arg.downcase(*options) } assert_raise(ArgumentError) { arg.capitalize(*options) } assert_raise(ArgumentError) { arg.swapcase(*options) } end - def assert_raise_bang_operations (arg, *options) + def assert_raise_bang_operations(arg, *options) assert_raise(ArgumentError) { arg.upcase!(*options) } assert_raise(ArgumentError) { arg.downcase!(*options) } assert_raise(ArgumentError) { arg.capitalize!(*options) } assert_raise(ArgumentError) { arg.swapcase!(*options) } end - def assert_raise_both_types (*options) + def assert_raise_both_types(*options) assert_raise_functional_operations 'a', *options assert_raise_bang_operations 'a', *options assert_raise_functional_operations :a, *options @@ -35,21 +35,21 @@ class TestCaseOptions < Test::Unit::TestCase assert_raise_both_types :lithuanian, :ascii end - def assert_okay_functional_operations (arg, *options) + def assert_okay_functional_operations(arg, *options) assert_nothing_raised { arg.upcase(*options) } assert_nothing_raised { arg.downcase(*options) } assert_nothing_raised { arg.capitalize(*options) } assert_nothing_raised { arg.swapcase(*options) } end - def assert_okay_bang_operations (arg, *options) + def assert_okay_bang_operations(arg, *options) assert_nothing_raised { arg.upcase!(*options) } assert_nothing_raised { arg.downcase!(*options) } assert_nothing_raised { arg.capitalize!(*options) } assert_nothing_raised { arg.swapcase!(*options) } end - def assert_okay_both_types (*options) + def assert_okay_both_types(*options) assert_okay_functional_operations 'a', *options assert_okay_bang_operations 'a', *options assert_okay_functional_operations :a, *options |