31 using namespace pwiz::util;
32 using namespace pwiz::proteome;
33 using namespace pwiz::calibration;
38 auto_ptr<MassDatabase> mdb = MassDatabase::createIntegerTestDatabase();
39 vector<MassDatabase::Entry> entries = mdb->
range(0, 3000);
42 unit_assert(entries[entries.size()-1].mass == 2200);
48 const string& filename =
"MassDatabaseTest.test_pdb.pdb";
49 auto_ptr<PeptideDatabase> pdb = PeptideDatabase::create();
51 const int recordCount = 10;
52 for (
int i=0; i<recordCount; i++)
61 auto_ptr<MassDatabase> mdb = MassDatabase::createFromPeptideDatabase(filename);
64 for (
int i=0; i<recordCount; i++)
71 vector<MassDatabase::Entry> range = mdb->
range(2,6);
73 for (
unsigned int i=0; i<range.size(); i++)
76 system((
"rm " + filename).c_str());
81 namespace calibration {
91 auto_ptr<PeptideDatabase> pdb = PeptideDatabase::create();
92 for (
int i=100; i<=2200; i++)
98 const string& filename =
"temp.pdb";
101 auto_ptr<MassDatabase> mdb = MassDatabase::createFromPeptideDatabase(filename);
102 auto_ptr<MassDatabase> mdb2 = MassDatabase::createIntegerTestDatabase();
105 vector<MassDatabase::Entry> entries1 = mdb->
range(150, 250);
106 vector<MassDatabase::Entry> entries2 = mdb2->
range(150, 250);
109 system((
"rm " + filename).c_str());
124 cerr << e.what() << endl;