int main(int, char*[])
{
    init();
    logging::add_common_attributes();

    logger_type lg;
    test_logging(lg, "general");
    test_logging(lg, "network");
    test_logging(lg, "gui");
    test_logging(lg, "filesystem");

    return 0;
}
BackgroundPlugin::BackgroundPlugin(NPP inst) : SurfaceSubPlugin(inst) {

    // initialize the drawing surface
    m_surface = NULL;

    //initialize bitmap transparency variables
    mFinishedStageOne   = false;
    mFinishedStageTwo   = false;
    mFinishedStageThree = false;

    // test basic plugin functionality
    test_logging(); // android logging
    test_timers();  // plugin timers
    test_bitmaps(); // android bitmaps
    test_domAccess();
    test_javascript();
    test_loadJavaClass();

    //register for touch events
    ANPEventFlags flags = kTouch_ANPEventFlag;
    NPError err = browser->setvalue(inst, kAcceptEvents_ANPSetValue, &flags);
    if (err != NPERR_NO_ERROR) {
        gLogI.log(kError_ANPLogType, "Error selecting input events.");
    }
}
Exemple #3
0
int main(int argc, char** argv )
{
    //TEST STATISTIC
    printf("----------------------------\n");
    printf("\t test statistic\n");
    printf("----------------------------\n");
    test_statistic();

    //TEST ALGORITHM
    printf("----------------------------\n");
    printf("\t test algorithm\n");
    printf("----------------------------\n");
    test_algorithm();

    //TEST UTILITY
    printf("----------------------------\n");
    printf("\t test utility\n");
    printf("----------------------------\n");
    test_utility();

    //TEST LOGGING
    printf("----------------------------\n");
    printf("\t test logging\n");
    printf("----------------------------\n");
    int priority = 10;    
    if(argc > 1)
    {
        if( strcmp( argv[1], "log_level_trace") == 0)
        {
            priority = 1;
        }
        else if(strcmp ( argv[1], "log_level_debug") == 0)
        {
            priority = 2;
        }
        else if( strcmp(argv[1], "log_level_info") == 0)
        {
            priority = 3;
        }
        else if (strcmp(argv[1], "log_level_warning") == 0)
        {
            priority = 5;
        }
        else if ( strcmp (argv[1], "log_level_error") ==0 )
        {
            priority = 6;
        }
    }

    test_logging(priority);


}
int main(int argc, char *argv[])
{
  // initalize
  logger::initLogging();

  // set __LINE__ and __FUNCTION__
  BOOST_LOG_FUNCTION();
  
  BOOST_LOG_SEV(app_logger::get(), logger::WARNING) << "hello warn";

  test_logging();
  test_logging2();

  BOOST_LOG_SEV(app_logger::get(), logger::DEBUG) << "hello debug";

  return 0;
}