added a test for class refs

This commit is contained in:
Torsten Ruger 2014-08-21 15:40:13 +03:00
parent 3915f5b7f9
commit b5792c155c

View File

@ -96,4 +96,11 @@ class BasicSof < MiniTest::Test
@out = Sof::Writer.write(ObjectWithAttributes) @out = Sof::Writer.write(ObjectWithAttributes)
check "ObjectWithAttributes" check "ObjectWithAttributes"
end end
def test_class_ref
object = ObjectWithAttributes.new
object.extra = ObjectWithAttributes
ar = [object , ObjectWithAttributes]
@out = Sof::Writer.write(ar)
check "-ObjectWithAttributes(:name => 'some name', :number => 1234, :extra => *1)\n-&1 ObjectWithAttributes"
end
end end