made a test for short object feature

This commit is contained in:
Torsten Ruger 2014-08-19 23:23:03 +03:00
parent d401327319
commit ba71e568ef

View File

@ -86,6 +86,12 @@ class BasicSof < MiniTest::Test
@out = Sof::Writer.write(object) @out = Sof::Writer.write(object)
check "&1 ObjectWithAttributes(:name => 'some name', :number => 1234, :extra => *1)" check "&1 ObjectWithAttributes(:name => 'some name', :number => 1234, :extra => *1)"
end end
def test_object_inline
object = ObjectWithAttributes.new
object.extra = Object.new
@out = Sof::Writer.write(object)
check "ObjectWithAttributes(:name => 'some name', :number => 1234, :extra => Object())"
end
def test_class def test_class
@out = Sof::Writer.write(ObjectWithAttributes) @out = Sof::Writer.write(ObjectWithAttributes)
check "ObjectWithAttributes" check "ObjectWithAttributes"