diff options
author | Kevin Newton <kddnewton@gmail.com> | 2023-11-14 15:50:53 -0500 |
---|---|---|
committer | Kevin Newton <kddnewton@gmail.com> | 2023-11-14 16:22:03 -0500 |
commit | befad28f3041b2c26589ed7fc0e19fbe52893806 (patch) | |
tree | 2b6fea9f35f9d7f852e38f272699f4801c78c848 /test/prism/errors_test.rb | |
parent | 93e9be2f69a916935ec97322a75b8516527e5b7e (diff) | |
download | ruby-befad28f3041b2c26589ed7fc0e19fbe52893806.tar.gz |
Resync prism delete bin/dot
Diffstat (limited to 'test/prism/errors_test.rb')
-rw-r--r-- | test/prism/errors_test.rb | 94 |
1 files changed, 0 insertions, 94 deletions
diff --git a/test/prism/errors_test.rb b/test/prism/errors_test.rb index d756c1cb0d..5d4b95a224 100644 --- a/test/prism/errors_test.rb +++ b/test/prism/errors_test.rb @@ -1676,100 +1676,6 @@ module Prism ], compare_ripper: false # Ripper does not check 'void value expression'. end - def test_void_value_expression_in_arguments - source = <<~RUBY - foo(return) - foo(1, return) - foo(*return) - foo(**return) - foo(&return) - foo(return => 1) - foo(:a => return) - foo(a: return) - RUBY - message = 'Unexpected void value expression' - assert_errors expression(source), source, [ - [message, 4..10], - [message, 19..25], - [message, 32..38], - [message, 46..52], - [message, 59..65], - [message, 71..77], - [message, 94..100], - [message, 109..115], - ], compare_ripper: false # Ripper does not check 'void value expression'. - end - - def test_void_value_expression_in_hash - source = <<~RUBY - { return => 1 } - { 1 => return } - { a: return } - { **return } - RUBY - message = 'Unexpected void value expression' - assert_errors expression(source), source, [ - [message, 2..8], - [message, 23..29], - [message, 37..43], - [message, 50..56], - ], compare_ripper: false # Ripper does not check 'void value expression'. - end - - def test_void_value_expression_in_arguments - source = <<~RUBY - foo(return) - foo(1, return) - foo(*return) - foo(**return) - foo(&return) - foo(return => 1) - foo(:a => return) - foo(a: return) - RUBY - message = 'Unexpected void value expression' - assert_errors expression(source), source, [ - [message, 4..10], - [message, 19..25], - [message, 32..38], - [message, 46..52], - [message, 59..65], - [message, 71..77], - [message, 94..100], - [message, 109..115], - ], compare_ripper: false # Ripper does not check 'void value expression'. - end - - def test_void_value_expression_in_unary_call - source = <<~RUBY - +(return) - not return - RUBY - message = 'Unexpected void value expression' - assert_errors expression(source), source, [ - [message, 2..8], - [message, 14..20], - ], compare_ripper: false # Ripper does not check 'void value expression'. - end - - def test_void_value_expression_in_binary_call - source = <<~RUBY - 1 + (return) - (return) + 1 - 1 and (return) - (return) and 1 - 1 or (return) - (return) or 1 - RUBY - message = 'Unexpected void value expression' - assert_errors expression(source), source, [ - [message, 5..11], - [message, 14..20], - [message, 42..48], - [message, 71..77], - ], compare_ripper: false # Ripper does not check 'void value expression'. - end - private def assert_errors(expected, source, errors, compare_ripper: RUBY_ENGINE == "ruby") |