int main ( )

/****************************************************************************/
/*
  Purpose:

    MAIN is the main program for CHEBYSHEV_POLYNOMIAL_PRB.

  Discussion:

    CHEBYSHEV_POLYNOMIAL_PRB tests the CHEBYSHEV_POLYNOMIAL library.

  Licensing:

    This code is distributed under the GNU LGPL license.

  Modified:

    09 August 2013

  Author:

    John Burkardt
*/
{
  timestamp ( );
  printf ( "\n" );
  printf ( "CHEBYSHEV_POLYNOMIAL_PRB\n" );
  printf ( "  C version\n" );
  printf ( "  Test the CHEBYSHEV_POLYNOMIAL library.\n" );

  test01 ( );
  test02 ( );
  test03 ( );
  test04 ( );
  test05 ( );
  test06 ( );
  test07 ( );
  test08 ( );
  test09 ( );

  test10 ( );
  test11 ( );
  test12 ( );
  test13 ( );
  test14 ( );
  test15 ( );
  test16 ( );
  test17 ( );
/*
  Terminate.
*/
  printf ( "\n" );
  printf ( "CHEBYSHEV_POLYNOMIAL_PRB\n" );
  printf ( "  Normal end of execution.\n" );
  printf ( "\n" );
  timestamp ( );

  return 0;
}
Ejemplo n.º 2
0
  void main()
  {
    test_shared_ptr();
    test01();
    test02();
    test03();
    test04();
    
    #ifdef NTL_CXX_RV
    test05();
    #endif
    test06();
    test07();
    test08();
    test09();
    test10();
    test11();
    test12();
    test14();
    test15();
    test16();
    test17();
    test18();
    test19();
    test20();
    test21();
    test22();
    test23();
    test24();
    test25();
#ifdef _CPPUNWIND
    test26();
#endif
    // TODO: "libstdc++-v3\testsuite\20_util\shared_ptr\creation" и далее
  }
Ejemplo n.º 3
0
int main(int argc,char **argv)
{
   // Create a test molecule
   OpenBabel::OBMol mol;
   OpenBabel::OBAtom* a[5];
   a[0] = mol.NewAtom(); a[0]->SetAtomicNum(6);  a[0]->SetVector(-0.013,  1.086,  0.008);
   a[1] = mol.NewAtom(); a[1]->SetAtomicNum(1);  a[1]->SetVector( 0.002, -0.004,  0.002);
   a[2] = mol.NewAtom(); a[2]->SetAtomicNum(9);  a[2]->SetVector( 1.300,  1.570, -0.002);
   a[3] = mol.NewAtom(); a[3]->SetAtomicNum(35); a[3]->SetVector(-0.964,  1.737, -1.585);
   a[4] = mol.NewAtom(); a[4]->SetAtomicNum(17); a[4]->SetVector(-0.857,  1.667,  1.491);
   OpenBabel::OBBond* b;
   for (int i(1); i < 5; ++i)
   {
      b = mol.NewBond();
      b->SetBegin(a[0]); b->SetEnd(a[i]); b->SetBondOrder(1);
   }
   
   // Run the tests
   test01(&mol);
   test02(&mol);
   test03(&mol);
   test04(&mol);
   test05(&mol);
   test06(&mol);
   test07(&mol);
   test08(&mol);
   test09(&mol);
   
   // End
   return 0;
}
Ejemplo n.º 4
0
void _test (CIMClient & client)
{
  try
  {
    test01 (client);
    test02 (client);
    test03 (client);
    test04 (client);
    test05 (client);
    test06 (client);
    test07 (client);
    test08 (client);
    test10 (client);
    test11 (client);
    test12 (client);
    test13 (client);
    // Don't run against the remote-namespace, not yet suppoted. 
    if (providerNamespace == "test/TestProvider")
    {
        test09 (client); // Embedded Instance Test
        test14(client); // Embedded Instance Array Test
    }
  }
  catch (Exception & e)
  {
    cerr << "test failed: " << e.getMessage () << endl;
    exit (-1);
  }
}
int main ( )

/******************************************************************************/
/*
  Purpose:

    MAIN is the main program for FEM1D_BVP_LINEAR_PRB.

  Location:

    http://people.sc.fsu.edu/~jburkardt/c_src/fem1d_bvp_linear/fem1d_bvp_linear_prb.c

  Discussion:

    FEM1D_BVP_LINEAR_PRB tests the FEM1D_BVP_LINEAR library.

  Licensing:

    This code is distributed under the GNU LGPL license.

  Modified:

    16 June 2014

  Author:

    John Burkardt
*/
{
  timestamp ( );
  printf ( "\n" );
  printf ( "FEM1D_BVP_LINEAR_PRB\n" );
  printf ( "  C version\n" );
  printf ( "  Test the FEM1D_BVP_LINEAR library.\n" );

  test01 ( );
  test02 ( );
  test03 ( );
  test04 ( );
  test05 ( );
  test06 ( );
  test07 ( );
  test08 ( );
  test09 ( );
/*
  Terminate.
*/
  printf ( "\n" );
  printf ( "FEM1D_BVP_LINEAR_PRB\n" );
  printf ( "  Normal end of execution.\n" );
  printf ( "\n" );
  timestamp ( );

  return 0;
}
Ejemplo n.º 6
0
int spectrophoretest(int argc, char* argv[])
{
  int defaultchoice = 1;
  
  int choice = defaultchoice;

  if (argc > 1) {
    if(sscanf(argv[1], "%d", &choice) != 1) {
      printf("Couldn't parse that input as a number\n");
      return -1;
    }
  }

   // Create a test molecule
   OpenBabel::OBMol mol;
   OpenBabel::OBAtom* a[5];
   a[0] = mol.NewAtom(); a[0]->SetAtomicNum(6);  a[0]->SetVector(-0.013,  1.086,  0.008);
   a[1] = mol.NewAtom(); a[1]->SetAtomicNum(1);  a[1]->SetVector( 0.002, -0.004,  0.002);
   a[2] = mol.NewAtom(); a[2]->SetAtomicNum(9);  a[2]->SetVector( 1.300,  1.570, -0.002);
   a[3] = mol.NewAtom(); a[3]->SetAtomicNum(35); a[3]->SetVector(-0.964,  1.737, -1.585);
   a[4] = mol.NewAtom(); a[4]->SetAtomicNum(17); a[4]->SetVector(-0.857,  1.667,  1.491);
   OpenBabel::OBBond* b;
   for (int i(1); i < 5; ++i)
   {
      b = mol.NewBond();
      b->SetBegin(a[0]); b->SetEnd(a[i]); b->SetBondOrder(1);
   }
   
  switch(choice) {
  case 1:
    test01(&mol);
    test02(&mol);
    break;
  case 2:
    test03(&mol);
    test04(&mol);
    break;
  case 3:
    test05(&mol);
    test06(&mol);
    break;
  case 4:
    test07(&mol);
    test08(&mol);
    break;
  case 5:
    test09(&mol);
    break;
  default:
    std::cout << "Test number " << choice << " does not exist!\n";
    return -1;
  }

  return 0;
}
Ejemplo n.º 7
0
int main ( )

/******************************************************************************/
/*
  Purpose:

    MAIN is the main program for WAVELET_PRB.

  Discussion:

    WAVELET_PRB tests the WAVELET library.

  Licensing:

    This code is distributed under the GNU LGPL license. 

  Modified:

    09 May 2012

  Author:

    John Burkardt
*/
{
  timestamp ( );
  printf ( "\n" );
  printf ( "WAVELET_PRB\n" );
  printf ( "  C version\n" );
  printf ( "  Test the WAVELET library.\n" );

  test01 ( );
  test02 ( );
  test03 ( );
  test04 ( );
  test05 ( );
  test06 ( );
  test07 ( );
  test08 ( );
  test09 ( );

  test10 ( );
/*
  Terminate.
*/
  printf ( "\n" );
  printf ( "WAVELET_PRB\n" );
  printf ( "  Normal end of execution.\n" );
  printf ( "\n" );
  timestamp ( );

  return 0;
}
Ejemplo n.º 8
0
int main ( void )

/******************************************************************************/
/*
  Purpose:

    MAIN is the main program for RAND48_PRB.

  Discussion:

    RAND48_PRB calls sample problems for the RAND48 routines.

  Licensing:

    This code is distributed under the GNU LGPL license. 

  Modified:

    18 August 2008

  Author:

    John Burkardt
*/
{
  timestamp ( );

  printf ( "\n" );
  printf ( "RAND48_PRB\n" );
  printf ( "  C version:\n" );
  printf ( "  Test the RAND48 library.\n" );

  test01 ( );
  test02 ( );
  test03 ( );
  test04 ( );
  test05 ( );
  test06 ( );
  test07 ( );
  test08 ( );
  test09 ( );
/*
  Terminate.
*/
  printf ( "\n" );
  printf ( "RAND48_PRB\n" );
  printf ( "  Normal end of execution.\n" );

  printf ( "\n" );
  timestamp ( );

  return 0;
}
Ejemplo n.º 9
0
int main ( void )

/******************************************************************************/
/*
  Purpose:

    MAIN is the main program for SUPER_BLAS1_S_PRB.

  Discussion:

    SUPER_BLAS1_S_PRB tests the BLAS1 single precision real routines.

  Modified:

    29 March 2007

  Author:

    John Burkardt
*/
{
  timestamp ( );

  printf ( "\n" );
  printf ( "SUPER_BLAS1_S_PRB:\n" );
  printf ( "  C version\n" );
  printf ( "  Single precision real arithmetic.\n" );
  printf ( "  Test routines in the SUPER_BLAS library,\n" );
  printf ( "  the Level 1 Basic Linear Algebra Subprograms.\n" );
 
  test01 ( );
  test02 ( );
  test03 ( );
  test04 ( );
  test05 ( );
  test06 ( );
  test07 ( );
  test08 ( );
  test09 ( );

  test11 ( );

  printf ( "\n" );
  printf ( "SUPER_BLAS1_S_PRB:\n" );
  printf ( "  Normal end of execution.\n" );

  printf ( "\n" );
  timestamp ( );

  return 0;
}
Ejemplo n.º 10
0
int main ( void )

/******************************************************************************/
/*
  Purpose:

    MAIN is the main program for SUPER_BLAS1_S_PRB.

  Discussion:

    SUPER_BLAS1_S_PRB tests the SUPER_BLAS library.

  Modified:

    29 March 2007

  Author:

    John Burkardt
*/
{
  timestamp ( );
  printf ( "\n" );
  printf ( "SUPER_BLAS1_S_PRB:\n" );
  printf ( "  C version\n" );
  printf ( "  Single precision real arithmetic.\n" );
  printf ( "  Test the SUPER_BLAS library.\n" );
 
  test01 ( );
  test02 ( );
  test03 ( );
  test04 ( );
  test05 ( );
  test06 ( );
  test07 ( );
  test08 ( );
  test09 ( );

  test11 ( );
/*
  Terminate.
*/
  printf ( "\n" );
  printf ( "SUPER_BLAS1_S_PRB:\n" );
  printf ( "  Normal end of execution.\n" );
  printf ( "\n" );
  timestamp ( );

  return 0;
}
Ejemplo n.º 11
0
int main ( )

/******************************************************************************/
/*
  Purpose:

    MAIN is the main program for FEM_BASIS_PRB.

  Discussion:

    FEM_BASIS_PRB tests the FEM_BASIS library.

  Licensing:

    This code is distributed under the GNU LGPL license.

  Modified:

    26 June 2013

  Author:

    John Burkardt
*/
{
  timestamp ( );
  printf ( "\n" );
  printf ( "FEM_BASIS_PRB:\n" );
  printf ( "  C version.\n" );
  printf ( "  Test the FEM_BASIS library.\n" );

  test01 ( );
  test02 ( );
  test03 ( );
  test04 ( );
  test05 ( );
  test06 ( );
  test07 ( );
  test08 ( );
/*
  Terminate.
*/
  printf ( "\n" );
  printf ( "FEM_BASIS_PRB:\n" );
  printf ( "  Normal end of execution.\n" );
  printf ( "\n" );
  timestamp ( );

  return 0;
}
Ejemplo n.º 12
0
void parse_cmd(String str)
{
  if(str == "help") {printHelp();}
  else if(str == "t1") {test01(RUNTEST);}
  else if(str == "t2") {test02(RUNTEST);}
  else if(str == "t3") {test03(RUNTEST);}
  else if(str == "t4") {test04(RUNTEST);}
  else if(str == "t5") {test05(RUNTEST);}
  else if(str == "t6") {test06(RUNTEST);}
  else if(str == "t7") {test07(RUNTEST);}
  else if(str == "t8") {test08(RUNTEST);}
  else if(str == "t9") {test09(RUNTEST);}
  else if(str == "ta") {test10(RUNTEST);}
  else if(str == "tb") {test11(RUNTEST);}
  else if(str == "tc") {test12(RUNTEST);}
  else if(str == "td") {test13(RUNTEST);}
  else if(str == "te") {test14(RUNTEST);}
  else if(str == "tf") {test15(RUNTEST);}

  else if(str == "d1") {test01(DESCRIPTION);}
  else if(str == "d2") {test02(DESCRIPTION);}
  else if(str == "d3") {test03(DESCRIPTION);}
  else if(str == "d4") {test04(DESCRIPTION);}
  else if(str == "d5") {test05(DESCRIPTION);}
  else if(str == "d6") {test06(DESCRIPTION);}
  else if(str == "d7") {test07(DESCRIPTION);}
  else if(str == "d8") {test08(DESCRIPTION);}
  else if(str == "d9") {test09(DESCRIPTION);}
  else if(str == "da") {test10(DESCRIPTION);}
  else if(str == "db") {test11(DESCRIPTION);}
  else if(str == "dc") {test12(DESCRIPTION);}
  else if(str == "dd") {test13(DESCRIPTION);}
  else if(str == "de") {test14(DESCRIPTION);}
  else if(str == "df") {test15(DESCRIPTION);}

  else {Serial.print("\n\rBad Command: "); Serial.println(str);}
}
Ejemplo n.º 13
0
int main ( )

/******************************************************************************/
/*
  Purpose:

    GEOMPACK_PRB tests routines from the GEOMPACK library.

  Licensing:

    This code is distributed under the GNU LGPL license.

  Modified:

    23 October 2012

  Author:

    John Burkardt
*/
{
  timestamp ( );

  printf ( "\n" );
  printf ( "GEOMPACK_PRB\n" );
  printf ( "  C version\n" );
  printf ( "  Test the GEOMPACK library.\n" );

  test005 ( );
  test01 ( );
  test02 ( );
  test03 ( );
  test05 ( );
  test06 ( );
  test07 ( );
  test08 ( );
/*
  Terminate.
*/
  printf ( "\n" );
  printf ( "GEOMPACK_PRB\n" );
  printf ( "  Normal end of execution.\n" );

  printf ( "\n" );
  timestamp ( );

  return 0;
}
Ejemplo n.º 14
0
int main(void)
{
   test01();
   test02();
   test03();
   test04();
   test05();
   test06();
   test07();
   test08();
   test09();
   test10();
   test11();
   test12();
   test13();
   test14();
   test15();
   test16();
   test17();
   return 0;
}
Ejemplo n.º 15
0
void printHelp(void)
{
  Serial.println("Tests:");
   Serial.print("  "); test01(TESTHELP); Serial.println();
   Serial.print("  "); test02(TESTHELP); Serial.println();
   Serial.print("  "); test03(TESTHELP); Serial.println();
   Serial.print("  "); test04(TESTHELP); Serial.println();
   Serial.print("  "); test05(TESTHELP); Serial.println();
   Serial.print("  "); test06(TESTHELP); Serial.println();
   Serial.print("  "); test07(TESTHELP); Serial.println();
   Serial.print("  "); test08(TESTHELP); Serial.println();
   Serial.print("  "); test09(TESTHELP); Serial.println();
   Serial.print("  "); test10(TESTHELP); Serial.println();
   Serial.print("  "); test11(TESTHELP); Serial.println();
   Serial.print("  "); test12(TESTHELP); Serial.println();
   Serial.print("  "); test13(TESTHELP); Serial.println();
   Serial.print("  "); test14(TESTHELP); Serial.println();
   Serial.print("  "); test15(TESTHELP); Serial.println();
   Serial.print("  "); test16(TESTHELP); Serial.println();
   Serial.println();
}
Ejemplo n.º 16
0
int main(int, char** argv)
{
    verbose = getenv("PEGASUS_TEST_VERBOSE") ? true : false;

    try
    {
        test01();
        test02();
        test03();
        test04();
        test05();
        test06();
        test07();
        test08();

        cout << argv[0] << " +++++ passed all tests" << endl;
    }
    catch (Exception& e)
    {
        cerr << argv[0] << " Exception " << e.getMessage() << endl;
        exit(1);
    }
    return 0;
}
Ejemplo n.º 17
0
int main(int argc, char *argv[])
{
#define BITMAP_BLOCKS	10

	struct dev *dev = &(struct dev){ .bits = 3 };
	/* This expect buffer is never reclaimed */
	init_buffers(dev, 1 << 20, 1);

	block_t volblocks = BITMAP_BLOCKS << (dev->bits + 3);
	struct sb *sb = rapid_sb(dev);
	sb->super = INIT_DISKSB(dev->bits, volblocks);
	setup_sb(sb, &sb->super);

	test_init(argv[0]);

	struct inode *bitmap = rapid_open_inode(sb, NULL, 0);
	sb->bitmap = bitmap;

	/* Setup buffers for bitmap */
	for (int block = 0; block < BITMAP_BLOCKS; block++) {
		struct buffer_head *buffer = blockget(bitmap->map, block);
		memset(bufdata(buffer), 0, sb->blocksize);
		set_buffer_clean(buffer);
		blockput(buffer);
	}

	/* Set fake backend mark to modify backend objects. */
	tux3_start_backend(sb);

	if (test_start("test01"))
		test01(sb, BITMAP_BLOCKS);
	test_end();

	if (test_start("test02"))
		test02(sb, BITMAP_BLOCKS);
	test_end();

	if (test_start("test03"))
		test03(sb, BITMAP_BLOCKS);
	test_end();

	if (test_start("test04"))
		test04(sb, BITMAP_BLOCKS);
	test_end();

	if (test_start("test05"))
		test05(sb, BITMAP_BLOCKS);
	test_end();

	if (test_start("test06"))
		test06(sb, BITMAP_BLOCKS);
	test_end();

	if (test_start("test07"))
		test07(sb, BITMAP_BLOCKS);
	test_end();

	if (test_start("test08"))
		test08(sb, BITMAP_BLOCKS);
	test_end();

	tux3_end_backend();

	clean_main(sb);

	return test_failures();
}
Ejemplo n.º 18
0
int main ( void )

/******************************************************************************/
/*
  Purpose:

    MAIN is the main program for TOMS655_PRB.

  Discussion:

    TOMS655_PRB calls a set of problems for DIVDIF.

  Licensing:

    This code is distributed under the GNU LGPL license. 

  Modified:

    11 January 2010

  Author:

    John Burkardt
*/
{
  double alpha;
  double beta;
  int kind;
  int nt;

  timestamp ( );

  printf ( "\n" );
  printf ( "TOMS655_PRB\n" );
  printf ( "  C version\n" );
  printf ( "\n" );
  printf ( "  Tests for the routines in the TOMS655 library.\n" );
 
  test01 ( );
  test02 ( );
  test03 ( );
  test04 ( );
  test05 ( );
  test06 ( );
  test07 ( );
  test08 ( );
  test09 ( );
/*
  Compute 15 points of an example of each rule.
*/
  for ( kind = 1; kind <= 8; kind++ )
  {
    nt = 15;
    if ( kind == 8 )
    {
      alpha = 1.0;
      beta = - alpha - 2 * nt - 2;
    }
    else
    {
      alpha = 0.0;
      beta = 0.0;
    }
    test10 ( nt, kind, alpha, beta );
  }

  printf ( "\n" );
  printf ( "TOMS655_PRB\n" );
  printf ( "  Normal end of execution.\n" );

  printf ( "\n" );
  timestamp ( );

  return 0;
}