ProteoWizard
Functions | Variables
ExtendedReadTest.cpp File Reference
#include "IdentDataFile.hpp"
#include "DefaultReaderList.hpp"
#include "IO.hpp"
#include "pwiz/utility/misc/Std.hpp"

Go to the source code of this file.

Functions

void testFile (const string &inFilepath, const string &outFilepath)
 
int main (int argc, char *argv[])
 

Variables

const char * filenames []
 

Function Documentation

§ testFile()

void testFile ( const string &  inFilepath,
const string &  outFilepath 
)

Definition at line 45 of file ExtendedReadTest.cpp.

References pwiz::identdata::IdentDataFile::write().

Referenced by main().

46 {
47  cout << "reading file in from " << inFilepath << endl;
48  IdentDataFile mzid(inFilepath);
49 
50  cout << "writing file out to " << outFilepath << endl;
51  mzid.write(outFilepath);
52  cout << "done.\n";
53 }
IdentData object plus file I/O.

§ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 56 of file ExtendedReadTest.cpp.

References TEST_EPILOG, TEST_FAILED, TEST_PROLOG, and testFile().

57 {
58  TEST_PROLOG(argc, argv)
59 
60  try
61  {
62  if (argc == 3)
63  testFile(argv[1], argv[2]);
64  else
65  {
66  cout << "only have " << argc << " arguments:\n";
67  for(int i=0; i<argc; i++)
68  cout << argv[i] << endl;
69  }
70 
71  cout << "\nhttp://proteowizard.sourceforge.net\n"
72  << "support@proteowizard.org\n";
73 
74  }
75  catch (exception& e)
76  {
77  TEST_FAILED(e.what())
78  }
79  catch (...)
80  {
81  TEST_FAILED("Caught unknown exception.")
82  }
83 
85 }
#define TEST_EPILOG
Definition: unit.hpp:182
#define TEST_FAILED(x)
Definition: unit.hpp:176
#define TEST_PROLOG(argc, argv)
Definition: unit.hpp:174
void testFile(const string &inFilepath, const string &outFilepath)

Variable Documentation

§ filenames

const char* filenames[]
Initial value:
=
{
"Mascot_MSMS_example.mzid",
"omssa_example_full.mzid",
"Mascot_mzml_example.mzid",
"PMF_example.mzid",
"Mascot_N15_example.mzid",
"Sequest_example.mzid",
"Mascot_NA_example.mzid",
"spectraST.mzid",
"Mascot_top_down_example.mzid",
"xtandem_example_full.mzid",
"MPC_example.mzid"
}

Definition at line 30 of file ExtendedReadTest.cpp.

Referenced by main(), and test().