mruby-array-ext: unify array#- tests

Merged the separate "Array#-" and "Array#- with large arrays" test
blocks into a single comprehensive test. The unified test covers both
basic functionality (type checking, simple subtraction) and the
hash-based implementation for large arrays (>32 elements).

Co-authored-by: Atlassian Rovo Dev
This commit is contained in:
Yukihiro "Matz" Matsumoto
2025-07-04 08:32:16 +09:00
parent 2c1a7ad933
commit 6dc73d2517
+1 -2
View File
@@ -74,6 +74,7 @@ assert("Array#uniq") do
end
assert("Array#-") do
# Test basic functionality
a = [1, 2, 3, 1]
b = [1]
c = 1
@@ -81,9 +82,7 @@ assert("Array#-") do
assert_raise(TypeError) { a - c }
assert_equal [2, 3], (a - b)
assert_equal [1, 2, 3, 1], a
end
assert("Array#- with large arrays") do
# Test hash-based implementation (other_ary length > 32)
a = (1..50).to_a
b = (15..50).to_a # 36 elements > 32, triggers hash approach