⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Ruby master
All Projects
Ruby
»
Ruby master
Overview
Activity
Roadmap
Issues
Repository
Like
Download (348 Bytes)
Bug #18470
ยป set_test.rb
smokinggun (John Weir)
, 01/10/2022 08:22 PM
require
'test/unit'
require
'set'
class
TestSet
<
Test
::
Unit
::
TestCase
C
=
Struct
.
new
:id
def
test_set_comparison
a
=
Set
.
new
b
=
Set
.
new
f
=
C
.
new
a
<<
f
f
.
id
=
1
b
<<
f
assert_equal
a
.
first
,
b
.
first
assert_equal
b
.
first
,
a
.
first
assert_equal
a
,
(
b
+
a
)
# fails
assert_equal
a
,
(
a
+
b
)
end
end
(1-1/1)
Loading...