Ejemplo n.º 1
0
	void stacktest()
	{
		testcase1();
		testcase2();
		testcase3();
		testcase4();
		std::cout << "Stack test success!" <<std::endl;
	}
Ejemplo n.º 2
0
	void listtest()
	{
		testcase1();
		testcase2();
		testcase3();
		testcase4();
		testcase5();
		std::cout << "List test success!"<<std::endl;
	}
Ejemplo n.º 3
0
int main(int argc, char * const argv[])
{
	parseopts(argc, argv);
	printdesc("Regression testsuite palette handling\n\n");

	testcase1("Draw green box");

	printsummary();

	return 0;
}
Ejemplo n.º 4
0
int main() 
{
	testcase0();
	testcase1();
	testcase2();
	testcase3();
	testcase4();
	testcase5();

	return 0;
}
Ejemplo n.º 5
0
int main(int argc, char * const argv[])
{
	parseopts(argc, argv);

	printdesc("Regression testsuite for ggLock(3) & friends.\n\n");

	testcase1("Checks behaviour of locking functions, whether they match documentation.");

	printsummary();

	return 0;
}
Ejemplo n.º 6
0
int main(int argc, char * const argv[])
{
	parseopts(argc, argv);

	printdesc("Regression testsuite for libgg init/exit handling\n\n");

	testcase1("Check that ggInit() behaves as documented.");
	testcase2("Check that ggExit() behaves as documented.");


	printsummary();

	return 0;
}
Ejemplo n.º 7
0
int main(int argc, char * const argv[])
{
	int rc;

	parseopts(argc, argv);
	printdesc("Regression testsuite for display-x(7).\n\n");

	rc = ggiInit();
	if (rc < 0) ggPanic("Couldn't initialize libggi");

	testcase1("See, if mansync actually runs in SYNC mode - sets up the mode the same way as XGGI does");

	printsummary();

	return 0;
}
Ejemplo n.º 8
0
int main(int argc, char * const argv[])
{
	parseopts(argc, argv);
	printdesc("Regression testsuite mode handling\n\n");

	testcase1("Check that ggiCheckMode() doesn't return GGI_AUTO");
	testcase2("Check that ggiSetMode() can actually set the mode that has been suggested by ggiCheckMode");
	testcase3("Check setting a mode with a given number of frames");
	testcase4("Check setting a mode by its physical size");
	testcase5("Set up the mode in the ggiterm way");
	testcase6("Check that re-setting of a different mode works [async mode]");
	testcase7("Check that re-setting of a different mode works [sync mode]");
	testcase8("Check checking then setting a mode with braindamaged visual size");
	testcase9("Check modelist");

	printsummary();

	return 0;
}
Ejemplo n.º 9
0
int main(int argc, char *argv[])
{
	parseopts(argc, argv);

	printdesc("Regression testsuite for libgg's internal ggParseTarget() function.\n\n");

	testcase1("Passes a string with whitespaces only. Expected to return \\0.");
	testcase2("Passes a string with an too short target buffer. "
		"This expects to fill up the buffer as much as possible, "
		"but not completely - buffer overflow protection.");
	testcase3("Passes a string with valid arguments.");
	testcase4("Passes a string with syntax error: "
		"A closing bracket doesn\'t match an opening bracket.");
	testcase5("Passes a string with syntax error: "
		"Number of opening and closing brackets matches, but wrong ordered.");

	printsummary();

	return 0;
}
Ejemplo n.º 10
0
int main()
{
	//
    // Set the run time parameters.
	//

	// need to adjust this db connection parameter accordingly
    TA_Base_Core::RunParams::getInstance().set( RPARAM_DBCONNECTION, "TRA_DEV2:unittest:unittest" );

	// need to adjust this notify hosts parameter accordingly
	TA_Base_Core::RunParams::getInstance().set( RPARAM_NOTIFYHOSTS, "10.205.81.35:6668,10.205.81.35" );	

	// all these parameters can be set via the "dummy system controller" process
    //TA_Base_Core::RunParams::getInstance().set( RPARAM_LOCATIONKEY, "1" );
    //TA_Base_Core::RunParams::getInstance().set( RPARAM_MGRPORT, "9999" );
	//TA_Base_Core::RunParams::getInstance().set( RPARAM_MGRPORT, "6668" );
    //TA_Base_Core::RunParams::getInstance().set( RPARAM_OPERATIONMODE, "Control" );

    TA_Base_Core::DebugUtil::getInstance().setFile( "DataPointBulkInterfaceTest.log" );
    TA_Base_Core::RunParams::getInstance().set( "DebugAlwaysTrueRightsLib", "true" );

    // create test runner
    TestRunner runner;

	// create stubs
    DbManager * db = 0;;
    DataPointAgent * dataPointAgent = 0;
	DataPointAgentClient * dataPointAgentClient = 0;

    try
    {
        // Prepare the database.
		db = new DbManager();
		db->removeEntities();
        db->addEntities();

        // create the agent that loads the DataPoints.
		TA_Base_Core::RunParams::getInstance().set( RPARAM_ENTITYNAME, db->AgentName.c_str() );
        dataPointAgent = new DataPointAgent ( db->AgentName );
        dataPointAgent->startAgent();

		// create DataPointAgentClient
		dataPointAgentClient = new DataPointAgentClient ( db->AgentName );

        // Test all public DataPoint members using a BooleanData point.
        DataPointBulkInterfaceTest testcase1 ( "DataPointBulkInterfaceTest", db, dataPointAgent, dataPointAgentClient );
        runner.addSuite( testcase1.suite() );

        // Run the tests defined in the config file
        runner.begin( "./cfg/config.ini" );
    }
    catch ( TA_Base_Core::TransactiveException& ex )
    {
        std::cout << "TransactiveException: " << ex.what() << std::endl;
    }
    catch ( ... )
    {
		std::cout << "Caught an unknown exception" << std::endl;
	}

    // Terminate the agent
	if ( 0 != dataPointAgent )
	{
		dataPointAgent->terminateAndWait();

		dataPointAgent->deactivateAndDeleteServant();
		dataPointAgent = 0;
	}

	// Clean up the agent client
	if ( 0 != dataPointAgentClient )
	{
		delete dataPointAgentClient;
		dataPointAgentClient = 0;
	}

    // Clean up the database.
	if ( 0 != db )
	{
		db->removeEntities();
		delete db;
		db = 0;
	}

    return 0;
}
Ejemplo n.º 11
0
Archivo: test_ir.c Proyecto: liva/nci
void test_ir() {
  testcase1();
  /*  testcase2();
  testcase3();
  testcase4();*/
}