示例#1
0
int main(int ac, char* av[])
{
   testing::InitGoogleTest(&ac, av);
   return RUN_ALL_TESTS();
}
示例#2
0
int main(int argc, char **argv) {
    google::InitGoogleLogging(argv[0]);
    testing::InitGoogleTest(&argc, argv);

    return RUN_ALL_TESTS();
}
int main(int argc, char** argv) {
  heron::common::Initialize(argv[0]);
  testing::InitGoogleTest(&argc, argv);
  return RUN_ALL_TESTS();
}
示例#4
0
文件: main.cpp 项目: tabchas/ee312
int main(int argc, char *argv[])
{
    ::testing::InitGoogleTest(&argc, argv);

    return RUN_ALL_TESTS() ? TEST_OUTPUT : 0;
}
示例#5
0
int main(int argc, char **argv) {
	testing::InitGoogleTest(&argc, argv);
	int res = RUN_ALL_TESTS();
	//getchar();
	return res;
}
示例#6
0
int main(int argc, char **argv) {

//    feenableexcept(FE_DIVBYZERO);
//    feenableexcept(FE_OVERFLOW);
//    feenableexcept(FE_INVALID);
//
//    signal(SIGSEGV, bt_sighandler);
//    signal(SIGFPE, bt_sighandler);
//    signal(SIGTERM, bt_sighandler);
//    signal(SIGINT, bt_sighandler);
//    signal(SIGABRT, bt_sighandler);


#ifdef HAVE_MPI
    MPI_Init(&argc, &argv);
    int num_procs;
    sip::SIPMPIUtils::check_err(MPI_Comm_size(MPI_COMM_WORLD, &num_procs));

    if (num_procs < 2) {
        std::cerr << "Please run this test with at least 2 mpi ranks"
                  << std::endl;
        return -1;
    }
    sip::SIPMPIUtils::set_error_handler();
    sip::SIPMPIAttr &sip_mpi_attr = sip::SIPMPIAttr::get_instance();
    attr = &sip_mpi_attr;
#endif

#ifdef HAVE_TAU
    TAU_PROFILE_SET_NODE(0);
    TAU_STATIC_PHASE_START("SIP Main");
#endif

//	sip::check(sizeof(int) >= 4, "Size of integer should be 4 bytes or more");
//	sip::check(sizeof(double) >= 8, "Size of double should be 8 bytes or more");
//	sip::check(sizeof(long long) >= 8, "Size of long long should be 8 bytes or more");
//
//	int num_procs;
//	sip::SIPMPIUtils::check_err(MPI_Comm_size(MPI_COMM_WORLD, &num_procs));
//
//	if (num_procs < 2){
//		std::cerr<<"Please run this test with at least 2 mpi ranks"<<std::endl;
//		return -1;
//	}
//
//	sip::SIPMPIUtils::set_error_handler();
//	sip::SIPMPIAttr &sip_mpi_attr = sip::SIPMPIAttr::get_instance();
//

    printf("Running main() from test_simple.cpp\n");
    testing::InitGoogleTest(&argc, argv);
    int result = RUN_ALL_TESTS();

#ifdef HAVE_TAU
    TAU_STATIC_PHASE_STOP("SIP Main");
#endif
#ifdef HAVE_MPI
    MPI_Finalize();
#endif
    return result;

}
int main(int argc, char **argv) {
    ::testing::InitGoogleTest(&argc, argv);
    test_env = new btree_test_env();
    ::testing::AddGlobalTestEnvironment(test_env);
    return RUN_ALL_TESTS();
}
int main(int argc, char** argv)
{
  testing::InitGoogleTest(&argc, argv);
  ros::init(argc, argv, "TestNode");
  return RUN_ALL_TESTS();
}
int main(int argc, char **argv){
  testing::InitGoogleTest(&argc, argv);
  ros::init (argc, argv, "move_arm_regression_test");
  return RUN_ALL_TESTS();
}
int main(int argc, char **argv){
  // Run all the tests that were declared with TEST()
  testing::InitGoogleTest(&argc, argv);
  return RUN_ALL_TESTS();
}
示例#11
0
文件: main.cpp 项目: tanab/atm
int main(int argc, char *argv[]) {
  testing::InitGoogleMock(&argc, argv);

  return RUN_ALL_TESTS();
}
示例#12
0
文件: main.cpp 项目: reuk/wayverb
int main(int argc, char** argv) {
    ::testing::InitGoogleTest(&argc, argv);
    //::testing::GTEST_FLAG(filter) = "*equal_energy*";
    return RUN_ALL_TESTS();
}
示例#13
0
文件: main.cpp 项目: 191919/hhvm
int main(int argc, char** argv) {
  testing::InitGoogleTest(&argc, argv);
  HPHP::init_for_unit_test();
  return RUN_ALL_TESTS();
}
示例#14
0
int main(int argc, char **argv) {
    std::cout << "Running ffmpegthumbnailer tests" << std::endl;

    testing::InitGoogleTest(&argc, argv);
    return RUN_ALL_TESTS();
}
示例#15
0
int main(int argc, char **argv) {
  printf("Running main() from sample1\n");
  testing::InitGoogleTest(&argc, argv);
  return RUN_ALL_TESTS();
}
int main(int argc, char** argv) {
	::testing::GTEST_FLAG(output) = "xml:\\reports\\gtest_reports.xml";
	::testing::InitGoogleMock(&argc, argv);
	return RUN_ALL_TESTS();
}
示例#17
0
int main(int argc, char *argv[]) {
    std::string server_name = argv[0];
    g_server_name = server_name.substr(server_name.rfind('/') + 1);
    testing::InitGoogleTest(&argc, argv);
    return RUN_ALL_TESTS();
}
示例#18
0
int main(int argc, char** argv) {
  ::testing::InitGoogleTest(&argc, argv);
  assert(argc == 2);
  file_name = argv[1];
  return RUN_ALL_TESTS();
}
示例#19
0
int main(int argc, char** argv)
{
	testing::InitGoogleTest(&argc, argv);
	RUN_ALL_TESTS();
	std::getchar(); // keep console window open until Return keystroke
}
int main(int argc, char* argv[]) {
    testing::InitGoogleTest(&argc, argv);
    GFLAGS_NS::ParseCommandLineFlags(&argc, &argv, true);
    return RUN_ALL_TESTS();
}
示例#21
0
int main( int argc, char **argv )
{
	WOLFRAME_GTEST_REPORT( argv[0], refpath.string());
	::testing::InitGoogleTest( &argc, argv );
	return RUN_ALL_TESTS( );
}
示例#22
0
文件: main.cpp 项目: rwy0717/omr
extern "C" int
testMain(int argc, char** argv, char** envp)
{
	::testing::InitGoogleTest(&argc, argv);
	return RUN_ALL_TESTS();
}
示例#23
0
int main(int argc, char** argv)
{
    ::testing::InitGoogleTest(&argc, argv);
    gflags::ParseCommandLineFlags(&argc, &argv, true);
    return RUN_ALL_TESTS();
}
示例#24
0
int main (int argc, char* argv[])
{

    using CLSE = ClSparseEnvironment;
    using CSRE = CSREnvironment;

    std::string path;


    std::string strPrecond;
    std::string strPrintMode;



    std::string platform;
    cl_platform_type pID;
    cl_uint dID;

    po::options_description desc("Allowed options");

    desc.add_options()
            ("help,h", "Produce this message.")
            ("path,p", po::value(&path)->required(), "Path to matrix in mtx format.")
            ("platform,l", po::value(&platform)->default_value("AMD"),
             "OpenCL platform: AMD or NVIDIA.")
            ("device,d", po::value(&dID)->default_value(0),
             "Device id within platform.")
            ("relative,r", po::value(&relativeTolerance)->default_value(1e-2),
             "Final residuum value relative to initial (r = b - A*x)")
            ("absolute,a", po::value(&absoluteTolerance)->default_value(1e-5),
             "Absolute level of residuum value")
            ("iterations,i", po::value(&maxIterations)->default_value(100),
             "Maximum number of solver iterations")
            ("precond,c", po::value(&strPrecond)->default_value("Diagonal"),
             "Type of preconditioner, Diagonal or Void")
            ("mode,m", po::value(&strPrintMode)->default_value("Normal"),
             "Solver Print mode, Verbose, Normal, Quiet")
            ("initx,x", po::value(&initialUnknownsValue)->default_value(0),
             "Initial value for vector of unknowns")
            ("initb,b", po::value(&initialRhsValue)->default_value(1),
             "Initial value for rhs vector");


    po::variables_map vm;
    po::parsed_options parsed =
            po::command_line_parser( argc, argv ).options( desc ).allow_unregistered( ).run( );

    try {
        po::store(parsed, vm);
        po::notify(vm);
    }
    catch (po::error& error)
    {
        std::cerr << "Parsing command line options..." << std::endl;
        std::cerr << "Error: " << error.what() << std::endl;
        std::cerr << desc << std::endl;
        return false;
    }

    std::vector< std::string > to_pass_further =
            po::collect_unrecognized( parsed.options, po::include_positional );

    //check platform
    if(vm.count("platform"))
    {
        if ("AMD" == platform)
        {
            pID = AMD;
        }
        else if ("NVIDIA" == platform)
        {
            pID = NVIDIA;
        }
        else
        {

            std::cout << "The platform option is missing or is ill defined!\n";
            std::cout << "Given [" << platform << "]" << std::endl;
            platform = "AMD";
            pID = AMD;
            std::cout << "Setting [" << platform << "] as default" << std::endl;
        }

    }

    //pickup preconditioner
    if ( boost::iequals(strPrecond, "Diagonal"))
    {
        precond = DIAGONAL;
    }
    else if (boost::iequals(strPrecond, "Void"))
    {
        precond = NOPRECOND;
    }

    else
    {
        std::cerr << "Invalid preconditioner [" << strPrecond << "] "
                  << "using Diagonal instead" << std::endl;
        precond = DIAGONAL;
    }

    //pickup solver print mode;
    if ( boost::iequals(strPrintMode, "Normal"))
    {
        printMode = NORMAL;
    }
    else if (boost::iequals(strPrintMode, "Quiet"))
    {
        printMode = QUIET;
    }
    else if (boost::iequals(strPrintMode, "Verbose"))
    {
        printMode = VERBOSE;
    }
    else
    {
        std::cerr << "Invalid print mode given [" << strPrintMode << "]"
                  << " using Quiet instead" << std::endl;
        printMode = QUIET;
    }


    ::testing::InitGoogleTest(&argc, argv);
    //order does matter!
    ::testing::AddGlobalTestEnvironment( new CLSE(pID, dID));
    ::testing::AddGlobalTestEnvironment( new CSRE(path, 0, 0,
                                                  CLSE::queue, CLSE::context));

    return RUN_ALL_TESTS();

}
示例#25
0
int main(int argc, char **argv) {
  ::testing::InitGoogleTest(&argc, argv);
  ::testing::AddGlobalTestEnvironment(new kzh::unit_test_env(argc, argv));
  return RUN_ALL_TESTS();  
}
int main(int ac, char** av)
{
      return RUN_ALL_TESTS(ac, av);
}
示例#27
0
int main(int argc, const char** argv)
{
    return RUN_ALL_TESTS(argc, argv);
}
示例#28
0
int main(int argc, char *argv[])
{
    ::testing::InitGoogleTest(&argc,argv);
    int ret = RUN_ALL_TESTS();
    return ret;
}
示例#29
0
int main(int argc, char **argv)
{
	::testing::InitGoogleTest(&argc, argv);
	return RUN_ALL_TESTS();
}
示例#30
0
int main(int argc, char* argv[]) {
  ::testing::InitGoogleTest(&argc, argv);
  log_level = INFO;

  const char* usage =
    "\n--duration=(10,3600]\n"
    "[--n_worker=[1,16]]\n"
    "[--start_period=[1000000,1000000000]] [--dec_ppm=[0,1000]]\n"
    "[--outfile=<CSV file to record the result>]\n"
    "[--verbosity=[0,2]]\n"
    "Example: --duration=600 --start_period=100000000 --dec_ppm=200 --outfile=1.csv\n";
  static struct option long_options[] = {
    /* explanation of struct option {
       const char *name;
       int has_arg;
       int *flag; NULL: getopt_long returns val
                  else: returns 0, and flag points to a variable that is set to val
		  if option is found, but otherwise left unchanged if option not found
       int val;
       }; */
    {"duration", required_argument, NULL, 'd'},
    {"n_worker", required_argument, NULL, 'w'},
    {"start_period", required_argument, NULL, 's'},
    {"dec_ppm", required_argument, NULL, 'p'},
    {"outfile", required_argument, NULL, 'f'},
    {"verbosity", optional_argument, NULL, 'v'},
    {NULL, no_argument, NULL, 0} /* brackets the end of the options */
  };
  int option_index = 0, c;

  while((c = getopt_long_only(argc, argv, ""/* Not intuitive: cannot be NULL */
			      , long_options, &option_index))
	!= -1) {
    /* Remember there are these external variables:
     * extern char *optarg;
     * extern int optind, opterr, optopt;
     */
    //int this_option_optind = optind ? optind : 1;
    switch (c) {
    case 'v': /* optarg is NULL if I don't specify an arg */
      g_verbosity = optarg ? atoi(optarg) : 1;
      log_info("verbosity: %d", g_verbosity);
      break;
    case 'd':
      duration = atoi(optarg);
      log_info("duration: %d s", duration);
      break;
    case 'w':
      n_worker = atoi(optarg);
      log_info("worker: %d", n_worker);
      break;
    case 's':
      start_period = atoi(optarg);
      log_info("start_period: %d ns", start_period);
      break;
    case 'p':
      dec_ppm = atoi(optarg);
      log_info("dec_ppm: 0.%04d %%", dec_ppm);
      break;
    case 'f':
      g_outfn = optarg;
      log_info("outfile: %s", g_outfn);
      break;
    case 0: {
      char line[160];
      sprintf(line, "option %s", long_options[option_index].name);
      if(optarg) sprintf(line, " with arg %s", optarg);
      log_info(line);
    }
      break;
    case '?':/* ambiguous match or extraneous param */
    default:
      log_error("?? getopt returned character code 0%o ??", c);
      break;
    }
  }
  if (optind < argc) {
    char line[160];
    sprintf(line, "non-option ARGV-elements: ");
    while (optind < argc) sprintf(line, "%s ", argv[optind++]);
    log_warn(line);
  }
  /*
  else {
    fprintf(stderr, "Expected argument after options\n");
    return optind;
  }
  */

  /*
     If there are no more option characters, getopt() returns -1. Then optind is
     the index in argv of the first argv-element that is not an option. 
  */

  if(duration < 10 || duration > 3600
     || n_worker < 1 || n_worker > 16
     || start_period < 1000000 || start_period > 1000000000
     || dec_ppm < 0 || dec_ppm > 1000) {
    log_fatal("Invalid argument.  Usage:\n%s", usage);
    return -1;
  }

  return RUN_ALL_TESTS();
}