예제 #1
0
TEST_F(TestDefaultPipeLine, checkDefaultPipelineWithMonkeyValueForDepth_OpenIssue)
{
    std::vector<std::pair<int, bool>> testvalues = {
        std::make_pair(-1, false),
        std::make_pair( 0, true),
        std::make_pair( 2, true),
        std::make_pair(10, true),
        std::make_pair(1000, true)
    };

    for(auto is : testvalues){
        EXPECT_MSG_NOEMIT(Error) ;

        if(is.second){
            EXPECT_MSG_NOEMIT(Warning) ;

            // Check the returned value.
            if(this->checkDefaultPipelineWithMonkeyValueForDepth(is.first)!=is.first){
                ADD_FAILURE() << "User provided depth parameter value '" << is.first << "' has been un-expectedly overriden." ;
            }
        }else{
            EXPECT_MSG_EMIT(Warning) ;

            // Check the default value.
            if(this->checkDefaultPipelineWithMonkeyValueForDepth(is.first)!=6){
                ADD_FAILURE() << "User provided invalid depth parameter value '" << is.first << "' have not been replaced with the default value = 6." ;
            }
        }
    }
}
예제 #2
0
void TestDefaultPipeLine::checkDefaultPipelineWithNoAttributes()
{
    EXPECT_MSG_NOEMIT(Warning) ;
    EXPECT_MSG_NOEMIT(Error) ;

    std::stringstream scene ;
    scene << "<?xml version='1.0'?>                                                          \n"
             "<Node 	name='Root' gravity='0 -9.81 0' time='0' animate='0' >               \n"
             "  <DefaultPipeline name='pipeline'/>                                           \n"
             "  <DiscreteIntersection name='interaction'/>                                    \n"
             "</Node>                                                                        \n" ;

    Node::SPtr root = SceneLoaderXML::loadFromMemory ("testscene",
                                                      scene.str().c_str(),
                                                      scene.str().size()) ;
    ASSERT_NE(root.get(), nullptr) ;
    root->init(ExecParams::defaultInstance()) ;

    BaseObject* clp = root->getObject("pipeline") ;
    ASSERT_NE(clp, nullptr) ;

    clearSceneGraph();
}
예제 #3
0
//// test number of call to DataEngine::update
TYPED_TEST( DataEngine_test , basic_test )
{
    EXPECT_MSG_NOEMIT(Error) ;
    this->run_basic_test();
}
예제 #4
0
/// third test case: check propagation direction
TEST_F(Engine_test , check_propagation )
{
    EXPECT_MSG_NOEMIT(Error, Warning);
    this->testPropagationDirection();
}
예제 #5
0
/// second test case: Check update method of engine3
TEST_F(Engine_test , check_engine3_update )
{
    EXPECT_MSG_NOEMIT(Error, Warning);
    this->testUpdateEngine3();
}