MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / checkData

Function checkData

src/tests/class_tests/openms/source/OSWFile_test.cpp:83–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81*/
82
83void checkData(OSWData& res)
84{
85 const OSWProtein& prot = *res.getProteins().begin();
86 TEST_EQUAL(prot.getAccession(), "1/P00167ups|CYB5_HUMAN_UPS");
87 const OSWPeptidePrecursor& prec = *prot.getPeptidePrecursors().begin();
88 TEST_EQUAL(prec.getCharge(), 2);
89 TEST_EQUAL(prec.isDecoy(), false);
90 TEST_REAL_SIMILAR(prec.getPCMz(), 1103.4676);
91 TEST_EQUAL(prec.getSequence(), "EQAGGDATENFEDVGHSTDAR");
92 TEST_EQUAL(prec.getFeatures().size(), 5);
93 const std::vector<UInt32> tr{ 236830, 236831, 236832, 236833, 236834 };
94 const auto& trd = prec.getFeatures().back().getTransitionIDs();
95 TEST_TRUE(trd == tr);
96 // check last transition
97 const OSWProtein& prot_last = res.getProteins().back();
98 TEST_EQUAL(prot_last.getPeptidePrecursors().back().getFeatures().back().getTransitionIDs().back(), 99);
99
100 // all features should have 5 transitions
101 for (const auto& prot : res.getProteins())
102 {
103 for (const auto& pc : prot.getPeptidePrecursors())
104 {
105 for (const auto& feat : pc.getFeatures())
106 {
107 TEST_EQUAL(feat.getTransitionIDs().size(), 5);
108 }
109 }
110 }
111}
112
113START_TEST(OSWFile, "$Id$")
114

Callers 1

OSWFile_test.cppFile · 0.85

Calls 8

TEST_EQUALFunction · 0.85
getAccessionMethod · 0.80
getSequenceMethod · 0.80
getFeaturesMethod · 0.80
backMethod · 0.80
beginMethod · 0.45
getChargeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected