Sha256: cd2f8d635031705158651bc0e1d98304d6048d572820cdcfca30360959fe8160

Contents?: true

Size: 1.42 KB

Versions: 1

Compression:

Stored size: 1.42 KB

Contents

metadata 'MetaData.xml'

uia 'projects/SimpleScene/SimpleScene.uia'

main = app.main_presentation

assert main.find( _type:'Model' ).length==4
assert main.find( _type:'Model', _slide:0 ).length==3
assert main.find( _type:'Model', _slide:1 ).length==4
assert main.find( _type:'Model', _slide:1, _master:false ).length==1
assert main.find( _type:'Model', position:[-150,60,0] ).length==2
assert main.find( _type:'Model', position:[-150,60,0] ).length==2
assert main.find( _type:'Model', position:[nil,60,nil] ).length==4
assert main.find( _type:'Model', sourcepath:'#Cube' ).length==1
assert main.find( _under:main/"Scene.Layer.Sphere1" ).length==1
assert main.find( name:'Material' ).length==4
assert main.find( name:/^Sphere/ ).length==2

# Return values are in Scene graph order
assert main.find.first == main/"Scene"
assert main.find.last  == main/"Scene.Layer.NonMaster.Material"

# Any asset can be used as the 'root'
sphere = main/"Scene.Layer.Sphere1"
assert sphere.find.length==1

# Supplying a block will iterate, including the index
expected = main.find _type:'Model'
found = 0
main.find _type:'Model' do |mod,i|
	found += 1
	assert mod == expected[i]
end
assert found==4

#
['NOPE',false,/NOPE/,-1,[-1],nil].each do |v|
	assert main.find(__type:v).length==0
	assert main.find(NOPE:v).length==0
	assert main.find('NOPE'=>v).length==0
end

show "All #{File.basename(__FILE__)} assertions successful."

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
RUIC-0.6.1 test/filtering.ruic