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.

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.

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

◆ main()

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

Definition at line 56 of file ExtendedReadTest.cpp.

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 << "\nhttps://github.com/ProteoWizard\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}
void testFile()
#define TEST_EPILOG
Definition unit.hpp:183
#define TEST_FAILED(x)
Definition unit.hpp:177
#define TEST_PROLOG(argc, argv)
Definition unit.hpp:175

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

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.

31{
32 "Mascot_MSMS_example.mzid",
33 "omssa_example_full.mzid",
34 "Mascot_mzml_example.mzid",
35 "PMF_example.mzid",
36 "Mascot_N15_example.mzid",
37 "Sequest_example.mzid",
38 "Mascot_NA_example.mzid",
39 "spectraST.mzid",
40 "Mascot_top_down_example.mzid",
41 "xtandem_example_full.mzid",
42 "MPC_example.mzid"
43};

Referenced by main(), and test().