diff --git a/modules/conop/tests/test_heuristic_builder.cc b/modules/conop/tests/test_heuristic_builder.cc index cd13802cad0c55146e2e7cb5e284c078e8ca7fac..f2378e660eb4649fb0787af02e65ab5c21481839 100644 --- a/modules/conop/tests/test_heuristic_builder.cc +++ b/modules/conop/tests/test_heuristic_builder.cc @@ -181,14 +181,14 @@ BOOST_AUTO_TEST_CASE(name_based_connect) dheuristic_builder.FillAtomProps(*i); } - BOOST_MESSAGE("running distance based checks on arginine"); + BOOST_TEST_MESSAGE("running distance based checks on arginine"); heuristic_builder.ConnectAtomsOfResidue(arg); verify_connectivity(arg); - BOOST_MESSAGE("running distance based checks on leu"); + BOOST_TEST_MESSAGE("running distance based checks on leu"); heuristic_builder.ConnectAtomsOfResidue(ile); verify_connectivity(ile); - BOOST_MESSAGE("running distance based checks on defective leu"); + BOOST_TEST_MESSAGE("running distance based checks on defective leu"); dheuristic_builder.ConnectAtomsOfResidue(dile); verify_connectivity(dile); } diff --git a/modules/img/alg/tests/test_utils.hh b/modules/img/alg/tests/test_utils.hh index 1f4987cb48eb5d0497972018d1b4e67055171f36..98b617900ce75457156f20a85f96384657082bae 100644 --- a/modules/img/alg/tests/test_utils.hh +++ b/modules/img/alg/tests/test_utils.hh @@ -58,7 +58,7 @@ bool CheckEqualStates(const image_state::ImageStateImpl<V,DP>& one, std::ostringstream msg; msg << one.GetSize() << " != " << two.GetSize(); if(one.GetSize()!=two.GetSize()) { - BOOST_MESSAGE(msg.str()); + BOOST_TEST_MESSAGE(msg.str()); return false; } diff --git a/modules/img/base/tests/test_utils.hh b/modules/img/base/tests/test_utils.hh index b46b3d8f7c7b58b63911490a2864b8811777453c..6af2dd3c0ea2b10e2988c3966d1dce27dc74b778 100644 --- a/modules/img/base/tests/test_utils.hh +++ b/modules/img/base/tests/test_utils.hh @@ -57,7 +57,7 @@ bool CheckEqualStates(const image_state::ImageStateImpl<V,DP>& one, std::ostringstream msg; msg << one.GetSize() << " != " << two.GetSize(); if(one.GetSize()!=two.GetSize()) { - BOOST_MESSAGE(msg.str()); + BOOST_TEST_MESSAGE(msg.str()); return false; } diff --git a/modules/io/tests/test_mmcif_info.cc b/modules/io/tests/test_mmcif_info.cc index 69f369a4dc96546e784551e7cae13783b1a3ef9b..d37b8f396198045128e8e5acce8598cafed9adb4 100644 --- a/modules/io/tests/test_mmcif_info.cc +++ b/modules/io/tests/test_mmcif_info.cc @@ -32,7 +32,7 @@ BOOST_AUTO_TEST_SUITE( io ); BOOST_AUTO_TEST_CASE(mmcif_info_obsolete) { - BOOST_MESSAGE(" Running mmcif_info_obsolete tests..."); + BOOST_TEST_MESSAGE(" Running mmcif_info_obsolete tests..."); MMCifInfoObsolete obs = MMCifInfoObsolete(); @@ -49,12 +49,12 @@ BOOST_AUTO_TEST_CASE(mmcif_info_obsolete) obs.SetID(StringRef("SPRSDE", 6)); BOOST_CHECK(obs.GetID() == "Supersede"); - BOOST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" done."); } BOOST_AUTO_TEST_CASE(mmcif_info_citation) { - BOOST_MESSAGE(" Running mmcif_info_citation tests..."); + BOOST_TEST_MESSAGE(" Running mmcif_info_citation tests..."); MMCifInfoCitation cit = MMCifInfoCitation(); std::vector<String> author_list; @@ -89,8 +89,8 @@ BOOST_AUTO_TEST_CASE(mmcif_info_citation) author_list = cit.GetAuthorList(); BOOST_CHECK(author_list.back() == "Kabel, H."); - BOOST_MESSAGE(" done."); - BOOST_MESSAGE(" trying to add everything to an info object"); + BOOST_TEST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" trying to add everything to an info object"); MMCifInfo info = MMCifInfo(); info.AddCitation(cit); std::vector<MMCifInfoCitation> citations = info.GetCitations(); @@ -99,12 +99,12 @@ BOOST_AUTO_TEST_CASE(mmcif_info_citation) BOOST_CHECK_THROW(info.AddAuthorsToCitation(StringRef("Foo", 3), author_list), IOException); - BOOST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" done."); } BOOST_AUTO_TEST_CASE(mmcif_info_biounit) { - BOOST_MESSAGE(" Running mmcif_info_biounit tests..."); + BOOST_TEST_MESSAGE(" Running mmcif_info_biounit tests..."); MMCifInfoBioUnit bu = MMCifInfoBioUnit(); @@ -147,12 +147,12 @@ BOOST_AUTO_TEST_CASE(mmcif_info_biounit) BOOST_CHECK(tr[1].first == 1); BOOST_CHECK(tr[1].second == 2); - BOOST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" done."); } BOOST_AUTO_TEST_CASE(mmcif_info_transoperation) { - BOOST_MESSAGE(" Running mmcif_info_transoperation tests..."); + BOOST_TEST_MESSAGE(" Running mmcif_info_transoperation tests..."); MMCifInfoTransOpPtr op(new MMCifInfoTransOp); @@ -180,12 +180,12 @@ BOOST_AUTO_TEST_CASE(mmcif_info_transoperation) BOOST_CHECK(tr.back().first == 0); BOOST_CHECK(tr.back().second == 1); - BOOST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" done."); } BOOST_AUTO_TEST_CASE(mmcif_info_structdetails) { - BOOST_MESSAGE(" Running mmcif_info_structdetails tests..."); + BOOST_TEST_MESSAGE(" Running mmcif_info_structdetails tests..."); MMCifInfoStructDetails sd = MMCifInfoStructDetails(); @@ -215,12 +215,12 @@ BOOST_AUTO_TEST_CASE(mmcif_info_structdetails) info.SetStructDetails(sd); BOOST_CHECK(info.GetStructDetails() == sd); - BOOST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" done."); } BOOST_AUTO_TEST_CASE(mmcif_info_revisions) { - BOOST_MESSAGE(" Running mmcif_info_revisions tests..."); + BOOST_TEST_MESSAGE(" Running mmcif_info_revisions tests..."); MMCifInfoRevisions rev = MMCifInfoRevisions(); @@ -240,12 +240,12 @@ BOOST_AUTO_TEST_CASE(mmcif_info_revisions) BOOST_CHECK(rev.GetNum(1) == 2); BOOST_CHECK(rev.GetStatus(1) == "full release"); - BOOST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" done."); } BOOST_AUTO_TEST_CASE(mmcif_info) { - BOOST_MESSAGE(" Running mmcif_info tests..."); + BOOST_TEST_MESSAGE(" Running mmcif_info tests..."); MMCifInfo info = MMCifInfo(); @@ -271,7 +271,7 @@ BOOST_AUTO_TEST_CASE(mmcif_info) BOOST_CHECK(info.GetRevisions().GetSize() == 0); - BOOST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" done."); } diff --git a/modules/io/tests/test_mmcif_reader.cc b/modules/io/tests/test_mmcif_reader.cc index 4e62b08563327d0c2b50330dfb3c304bd1fb915b..77b2bcd14b9ae79c13a0a56def3af3aecfac7701 100644 --- a/modules/io/tests/test_mmcif_reader.cc +++ b/modules/io/tests/test_mmcif_reader.cc @@ -104,28 +104,29 @@ BOOST_AUTO_TEST_CASE(mmcif_isvalidpdbident) mol::EntityHandle eh=mol::CreateEntity(); // on changing the tests for a PDB id in mmcif files, extend this unit test - BOOST_MESSAGE(" Running mmcif_isvalidpdbident tests..."); + BOOST_TEST_MESSAGE(" Running mmcif_isvalidpdbident tests..."); std::ifstream s("testfiles/mmcif/atom_site.mmcif"); TestMMCifReaderProtected tmmcif_p(s, eh); StringRef id = StringRef("1FOO", 4); - BOOST_MESSAGE(" Testing valid id ('"+ id.str() +"')..."); + BOOST_TEST_MESSAGE(" Testing valid id ('"+ id.str() +"')..."); BOOST_CHECK(tmmcif_p.IsValidPDBIdent(id)); - BOOST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" done."); id = StringRef("this is to long for a PDB id", 28); - BOOST_MESSAGE(" Testing oversized PDB id ('"+ id.str() +"')..."); + BOOST_TEST_MESSAGE(" Testing oversized PDB id ('"+ id.str() +"')..."); BOOST_CHECK(!tmmcif_p.IsValidPDBIdent(id)); - BOOST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" done."); id = StringRef("nFOO", 4); - BOOST_MESSAGE(" Testing PDB id with missing number ('"+ id.str() +"')..."); + BOOST_TEST_MESSAGE(" Testing PDB id with missing number ('" + + id.str() + "')..."); BOOST_CHECK(!tmmcif_p.IsValidPDBIdent(id)); - BOOST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" done."); } BOOST_AUTO_TEST_CASE(mmcif_trystoreidx) { mol::EntityHandle eh = mol::CreateEntity(); - BOOST_MESSAGE(" Running mmcif_trystoreidx tests..."); + BOOST_TEST_MESSAGE(" Running mmcif_trystoreidx tests..."); std::ifstream s("testfiles/mmcif/atom_site.mmcif"); TestMMCifReaderProtected tmmcif_p(s, eh, IOProfile()); StarLoopDesc mmcif_h; @@ -167,68 +168,68 @@ BOOST_AUTO_TEST_CASE(mmcif_onbeginloop) mol::EntityHandle eh=mol::CreateEntity(); // add more tests on new mandatory items - BOOST_MESSAGE(" Running mmcif_onbeginloop tests..."); + BOOST_TEST_MESSAGE(" Running mmcif_onbeginloop tests..."); std::ifstream s("testfiles/mmcif/atom_site.mmcif"); MMCifReader mmcif_p(s, eh, IOProfile()); StarLoopDesc mmcif_h; - BOOST_MESSAGE(" testing atom_site items..."); + BOOST_TEST_MESSAGE(" testing atom_site items..."); mmcif_h.SetCategory(StringRef("atom_site", 9)); - BOOST_MESSAGE(" auth_asym_id"); + BOOST_TEST_MESSAGE(" auth_asym_id"); BOOST_CHECK_THROW(mmcif_p.OnBeginLoop(mmcif_h), IOException); mmcif_h.Add(StringRef("auth_asym_id", 12)); - BOOST_MESSAGE(" id"); + BOOST_TEST_MESSAGE(" id"); BOOST_CHECK_THROW(mmcif_p.OnBeginLoop(mmcif_h), IOException); mmcif_h.Add(StringRef("id", 2)); - BOOST_MESSAGE(" label_alt_id"); + BOOST_TEST_MESSAGE(" label_alt_id"); BOOST_CHECK_THROW(mmcif_p.OnBeginLoop(mmcif_h), IOException); mmcif_h.Add(StringRef("label_alt_id", 12)); - BOOST_MESSAGE(" label_asym_id"); + BOOST_TEST_MESSAGE(" label_asym_id"); BOOST_CHECK_THROW(mmcif_p.OnBeginLoop(mmcif_h), IOException); mmcif_h.Add(StringRef("label_asym_id", 13)); - BOOST_MESSAGE(" label_atom_id"); + BOOST_TEST_MESSAGE(" label_atom_id"); BOOST_CHECK_THROW(mmcif_p.OnBeginLoop(mmcif_h), IOException); mmcif_h.Add(StringRef("label_atom_id", 13)); - BOOST_MESSAGE(" label_comp_id"); + BOOST_TEST_MESSAGE(" label_comp_id"); BOOST_CHECK_THROW(mmcif_p.OnBeginLoop(mmcif_h), IOException); mmcif_h.Add(StringRef("label_comp_id", 13)); - BOOST_MESSAGE(" label_entity_id"); + BOOST_TEST_MESSAGE(" label_entity_id"); BOOST_CHECK_THROW(mmcif_p.OnBeginLoop(mmcif_h), IOException); mmcif_h.Add(StringRef("label_entity_id", 15)); - BOOST_MESSAGE(" label_seq_id"); + BOOST_TEST_MESSAGE(" label_seq_id"); BOOST_CHECK_THROW(mmcif_p.OnBeginLoop(mmcif_h), IOException); mmcif_h.Add(StringRef("label_seq_id", 12)); - BOOST_MESSAGE(" type_symbol"); + BOOST_TEST_MESSAGE(" type_symbol"); BOOST_CHECK_THROW(mmcif_p.OnBeginLoop(mmcif_h), IOException); mmcif_h.Add(StringRef("type_symbol", 11)); - BOOST_MESSAGE(" Cartn_x"); + BOOST_TEST_MESSAGE(" Cartn_x"); BOOST_CHECK_THROW(mmcif_p.OnBeginLoop(mmcif_h), IOException); mmcif_h.Add(StringRef("Cartn_x", 7)); - BOOST_MESSAGE(" Cartn_y"); + BOOST_TEST_MESSAGE(" Cartn_y"); BOOST_CHECK_THROW(mmcif_p.OnBeginLoop(mmcif_h), IOException); mmcif_h.Add(StringRef("Cartn_y", 7)); - BOOST_MESSAGE(" Cartn_z"); + BOOST_TEST_MESSAGE(" Cartn_z"); BOOST_CHECK_THROW(mmcif_p.OnBeginLoop(mmcif_h), IOException); mmcif_h.Add(StringRef("Cartn_z", 7)); BOOST_CHECK_NO_THROW(mmcif_p.OnBeginLoop(mmcif_h)); - BOOST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" done."); mmcif_h.Clear(); - BOOST_MESSAGE(" testing entity items..."); + BOOST_TEST_MESSAGE(" testing entity items..."); mmcif_h.SetCategory(StringRef("entity", 6)); - BOOST_MESSAGE(" id"); + BOOST_TEST_MESSAGE(" id"); BOOST_CHECK_THROW(mmcif_p.OnBeginLoop(mmcif_h), IOException); mmcif_h.Add(StringRef("id", 2)); BOOST_CHECK_NO_THROW(mmcif_p.OnBeginLoop(mmcif_h)); - BOOST_MESSAGE(" done."); - BOOST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" done."); } BOOST_AUTO_TEST_CASE(mmcif_parse_models) { - BOOST_MESSAGE(" Running mmcif_parse_models tests..."); + BOOST_TEST_MESSAGE(" Running mmcif_parse_models tests..."); IOProfile profile; // positive w models - BOOST_MESSAGE(" true positive test for models..."); + BOOST_TEST_MESSAGE(" true positive test for models..."); { mol::EntityHandle eh = mol::CreateEntity(); MMCifReader mmcif_p("testfiles/mmcif/model_truepos.mmcif", eh, profile); @@ -237,18 +238,19 @@ BOOST_AUTO_TEST_CASE(mmcif_parse_models) BOOST_REQUIRE_EQUAL(eh.GetResidueCount(), 2); BOOST_REQUIRE_EQUAL(eh.GetAtomCount(), 26); } - BOOST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" done."); // positive wo models atom_site.mmcif - BOOST_MESSAGE(" test absent atom_site.pdbx_PDB_model_num entry..."); + BOOST_TEST_MESSAGE(" test absent atom_site.pdbx_PDB_model_num " + "entry..."); { mol::EntityHandle eh = mol::CreateEntity(); MMCifReader mmcif_p("testfiles/mmcif/atom_site.mmcif", eh, profile); BOOST_CHECK_NO_THROW(mmcif_p.Parse()); } - BOOST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" done."); // negative, more than 1 atom_site category - BOOST_MESSAGE(" testing more than one atom_site block..."); + BOOST_TEST_MESSAGE(" testing more than one atom_site block..."); { mol::EntityHandle eh = mol::CreateEntity(); MMCifReader mmcif_p("testfiles/mmcif/model_multi_atom_site.mmcif", eh, @@ -261,9 +263,9 @@ BOOST_AUTO_TEST_CASE(mmcif_parse_models) eh, profile); BOOST_CHECK_THROW(mmcif_p.Parse(), IOException); } - BOOST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" done."); - BOOST_MESSAGE(" testing single model with model no. entry..."); + BOOST_TEST_MESSAGE(" testing single model with model no. entry..."); { // build dummy header mol::EntityHandle eh = mol::CreateEntity(); @@ -274,41 +276,41 @@ BOOST_AUTO_TEST_CASE(mmcif_parse_models) tmmcif_h.Add(StringRef("pdbx_PDB_model_num", 18)); BOOST_CHECK_THROW(tmmcif_p.OnBeginLoop(tmmcif_h), IOException); } - BOOST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" done."); - BOOST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" done."); } BOOST_AUTO_TEST_CASE(mmcif_changing_label_entity_id) { - BOOST_MESSAGE(" Running mmcif_changing_label_entity_id tests..."); + BOOST_TEST_MESSAGE(" Running mmcif_changing_label_entity_id tests..."); IOProfile profile; // positive - BOOST_MESSAGE(" true positive test..."); + BOOST_TEST_MESSAGE(" true positive test..."); { mol::EntityHandle eh = mol::CreateEntity(); MMCifReader mmcif_p("testfiles/mmcif/atom_site.mmcif", eh, profile); BOOST_CHECK_NO_THROW(mmcif_p.Parse()); } - BOOST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" done."); // negative - BOOST_MESSAGE(" true negative test..."); + BOOST_TEST_MESSAGE(" true negative test..."); { mol::EntityHandle eh = mol::CreateEntity(); MMCifReader mmcif_p("testfiles/mmcif/changing_label_entity_id.mmcif", eh, profile); BOOST_CHECK_THROW(mmcif_p.Parse(), IOException); } - BOOST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" done."); - BOOST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" done."); } BOOST_AUTO_TEST_CASE(mmcif_unknown_entity_type) { - BOOST_MESSAGE(" Running mmcif_unknown_entity_type tests..."); + BOOST_TEST_MESSAGE(" Running mmcif_unknown_entity_type tests..."); mol::EntityHandle eh = mol::CreateEntity(); std::vector<StringRef> columns; @@ -322,7 +324,7 @@ BOOST_AUTO_TEST_CASE(mmcif_unknown_entity_type) tmmcif_p.OnBeginLoop(tmmcif_h); // positive - BOOST_MESSAGE(" known type..."); + BOOST_TEST_MESSAGE(" known type..."); // build datarow columns.push_back(StringRef("1", 1)); columns.push_back(StringRef("polymer", 7)); @@ -333,26 +335,26 @@ BOOST_AUTO_TEST_CASE(mmcif_unknown_entity_type) columns.pop_back(); columns.push_back(StringRef("water", 5)); BOOST_CHECK_NO_THROW(tmmcif_p.ParseEntity(columns)); - BOOST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" done."); // negative - BOOST_MESSAGE(" unknown type..."); + BOOST_TEST_MESSAGE(" unknown type..."); columns.pop_back(); columns.push_back(StringRef("foo", 3)); BOOST_CHECK_THROW(tmmcif_p.ParseEntity(columns), Error); - BOOST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" done."); - BOOST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" done."); } BOOST_AUTO_TEST_CASE(mmcif_entity_tests) { - BOOST_MESSAGE(" Running mmcif_entity_tests..."); + BOOST_TEST_MESSAGE(" Running mmcif_entity_tests..."); mol::ChainHandle ch; IOProfile profile; // positive - BOOST_MESSAGE(" fetching chain type..."); + BOOST_TEST_MESSAGE(" fetching chain type..."); { mol::EntityHandle eh = mol::CreateEntity(); MMCifReader mmcif_p("testfiles/mmcif/atom_site.mmcif", eh, profile); @@ -367,9 +369,9 @@ BOOST_AUTO_TEST_CASE(mmcif_entity_tests) BOOST_CHECK(ch.IsValid()); BOOST_CHECK(ch.GetType() == mol::CHAINTYPE_WATER); } - BOOST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" done."); // negative: no entity description - BOOST_MESSAGE(" check missing entity description..."); + BOOST_TEST_MESSAGE(" check missing entity description..."); { mol::EntityHandle eh = mol::CreateEntity(); MMCifReader mmcif_p("testfiles/mmcif/model_truepos.mmcif", @@ -383,8 +385,8 @@ BOOST_AUTO_TEST_CASE(mmcif_entity_tests) BOOST_CHECK(ch.IsValid()); BOOST_CHECK(ch.GetType() == mol::CHAINTYPE_UNKNOWN); } - BOOST_MESSAGE(" done."); - BOOST_MESSAGE(" fetch details..."); + BOOST_TEST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" fetch details..."); { mol::EntityHandle eh = mol::CreateEntity(); MMCifReader mmcif_p("testfiles/mmcif/atom_site.mmcif", eh, profile); @@ -393,9 +395,9 @@ BOOST_AUTO_TEST_CASE(mmcif_entity_tests) BOOST_CHECK(ch.IsValid()); BOOST_CHECK(ch.GetDescription() == "Very important information."); } - BOOST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" done."); - BOOST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" done."); } BOOST_AUTO_TEST_CASE(mmcif_entity_poly_tests) @@ -415,7 +417,7 @@ BOOST_AUTO_TEST_CASE(mmcif_entity_poly_tests) return; } conop::Conopology::Instance().SetDefaultLib(compound_lib); - BOOST_MESSAGE(" Running mmcif_entity_poly_tests..."); + BOOST_TEST_MESSAGE(" Running mmcif_entity_poly_tests..."); mol::ChainHandle ch; IOProfile profile; StarLoopDesc tmmcif_h; @@ -430,7 +432,7 @@ BOOST_AUTO_TEST_CASE(mmcif_entity_poly_tests) seq::SequenceHandle curr = seqres.FindSequence("A"); BOOST_CHECK(curr.GetString() == "VTI"); - BOOST_MESSAGE(" testing missing corresponding entity entry..."); + BOOST_TEST_MESSAGE(" testing missing corresponding entity entry..."); { mol::EntityHandle eh = mol::CreateEntity(); std::vector<StringRef> columns; @@ -443,8 +445,8 @@ BOOST_AUTO_TEST_CASE(mmcif_entity_poly_tests) columns.push_back(StringRef("1", 1)); BOOST_CHECK_THROW(tmmcif_p.ParseEntityPoly(columns), IOException); } - BOOST_MESSAGE(" done."); - BOOST_MESSAGE(" testing type recognition..."); + BOOST_TEST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" testing type recognition..."); { TestMMCifReaderProtected tmmcif_p("testfiles/mmcif/atom_site.mmcif", eh); std::vector<StringRef> columns; @@ -499,8 +501,8 @@ columns.push_back(StringRef("polydeoxyribonucleotide/polyribonucleotide hybrid", BOOST_CHECK_THROW(tmmcif_p.ParseEntityPoly(columns), IOException); columns.pop_back(); } - BOOST_MESSAGE(" done."); - BOOST_MESSAGE(" testing pdbx_seq_one_letter_code reading..."); + BOOST_TEST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" testing pdbx_seq_one_letter_code reading..."); { TestMMCifReaderProtected tmmcif_p("testfiles/mmcif/atom_site.mmcif", eh); std::vector<StringRef> columns; @@ -533,8 +535,9 @@ columns.push_back(StringRef("polydeoxyribonucleotide/polyribonucleotide hybrid", BOOST_CHECK_NO_THROW(tmmcif_p.ParseEntityPoly(columns)); BOOST_CHECK_THROW(tmmcif_p.ParseEntityPoly(columns), IOException); } - BOOST_MESSAGE(" done."); - BOOST_MESSAGE(" testing pdbx_seq_one_letter_code_can reading..."); + BOOST_TEST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" testing pdbx_seq_one_letter_code_can " + "reading..."); { TestMMCifReaderProtected tmmcif_p("testfiles/mmcif/atom_site.mmcif", eh); std::vector<StringRef> columns; @@ -566,14 +569,14 @@ columns.push_back(StringRef("polydeoxyribonucleotide/polyribonucleotide hybrid", BOOST_CHECK_NO_THROW(tmmcif_p.ParseEntityPoly(columns)); BOOST_CHECK_THROW(tmmcif_p.ParseEntityPoly(columns), IOException); } - BOOST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" done."); - BOOST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" done."); } BOOST_AUTO_TEST_CASE(mmcif_citation_tests) { - BOOST_MESSAGE(" Running mmcif_citation_tests..."); + BOOST_TEST_MESSAGE(" Running mmcif_citation_tests..."); //build dummy citation mol::EntityHandle eh; TestMMCifReaderProtected tmmcif_p("testfiles/mmcif/atom_site.mmcif", eh); @@ -610,12 +613,12 @@ BOOST_AUTO_TEST_CASE(mmcif_citation_tests) BOOST_CHECK_THROW(tmmcif_p.ParseCitation(columns), IOException); - BOOST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" done."); } BOOST_AUTO_TEST_CASE(mmcif_citation_author_tests) { - BOOST_MESSAGE(" Running mmcif_citation_author_tests..."); + BOOST_TEST_MESSAGE(" Running mmcif_citation_author_tests..."); mol::EntityHandle eh = mol::CreateEntity(); std::ifstream s("testfiles/mmcif/atom_site.mmcif"); @@ -631,7 +634,7 @@ BOOST_AUTO_TEST_CASE(mmcif_citation_author_tests) BOOST_CHECK(authors[1] == "McCheese, B.M."); BOOST_CHECK(authors[2] == "Van Hummel, J.F."); - BOOST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" done."); } BOOST_AUTO_TEST_CASE(mmcif_struct_ref) @@ -670,8 +673,8 @@ BOOST_AUTO_TEST_CASE(mmcif_struct_ref) BOOST_AUTO_TEST_CASE(mmcif_refine_tests) { - BOOST_MESSAGE(" Running mmcif_refine_tests..."); - BOOST_MESSAGE(" positive test..."); + BOOST_TEST_MESSAGE(" Running mmcif_refine_tests..."); + BOOST_TEST_MESSAGE(" positive test..."); { mol::EntityHandle eh = mol::CreateEntity(); std::ifstream s("testfiles/mmcif/atom_site.mmcif"); @@ -684,8 +687,8 @@ BOOST_AUTO_TEST_CASE(mmcif_refine_tests) BOOST_CHECK_CLOSE(mmcif_p.GetInfo().GetResolution(), 2.0f, 0.001f); #endif } - BOOST_MESSAGE(" done."); - BOOST_MESSAGE(" capturing fishy data lines..."); + BOOST_TEST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" capturing fishy data lines..."); { mol::EntityHandle eh; TestMMCifReaderProtected tmmcif_p("testfiles/mmcif/atom_site.mmcif", eh); @@ -704,13 +707,13 @@ BOOST_AUTO_TEST_CASE(mmcif_refine_tests) BOOST_CHECK_THROW(tmmcif_p.ParseRefine(columns), IOException); } - BOOST_MESSAGE(" done."); - BOOST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" done."); } BOOST_AUTO_TEST_CASE(mmcif_biounit_tests) { - BOOST_MESSAGE(" Running mmcif_biounit_tests..."); + BOOST_TEST_MESSAGE(" Running mmcif_biounit_tests..."); //build dummy biounit mol::EntityHandle eh = mol::CreateEntity(); TestMMCifReaderProtected tmmcif_p("testfiles/mmcif/atom_site.mmcif", eh); @@ -824,12 +827,12 @@ BOOST_AUTO_TEST_CASE(mmcif_biounit_tests) columns.push_back(StringRef("3", 1)); BOOST_CHECK_THROW(tmmcif_p.ParsePdbxStructOperList(columns), IOException); - BOOST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" done."); } BOOST_AUTO_TEST_CASE(mmcif_struct_tests) { - BOOST_MESSAGE(" Running mmcif_struct_tests..."); + BOOST_TEST_MESSAGE(" Running mmcif_struct_tests..."); mol::EntityHandle eh = mol::CreateEntity(); TestMMCifReaderProtected tmmcif_p("testfiles/mmcif/atom_site.mmcif", eh); @@ -862,16 +865,16 @@ BOOST_AUTO_TEST_CASE(mmcif_struct_tests) columns.push_back(StringRef("A", 1)); BOOST_CHECK_THROW(tmmcif_p.ParseStruct(columns), IOException); - BOOST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" done."); } BOOST_AUTO_TEST_CASE(mmcif_struct_conf_tests) { - BOOST_MESSAGE(" Running mmcif_struct_conf_tests..."); + BOOST_TEST_MESSAGE(" Running mmcif_struct_conf_tests..."); mol::EntityHandle eh = mol::CreateEntity(); TestMMCifReaderProtected tmmcif_p("testfiles/mmcif/atom_site.mmcif", eh); - BOOST_MESSAGE(" testing type validation"); + BOOST_TEST_MESSAGE(" testing type validation"); StringRef type = StringRef("HELX_P", 6); BOOST_CHECK(tmmcif_p.DetermineSecStructType(type) == TestMMCifReaderProtected::MMCIF_HELIX); @@ -998,9 +1001,9 @@ BOOST_AUTO_TEST_CASE(mmcif_struct_conf_tests) type = StringRef("Foo", 3); BOOST_CHECK_THROW(tmmcif_p.DetermineSecStructType(type), IOException); - BOOST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" done."); - BOOST_MESSAGE(" testing auth_chain_id switch..."); + BOOST_TEST_MESSAGE(" testing auth_chain_id switch..."); StarLoopDesc tmmcif_h; { std::vector<StringRef> columns; @@ -1044,18 +1047,18 @@ BOOST_AUTO_TEST_CASE(mmcif_struct_conf_tests) BOOST_CHECK_THROW(tmmcif_p.ParseStructConf(columns), IOException); } tmmcif_p.SetAuthChainID(false); - BOOST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" done."); - BOOST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" done."); } BOOST_AUTO_TEST_CASE(mmcif_struct_sheet_range_tests) { - BOOST_MESSAGE(" Running mmcif_struct_sheet_range_tests..."); + BOOST_TEST_MESSAGE(" Running mmcif_struct_sheet_range_tests..."); mol::EntityHandle eh = mol::CreateEntity(); TestMMCifReaderProtected tmmcif_p("testfiles/mmcif/atom_site.mmcif", eh); - BOOST_MESSAGE(" testing auth_chain_id switch..."); + BOOST_TEST_MESSAGE(" testing auth_chain_id switch..."); StarLoopDesc tmmcif_h; std::vector<StringRef> columns; tmmcif_h.SetCategory(StringRef("struct_sheet_range", 18)); @@ -1097,16 +1100,16 @@ BOOST_AUTO_TEST_CASE(mmcif_struct_sheet_range_tests) tmmcif_p.SetAuthChainID(true); BOOST_CHECK_THROW(tmmcif_p.ParseStructSheetRange(columns), IOException); tmmcif_p.SetAuthChainID(false); - BOOST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" done."); - BOOST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" done."); } BOOST_AUTO_TEST_CASE(mmcif_parseatomident) { - BOOST_MESSAGE(" Running mmcif_parseatomident tests..."); + BOOST_TEST_MESSAGE(" Running mmcif_parseatomident tests..."); mol::EntityHandle eh = mol::CreateEntity(); @@ -1123,8 +1126,8 @@ BOOST_AUTO_TEST_CASE(mmcif_parseatomident) char alt_loc; StringRef atom_name; - BOOST_MESSAGE(" testing valid line"); - BOOST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" testing valid line"); + BOOST_TEST_MESSAGE(" done."); // negative //cols.push_back(StringRef("ATOM", 4)); //BOOST_CHECK_THROW(tmmcif_p.ParseAtomIdent(cols, @@ -1153,7 +1156,7 @@ BOOST_AUTO_TEST_CASE(mmcif_parseatomident) this->TryStoreIdx(CARTN_Z, "Cartn_z", header); */ - BOOST_MESSAGE(" testing profile to read calpha only"); + BOOST_TEST_MESSAGE(" testing profile to read calpha only"); { profile.calpha_only = true; // set up dummy header to pre-set indices @@ -1197,9 +1200,9 @@ BOOST_AUTO_TEST_CASE(mmcif_parseatomident) resnum, valid_res_num, atom_name, alt_loc), false); } - BOOST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" done."); - BOOST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" done."); } /* @@ -1207,21 +1210,21 @@ BOOST_AUTO_TEST_CASE(mmcif_parseandaddatom) { mol::EntityHandle eh = mol::CreateEntity(); - BOOST_MESSAGE(" Running mmcif_parseandaddatom tests..."); + BOOST_TEST_MESSAGE(" Running mmcif_parseandaddatom tests..."); std::ifstream s("testfiles/mmcif/atom_site.mmcif"); TestMMCifReaderProtected tmmcif_p(s, eh, IOProfile()); std::vector<StringRef> cols; - //BOOST_MESSAGE(" testing short atom_site entry"); + //BOOST_TEST_MESSAGE(" testing short atom_site entry"); //cols.push_back(StringRef("ATOM", 4)); //BOOST_CHECK_THROW(tmmcif_p.ParseAndAddAtom(cols), IOException); - //BOOST_MESSAGE(" done."); + //BOOST_TEST_MESSAGE(" done."); } */ BOOST_AUTO_TEST_CASE(mmcif_testreader) { - BOOST_MESSAGE(" Running mmcif_testreader tests..."); + BOOST_TEST_MESSAGE(" Running mmcif_testreader tests..."); mol::EntityHandle eh = mol::CreateEntity(); std::ifstream s("testfiles/mmcif/atom_site.mmcif"); IOProfile profile; @@ -1229,7 +1232,7 @@ BOOST_AUTO_TEST_CASE(mmcif_testreader) mmcif_p.SetRestrictChains("A O C"); - BOOST_MESSAGE(" testing Parse()..."); + BOOST_TEST_MESSAGE(" testing Parse()..."); BOOST_REQUIRE_NO_THROW(mmcif_p.Parse()); BOOST_REQUIRE_EQUAL(eh.GetChainCount(), 3); @@ -1238,9 +1241,9 @@ BOOST_AUTO_TEST_CASE(mmcif_testreader) mol::ChainHandle ch = eh.FindChain("A"); BOOST_CHECK(ch.IsValid()); - BOOST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" done."); - BOOST_MESSAGE(" testing numbering water..."); + BOOST_TEST_MESSAGE(" testing numbering water..."); ch = eh.FindChain("O"); BOOST_CHECK(ch.IsValid()); mol::ResidueHandleList rl = ch.GetResidueList(); @@ -1249,9 +1252,9 @@ BOOST_AUTO_TEST_CASE(mmcif_testreader) for (rs = rl.begin(); rs != rl.end(); ++rs, ++i) { BOOST_CHECK_EQUAL(rs->GetNumber().GetNum(), i); } - BOOST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" done."); - BOOST_MESSAGE(" testing secondary structure..."); + BOOST_TEST_MESSAGE(" testing secondary structure..."); // pick chains, iterate residues, check for correct sec.struct. ch = eh.FindChain("A"); rl = ch.GetResidueList(); @@ -1261,10 +1264,10 @@ BOOST_AUTO_TEST_CASE(mmcif_testreader) ch = eh.FindChain("C"); rl = ch.GetResidueList(); BOOST_CHECK_EQUAL(rl[0].GetSecStructure().IsExtended(), true); - BOOST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" done."); - BOOST_MESSAGE(" reading data fields which should not fail..."); - BOOST_MESSAGE(mmcif_p.GetInfo().GetBioUnits().back().GetID()); + BOOST_TEST_MESSAGE(" reading data fields which should not fail..."); + BOOST_TEST_MESSAGE(mmcif_p.GetInfo().GetBioUnits().back().GetID()); BOOST_CHECK(mmcif_p.GetInfo().GetMethod().str() == "Deep-fry"); BOOST_CHECK(mmcif_p.GetInfo().GetBioUnits().back().GetDetails() == "author_defined_assembly"); @@ -1293,9 +1296,9 @@ BOOST_AUTO_TEST_CASE(mmcif_testreader) BOOST_CHECK(obs.GetID() == "Obsolete"); BOOST_CHECK(obs.GetPDBID() == "1FOO"); BOOST_CHECK(obs.GetReplacedPDBID() == "2BAR"); - BOOST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" done."); - BOOST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" done."); } BOOST_AUTO_TEST_SUITE_END(); diff --git a/modules/io/tests/test_star_parser.cc b/modules/io/tests/test_star_parser.cc index 40cdf674f81a7da4a33f3dadab18f3330d338a75..6ff217b748c123770f789a2168d540be3f1ef94d 100644 --- a/modules/io/tests/test_star_parser.cc +++ b/modules/io/tests/test_star_parser.cc @@ -278,7 +278,7 @@ BOOST_AUTO_TEST_CASE(star_split3) BOOST_AUTO_TEST_CASE(star_data_item) { - BOOST_MESSAGE(" Running star_data_item tests..."); + BOOST_TEST_MESSAGE(" Running star_data_item tests..."); std::ifstream s("testfiles/data-item.cif"); DataItemTestParser star_p(s); BOOST_CHECK_NO_THROW(star_p.Parse()); @@ -286,12 +286,12 @@ BOOST_AUTO_TEST_CASE(star_data_item) BOOST_CHECK_EQUAL(star_p.s2, "a b c"); BOOST_CHECK_EQUAL(star_p.s3, "a\nb\nc"); BOOST_CHECK_EQUAL(star_p.s4, "a'b"); - BOOST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" done."); } BOOST_AUTO_TEST_CASE(format_diag_stream) { - BOOST_MESSAGE(" Running format_diag_stream tests..."); + BOOST_TEST_MESSAGE(" Running format_diag_stream tests..."); std::ifstream s("testfiles/data-item.cif"); DataItemTestParser star_p(s); BOOST_CHECK_EQUAL(star_p.FormatDiagnostic(STAR_DIAG_WARNING, "bad", -1), @@ -307,7 +307,7 @@ BOOST_AUTO_TEST_CASE(format_diag_stream) BOOST_AUTO_TEST_CASE(format_diag_filename) { - BOOST_MESSAGE(" Running format_diag_filename tests..."); + BOOST_TEST_MESSAGE(" Running format_diag_filename tests..."); DataItemTestParser star_p("testfiles/data-item.cif"); BOOST_CHECK_EQUAL(star_p.FormatDiagnostic(STAR_DIAG_WARNING, "bad", -1), "testfiles/data-item.cif: warning: bad"); @@ -335,7 +335,7 @@ BOOST_AUTO_TEST_CASE(star_multiline_loop) BOOST_AUTO_TEST_CASE(star_loop) { - BOOST_MESSAGE(" Running star_loop tests..."); + BOOST_TEST_MESSAGE(" Running star_loop tests..."); std::ifstream s("testfiles/loop.cif"); LoopTestParser star_p(s); star_p.Parse(); @@ -358,15 +358,15 @@ BOOST_AUTO_TEST_CASE(star_loop) BOOST_CHECK_EQUAL(star_p.lines[4][0], "13"); BOOST_CHECK_EQUAL(star_p.lines[4][1], "14"); BOOST_CHECK_EQUAL(star_p.lines[4][2], "15"); - BOOST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" done."); } BOOST_AUTO_TEST_CASE(star_items_as_row) { - BOOST_MESSAGE(" Running star_items_as_row tests..."); + BOOST_TEST_MESSAGE(" Running star_items_as_row tests..."); std::ifstream s("testfiles/items-as-row.cif"); ItemsAsRowTestParser star_p(s); - BOOST_MESSAGE(" checking parsing abilities..."); + BOOST_TEST_MESSAGE(" checking parsing abilities..."); star_p.Parse(); BOOST_CHECK_EQUAL(star_p.s1, "a"); BOOST_CHECK_EQUAL(star_p.s2, "a b c"); @@ -385,8 +385,8 @@ BOOST_AUTO_TEST_CASE(star_items_as_row) BOOST_CHECK_EQUAL(star_p.s6, "1.22"); BOOST_CHECK_EQUAL(star_p.s7, "1.33"); BOOST_CHECK_EQUAL(star_p.s8, "1.44"); - BOOST_MESSAGE(" done."); - BOOST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" done."); } BOOST_AUTO_TEST_CASE(star_missing_data) @@ -454,7 +454,7 @@ BOOST_AUTO_TEST_CASE(star_loop_category_change_inplace) BOOST_AUTO_TEST_CASE(star_try_float_conversions) { - BOOST_MESSAGE(" Running star_try_float_conversions tests..."); + BOOST_TEST_MESSAGE(" Running star_try_float_conversions tests..."); std::ifstream s("testfiles/loop_category_change_inplace.cif"); DataItemTestParser star_p(s); StringRef data = StringRef("1.5", 3); @@ -462,12 +462,12 @@ BOOST_AUTO_TEST_CASE(star_try_float_conversions) data = StringRef("foo", 3); BOOST_CHECK_THROW(star_p.TryGetFloat(data, "negative float test"), IOException); - BOOST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" done."); } BOOST_AUTO_TEST_CASE(star_try_int_conversions) { - BOOST_MESSAGE(" Running star_try_int_conversions tests..."); + BOOST_TEST_MESSAGE(" Running star_try_int_conversions tests..."); std::ifstream s("testfiles/loop_category_change_inplace.cif"); DataItemTestParser star_p(s); StringRef data = StringRef("101", 3); @@ -475,12 +475,12 @@ BOOST_AUTO_TEST_CASE(star_try_int_conversions) data = StringRef("foo", 3); BOOST_CHECK_THROW(star_p.TryGetInt(data, "negative int test"), IOException); - BOOST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" done."); } BOOST_AUTO_TEST_CASE(star_try_bool_conversions) { - BOOST_MESSAGE(" Running star_try_bool_conversions tests..."); + BOOST_TEST_MESSAGE(" Running star_try_bool_conversions tests..."); std::ifstream s("testfiles/loop_category_change_inplace.cif"); DataItemTestParser star_p(s); StringRef data = StringRef("Y", 1); @@ -499,15 +499,15 @@ BOOST_AUTO_TEST_CASE(star_try_bool_conversions) BOOST_CHECK_THROW(star_p.TryGetInt(data, "negative bool test ("+data.str()+")"), IOException); - BOOST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" done."); } BOOST_AUTO_TEST_CASE(star_wrong_filename) { - BOOST_MESSAGE(" Running star_wrong_filename tests..."); + BOOST_TEST_MESSAGE(" Running star_wrong_filename tests..."); DataItemTestParser star_p("testfiles/doesnotexist.foo"); BOOST_CHECK_THROW(star_p.Parse(), IOException); - BOOST_MESSAGE(" done."); + BOOST_TEST_MESSAGE(" done."); } BOOST_AUTO_TEST_SUITE_END();