Commit 8a9abb94 authored by Matthias Möller's avatar Matthias Möller

add group test

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@16198 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 882e2b37
# Include Testing package
if(BUILD_TESTING)
include( ${CMAKE_SOURCE_DIR}/tests/testGenerators.cmake )
# ========================================================================
# ========================================================================
# Tests
# ========================================================================
# ========================================================================
run_local_script_test("group.ofs")
endif()
//Group 20 Objects
for (i=0; i < 20;++i)
primitivesgenerator.addSphere()
datacontrol.setAllTarget()
var list = datacontrol.getTargetObjects(DataType("TriangleMesh"));
groupid = datacontrol.groupObjects(list)
if (datacontrol.groupCount() != 1)
{
print("unexpected group count")
print("number of groups: " + datacontrol.groupCount())
print("expected number of groups: 1")
core.exitFailure()
}
datacontrol.clearAllTarget()
//Group Object and Group
id = primitivesgenerator.addSphere()
list = [groupid,id]
datacontrol.groupObjects(list)
if (datacontrol.groupCount() != 2)
{
print("unexpected group count")
print("number of groups: " + datacontrol.groupCount())
print("expected number of groups: 2")
core.exitFailure()
}
datacontrol.clearAllTarget()
//Group multiple Groups
id = primitivesgenerator.addSphere()
id2 = primitivesgenerator.addSphere()
list = [id2,id]
groupid2 = datacontrol.groupObjects(list)
print("unexpected group count")
print("number of groups: " + datacontrol.groupCount())
print("expected number of groups: 2")
core.exitFailure()
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment