Sha256: 8ab6cad3277972aa79d3534ac43a76659fbf294ee4dda58da62705d522e6fad4

Contents?: true

Size: 1.41 KB

Versions: 4

Compression:

Stored size: 1.41 KB

Contents

metadata 'MetaData.xml'

uia 'projects/SimpleScene/SimpleScene.uia'
show app.errors if app.errors?

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

4 entries across 4 versions & 1 rubygems

Version Path
RUIC-0.5.0 test/filtering.ruic
RUIC-0.4.4 test/filtering.ruic
RUIC-0.4.3 test/filtering.ruic
RUIC-0.4.1 test/filtering.ruic