70 #include <boost/test/parameterized_test.hpp>
80 static void SetSubSource (objects::CBioSource& src, objects::CSubSource::TSubtype subtype,
string val)
83 if (src.IsSetSubtype()) {
84 objects::CBioSource::TSubtype::iterator it = src.SetSubtype().begin();
85 while (it != src.SetSubtype().end()) {
86 if ((*it)->IsSetSubtype() && (*it)->GetSubtype() == subtype) {
87 it = src.SetSubtype().erase(it);
98 src.SetSubtype().push_back(sub);
104 string sNameOfSubtype =
106 if( sNameOfSubtype.empty() ) {
113 BOOST_CHECK_EQUAL(eSubtype, eReverseSubtype);
123 TSubtypeSet subtypesExpectedToFail;
125 #ifdef ESUBTYPE_SHOULD_FAIL
126 # error ESUBTYPE_SHOULD_FAIL already defined
129 #define ESUBTYPE_SHOULD_FAIL(name) \
130 subtypesExpectedToFail.insert(CSeqFeatData::eSubtype_##name);
147 #undef ESUBTYPE_SHOULD_FAIL
156 if( subtypesExpectedToFail.find(eSubtype) ==
157 subtypesExpectedToFail.end() )
189 BOOST_CHECK_EQUAL(s->
GetName(),
"dioecious");
258 string degree =
"\xB0";
259 string to_fix =
"9.93" + degree +
"N and 78.12" + degree +
"E";
261 BOOST_CHECK_EQUAL(fixed,
"9.93 N 78.12 E");
263 to_fix =
"Lattitude: 25.790544; longitude: -80.214930";
265 BOOST_CHECK_EQUAL(fixed,
"25.790544 N 80.214930 W");
267 to_fix =
"34.1030555556 , -118.357777778 34 degrees 6' 11'' North , 118 degrees 21' 28'' West";
269 BOOST_CHECK_EQUAL(fixed,
"");
271 to_fix =
"0031.02 N 00.01E";
273 BOOST_CHECK_EQUAL(fixed,
"31.02 N 0.01 E");
275 to_fix =
"000.00 N 0.12 E";
277 BOOST_CHECK_EQUAL(fixed,
"0.00 N 0.12 E");
279 to_fix =
"0.0023 N 0 E";
281 BOOST_CHECK_EQUAL(fixed,
"0.0023 N 0 E");
283 to_fix =
"78.32 -0092.25";
285 BOOST_CHECK_EQUAL(fixed,
"78.32 N 92.25 W");
287 to_fix =
"-0008.34 0.85";
289 BOOST_CHECK_EQUAL(fixed,
"8.34 S 0.85 E");
291 to_fix =
"0.067682S_76.39885W";
293 BOOST_CHECK_EQUAL(fixed,
"0.067682 S 76.39885 W");
295 to_fix =
"34degrees 20' 13'' N,47degrees 03' 24''E";
297 BOOST_CHECK_EQUAL(fixed,
"34.3369 N 47.0567 E");
299 to_fix =
"34degrees 20' 13' N,47deg 03' 24' E";
301 BOOST_CHECK_EQUAL(fixed,
"34.3369 N 47.0567 E");
303 to_fix =
"8 degrees 28 'N & 77 degrees 41 'E";
305 BOOST_CHECK_EQUAL(fixed,
"8.47 N 77.68 E");
349 BOOST_CHECK_EQUAL(
CSubSource::FixLatLonFormat(
"37.918 degrees N latitude, 119.258 degrees W longitude",
true),
"37.918 N 119.258 W");
367 BOOST_CHECK_EQUAL(
CSubSource::FixLatLonFormat(
"N 16 degree 46 min 57 sec; E 99 degree 01 min 08 sec",
true),
"16.7825 N 99.0189 E");
368 BOOST_CHECK_EQUAL(
CSubSource::FixLatLonFormat(
"N 16 degree 30 min 16 sec, E 99 degree 09 min 40 sec",
true),
"16.5044 N 99.1611 E");
377 auth_list->
SetAffil().SetStd().SetAffil(
"Murdoch University");
378 auth_list->
SetAffil().SetStd().SetDiv(
"School of Veterinary and Life Sciences");
379 auth_list->
SetAffil().SetStd().SetCity(
"Murdoch");
380 auth_list->
SetAffil().SetStd().SetSub(
"Western Australia");
381 auth_list->
SetAffil().SetStd().SetCountry(
"Australia");
382 auth_list->
SetAffil().SetStd().SetStreet(
"90 South Street");
383 auth_list->
SetAffil().SetStd().SetPostal_code(
"6150");
385 auth1->
SetName().SetName().SetLast(
"Yang");
386 auth1->
SetName().SetName().SetFirst(
"Rongchang");
387 auth1->
SetName().SetName().SetInitials(
"R.");
388 auth_list->
SetNames().SetStd().push_back(auth1);
390 auth2->
SetName().SetName().SetLast(
"Ryan");
391 auth2->
SetName().SetName().SetFirst(
"Una");
392 auth2->
SetName().SetName().SetInitials(
"U.");
393 auth_list->
SetNames().SetStd().push_back(auth2);
400 if (auth_list.
SetNames().SetStd().size() == 0) {
402 auth->
SetName().SetName().SetLast(
"Last");
403 auth_list.
SetNames().SetStd().push_back(auth);
405 auth_list.
SetNames().SetStd().back()->SetName().SetName().SetFirst(
"Uan");
411 if (auth_list.
SetNames().SetStd().size() == 0) {
413 auth->
SetName().SetName().SetLast(
"Last");
414 auth_list.
SetNames().SetStd().push_back(auth);
416 auth_list.
SetNames().SetStd().back()->SetName().SetName().SetLast(
"Nyar");
423 switch (pub.
Which()) {
486 switch (pub.
Which()) {
522 t->SetName(
"a random title");
523 title.
Set().push_back(
t);
529 if (title.
Set().size() == 0) {
532 title.
Set().front()->SetName() +=
" plus";
539 t->SetJta(
"a random title");
540 title.
Set().push_back(
t);
546 if (title.
Set().size() == 0) {
549 title.
Set().front()->SetJta() +=
" plus";
554 switch (pub.
Which()) {
607 imp.
SetPub().SetStr(
"Publisher");
643 auth_list2->
Assign(*auth_list1);
646 BOOST_CHECK_EQUAL(auth_list1->
SameCitation(*auth_list2),
true);
650 BOOST_CHECK_EQUAL(auth_list1->
SameCitation(*auth_list2),
true);
654 BOOST_CHECK_EQUAL(auth_list1->
SameCitation(*auth_list2),
false);
663 j_title->SetJta(
"Experimental Parasitology");
664 jour->SetTitle().Set().push_back(j_title);
675 title->SetName(
"Isospora streperae n. sp. (Apicomplexa: Eimeriidae) from a Grey Currawong (Strepera versicolour plumbea) (Passeriformes: Artamidae) in Western Australia");
687 b_title->SetName(
"Book Title");
688 book->
SetTitle().Set().push_back(b_title);
700 title->SetName(
"Isospora streperae n. sp. (Apicomplexa: Eimeriidae) from a Grey Currawong (Strepera versicolour plumbea) (Passeriformes: Artamidae) in Western Australia");
934 eq1->
Set().push_back(pub);
945 eq2->
Set().push_back(pmid2);
955 eq1->
Set().push_back(pmid1);
960 #define CHECK_COMMON_FIELD(o1,o2,c,Field,val1,val2) \
961 o1->Set##Field(val1); \
962 o2->Reset##Field(); \
963 c = o1->MakeCommon(*o2); \
964 BOOST_CHECK_EQUAL(c->IsSet##Field(), false); \
965 o2->Set##Field(val2); \
966 c = o1->MakeCommon(*o2); \
967 BOOST_CHECK_EQUAL(c->IsSet##Field(), false); \
968 o2->Set##Field(val1); \
969 c = o1->MakeCommon(*o2); \
970 BOOST_CHECK_EQUAL(c->IsSet##Field(), true); \
971 BOOST_CHECK_EQUAL(c->Get##Field(), o1->Get##Field());
980 BOOST_ASSERT(
"common OrgName should not have been created");
986 BOOST_ASSERT(
"common OrgName should not have been created");
991 BOOST_ASSERT(
"common OrgName should not have been created");
995 BOOST_CHECK_EQUAL(common->
GetDiv(),
"bacteria");
1001 on1->
SetMod().push_back(m1);
1003 BOOST_CHECK_EQUAL(common->
IsSetMod(),
false);
1008 on2->
SetMod().push_back(m2);
1011 BOOST_CHECK_EQUAL(common->
IsSetMod(),
false);
1015 BOOST_CHECK_EQUAL(common->
IsSetMod(),
true);
1016 BOOST_CHECK_EQUAL(common->
GetMod().size(), 1);
1017 BOOST_CHECK_EQUAL(common->
GetMod().front()->Equals(*m2),
true);
1028 #define CHECK_COMMON_STRING_LIST(o1,o2,c,Field,val1,val2) \
1029 o1->Set##Field().push_back(val1); \
1030 c = o1->MakeCommon(*o2); \
1031 BOOST_CHECK_EQUAL(c->IsSet##Field(), false); \
1032 o2->Set##Field().push_back(val2); \
1033 c = o1->MakeCommon(*o2); \
1034 BOOST_CHECK_EQUAL(c->IsSet##Field(), false); \
1035 o2->Set##Field().push_back(val1); \
1036 c = o1->MakeCommon(*o2); \
1037 BOOST_CHECK_EQUAL(c->IsSet##Field(), true); \
1038 BOOST_CHECK_EQUAL(c->Get##Field().size(), 1); \
1039 BOOST_CHECK_EQUAL(c->Get##Field().front(), val1);
1047 BOOST_ASSERT(
"common OrgRef should not have been created");
1053 BOOST_ASSERT(
"common OrgRef should not have been created");
1076 BOOST_ASSERT(
"common BioSource should not have been created");
1101 BOOST_CHECK_EQUAL(common->
GetSubtype().size(), 1);
1102 BOOST_CHECK_EQUAL(common->
GetSubtype().front()->Equals(*s2),
true);
1150 src1->
SetOrg().SetOrgname().SetLineage(
"Viruses; ssDNA viruses; Nanoviridae; Nanovirus");
1219 ss->
SetName(
"a; [mixed bacterial source]; b");
1221 BOOST_CHECK_EQUAL(ss->
GetName(),
"a; b");
1222 ss->
SetName(
"[uncultured (using species-specific primers) bacterial source]");
1224 BOOST_CHECK_EQUAL(ss->
GetName(),
"amplified with species-specific primers");
1225 ss->
SetName(
"[BankIt_uncultured16S_wizard]; [universal primers]; [tgge]");
1227 BOOST_CHECK_EQUAL(ss->
IsSetName(),
false);
1228 ss->
SetName(
"[BankIt_uncultured16S_wizard]; [species_specific primers]; [dgge]");
1230 BOOST_CHECK_EQUAL(ss->
GetName(),
"amplified with species-specific primers");
1233 ss->
SetName(
"a; [mixed bacterial source]; b");
1236 BOOST_CHECK_EQUAL(ss->
GetName(),
"a; b");
1237 ss->
SetName(
"[BankIt_uncultured16S_wizard]; [universal primers]; [tgge]");
1241 ss->
SetName(
"[BankIt_uncultured16S_wizard]; [species_specific primers]; [dgge]");
1243 BOOST_CHECK_EQUAL(ss->
GetName(),
"[BankIt_uncultured16S_wizard]; [species_specific primers]; [dgge]");
1245 ss->
SetName(
"[BankIt_cultured16S_wizard]");
1274 BOOST_CHECK_EQUAL(msg,
"The International Cell Line Authentication Committee database indicates that 222 from Homo sapiens is known to be contaminated by PA1 from Human. Please see http://iclac.org/databases/cross-contaminations/ for more information and references.");
1277 BOOST_CHECK_EQUAL(msg,
"");
1280 BOOST_CHECK_EQUAL(msg,
"");
1283 BOOST_CHECK_EQUAL(msg,
"The International Cell Line Authentication Committee database indicates that ARO81-1 from Homo sapiens is known to be contaminated by HT-29 from Human. Please see http://iclac.org/databases/cross-contaminations/ for more information and references.");
1286 BOOST_CHECK_EQUAL(msg,
"The International Cell Line Authentication Committee database indicates that aRO81-1 from Homo sapiens is known to be contaminated by HT-29 from Human. Please see http://iclac.org/databases/cross-contaminations/ for more information and references.");
1289 BOOST_CHECK_EQUAL(msg,
"The International Cell Line Authentication Committee database indicates that IPRI-OL-7 from Orgyia leucostigma is known to be contaminated by IPRI-CF-124 from Choristoneura fumiferana. Please see http://iclac.org/databases/cross-contaminations/ for more information and references.");
1322 BOOST_CHECK_EQUAL(msg,
"The International Cell Line Authentication Committee database indicates that Yamada from Canis lupus familiaris is known to be contaminated by Unknown from Mouse. Please see http://iclac.org/databases/cross-contaminations/ for more information and references.");
1343 "Spain: Mediterranean, Malvarrosa Beach (Valencia)");
1351 "China: Guangdong Province, Guangzhou City, Tianlu Lake Forest Park");
1363 BOOST_CHECK_EQUAL(
ambig,
true);
1381 BOOST_CHECK_EQUAL(
ambig,
false);
1429 {
"1952-10-21T11:43Z",
"1952-10-21T11:43Z"},
1430 {
"1952-10-21T11Z",
"1952-10-21T11Z" },
1431 {
"1952-10-21",
"1952-10-21" },
1432 {
"1952-10",
"1952-10" },
1433 {
"1952/1953",
"1952/1953" },
1434 {
"1952-10-21/1953-02-15",
"1952-10-21/1953-02-15" },
1435 {
"1952-10/1953-02",
"1952-10/1953-02" },
1436 {
"1952-10-21T11:43Z/1952-10-21T17:43Z",
1437 "1952-10-21T11:43Z/1952-10-21T17:43Z"},
1441 {
"21-Oct-1952",
"21-Oct-1952" },
1442 {
"Oct-1952",
"Oct-1952" },
1443 {
"21-Oct-1952/15-Feb-1953",
"21-Oct-1952/15-Feb-1953" },
1444 {
"Oct-1952/Feb-1953",
"Oct-1952/Feb-1953" },
1447 {
"1-1-1952",
"01-Jan-1952" },
1448 {
"1-1-1952/2-2-1952",
"01-Jan-1952/02-Feb-1952" }
1452 const string fixed_date =
1454 const string expected_date(
1455 kGoodCollectionDates[idx].expected_result);
1456 BOOST_CHECK_EQUAL(fixed_date, expected_date);
1459 bool bad_format =
false;
1460 bool in_future =
false;
1462 fixed_date, bad_format, in_future);
1463 BOOST_CHECK_MESSAGE( ! bad_format, fixed_date );
1464 BOOST_CHECK_MESSAGE( ! in_future, fixed_date );
1468 BOOST_CHECK_MESSAGE(
1473 vector<string> date_pieces_strs;
1476 ITERATE( vector<string>, date_piece_ci, date_pieces_strs ) {
1477 const string & date_piece_str = *date_piece_ci;
1481 BOOST_CHECK_MESSAGE(
1484 BOOST_CHECK_MESSAGE(
1495 BOOST_CHECK_EQUAL(
rna->GetRnaProductName(),
kEmptyStr);
1497 string product(
"mRNA product");
1498 rna->SetExt().SetName(product);
1499 BOOST_CHECK_EQUAL(
rna->GetRnaProductName(), product);
1503 rna->SetExt().SetGen(*rna_gen);
1504 BOOST_CHECK_EQUAL(
rna->GetRnaProductName(),
kEmptyStr);
1506 product.assign(
"miscRNA product");
1507 rna_gen->SetProduct(product);
1508 BOOST_CHECK_EQUAL(
rna->GetRnaProductName(), product);
1512 BOOST_CHECK_EQUAL(
rna->GetRnaProductName(), product);
1515 product.assign(
"tRNA-Ser");
1516 rna->SetExt().SetTRNA().SetAa().SetNcbieaa(83);
1517 BOOST_CHECK_EQUAL(
rna->GetRnaProductName(), product);
1520 BOOST_CHECK_EQUAL(
rna->GetRnaProductName(), product);
1522 product.assign(
"tRNA-Met");
1524 rna->SetExt().SetTRNA().SetAa().SetIupacaa(77);
1525 BOOST_CHECK_EQUAL(
rna->GetRnaProductName(), product);
1527 product.assign(
"tRNA-OTHER");
1528 rna->SetExt().SetTRNA().SetAa().SetIupacaa(88);
1529 BOOST_CHECK_EQUAL(
rna->GetRnaProductName(), product);
1531 rna->SetExt().SetTRNA().SetAa().SetNcbieaa(88);
1532 BOOST_CHECK_EQUAL(
rna->GetRnaProductName(), product);
1534 product.assign(
"tRNA-TERM");
1535 rna->SetExt().SetTRNA().SetAa().SetNcbieaa(42);
1536 BOOST_CHECK_EQUAL(
rna->GetRnaProductName(), product);
1538 rna->SetExt().SetTRNA().SetAa().SetIupacaa(42);
1539 BOOST_CHECK_EQUAL(
rna->GetRnaProductName(), product);
1542 rna->SetExt().SetTRNA().SetAa().SetIupacaa(43);
1543 BOOST_CHECK_EQUAL(
rna->GetRnaProductName(), product);
1551 string product(
"mRNA product");
1553 rna->SetRnaProductName(product, remainder);
1554 BOOST_CHECK_EQUAL(
rna->IsSetExt(),
true);
1555 BOOST_CHECK_EQUAL(
rna->GetExt().GetName(), product);
1556 BOOST_CHECK_EQUAL(remainder,
kEmptyStr);
1559 rna->SetRnaProductName(product, remainder);
1560 BOOST_CHECK_EQUAL(
rna->IsSetExt(),
false);
1561 BOOST_CHECK_EQUAL(remainder,
kEmptyStr);
1563 product.assign(
"rRNA product");
1565 rna->SetRnaProductName(product, remainder);
1566 BOOST_CHECK_EQUAL(
rna->IsSetExt(),
true);
1567 BOOST_CHECK_EQUAL(
rna->GetExt().GetName(), product);
1568 BOOST_CHECK_EQUAL(remainder,
kEmptyStr);
1571 rna->SetRnaProductName(product, remainder);
1572 BOOST_CHECK_EQUAL(
rna->IsSetExt(),
false);
1573 BOOST_CHECK_EQUAL(remainder,
kEmptyStr);
1575 product.assign(
"miscRNA product");
1577 rna->SetRnaProductName(product, remainder);
1578 BOOST_CHECK_EQUAL(
rna->IsSetExt(),
true);
1579 BOOST_CHECK_EQUAL(
rna->GetExt().GetGen().GetProduct(), product);
1580 BOOST_CHECK_EQUAL(remainder,
kEmptyStr);
1583 rna->SetRnaProductName(product, remainder);
1584 BOOST_CHECK_EQUAL(
rna->IsSetExt(),
false);
1585 BOOST_CHECK_EQUAL(remainder,
kEmptyStr);
1588 product.assign(
"tRNA_Ala");
1590 rna->SetRnaProductName(product, remainder);
1591 BOOST_CHECK_EQUAL(
rna->GetExt().IsTRNA(),
true);
1592 BOOST_CHECK_EQUAL(
rna->GetExt().GetTRNA().IsSetAa(),
false);
1593 BOOST_CHECK_EQUAL(remainder, product);
1596 product.assign(
"TRNA-Ala");
1597 rna->SetRnaProductName(product, remainder);
1598 BOOST_CHECK_EQUAL(
rna->GetExt().IsTRNA(),
true);
1599 BOOST_CHECK_EQUAL(
rna->GetExt().GetTRNA().IsSetAa(),
false);
1600 BOOST_CHECK_EQUAL(remainder, product);
1602 product.assign(
"tRNA-Ala");
1603 rna->SetRnaProductName(product, remainder);
1604 BOOST_CHECK_EQUAL(
rna->GetExt().GetTRNA().IsSetAa(),
true);
1605 BOOST_CHECK_EQUAL(
rna->GetExt().GetTRNA().GetAa().GetNcbieaa(), 65);
1606 BOOST_CHECK_EQUAL(remainder,
kEmptyStr);
1609 rna->SetRnaProductName(product, remainder);
1610 BOOST_CHECK_EQUAL(
rna->IsSetExt(),
true);
1611 BOOST_CHECK_EQUAL(
rna->GetExt().GetTRNA().IsSetAa(),
false);
1612 BOOST_CHECK_EQUAL(
rna->GetRnaProductName(),
kEmptyStr);
1613 BOOST_CHECK_EQUAL(remainder,
kEmptyStr);
1615 product.assign(
"Ser");
1616 rna->SetRnaProductName(product, remainder);
1617 BOOST_CHECK_EQUAL(
rna->GetExt().IsTRNA(),
true);
1618 BOOST_CHECK_EQUAL(
rna->GetExt().GetTRNA().GetAa().GetNcbieaa(), 83);
1619 BOOST_CHECK_EQUAL(remainder,
kEmptyStr);
1621 product.assign(
"TERM");
1622 rna->SetRnaProductName(product, remainder);
1623 BOOST_CHECK_EQUAL(
rna->GetExt().IsTRNA(),
true);
1624 BOOST_CHECK_EQUAL(
rna->GetExt().GetTRNA().GetAa().GetNcbieaa(), 42);
1625 BOOST_CHECK_EQUAL(remainder,
kEmptyStr);
1627 product.assign(
"tRNA-other");
1628 rna->SetRnaProductName(product, remainder);
1629 BOOST_CHECK_EQUAL(
rna->GetExt().IsTRNA(),
true);
1630 BOOST_CHECK_EQUAL(
rna->GetExt().GetTRNA().GetAa().GetNcbieaa(), 88);
1631 BOOST_CHECK_EQUAL(remainder,
kEmptyStr);
1634 product.assign(
"tRNA-A(gct)");
1635 rna->SetRnaProductName(product, remainder);
1636 BOOST_CHECK_EQUAL(
rna->GetExt().IsTRNA(),
true);
1637 BOOST_CHECK_EQUAL(
rna->GetExt().GetTRNA().GetAa().GetNcbieaa(), 65);
1638 BOOST_CHECK_EQUAL(remainder,
kEmptyStr);
1640 product.assign(
"tRNA-*(gct)");
1641 rna->SetRnaProductName(product, remainder);
1642 BOOST_CHECK_EQUAL(
rna->GetExt().IsTRNA(),
true);
1643 BOOST_CHECK_EQUAL(
rna->GetExt().GetTRNA().GetAa().GetNcbieaa(), 42);
1644 BOOST_CHECK_EQUAL(remainder,
kEmptyStr);
1670 BOOST_CHECK_EQUAL(obj->
GetData().front()->GetLabel().GetStr(),
"BaseModification-FileTrackURL");
1671 BOOST_CHECK_EQUAL(obj->
GetData().front()->GetData().GetStr(),
"https://submit.ncbi.nlm.nih.gov/ft/byid/7azalbch/brev2_motif_summary.csv");
1680 src->
SetOrg().SetTaxname(
"uncultured x");
1686 src->
SetOrg().SetTaxname(
"Homo sapiens");
1694 src->
SetOrg().SetOrgname().SetDiv(
"ENV");
1700 src->
SetOrg().SetOrgname().ResetDiv();
1701 src->
SetOrg().SetOrgname().SetLineage(
"metagenomes");
1708 src->
SetOrg().SetOrgname().ResetLineage();
1736 BOOST_CHECK_EQUAL(
om->RemoveAbbreviation(),
true);
1737 BOOST_CHECK_EQUAL(
om->GetSubname(),
"x");
1750 src->
SetOrg().SetOrgname().SetLineage(
"Viruses; foo");
1753 src->
SetOrg().SetOrgname().SetLineage(
"Bacteria; foo");
1756 src->
SetOrg().SetOrgname().SetLineage(
"Archaea; foo");
1759 src->
SetOrg().SetOrgname().SetLineage(
"Eukaryota; Fungi; foo");
1762 src->
SetOrg().SetOrgname().SetLineage(
"Eukaryota; Metazoa; foo");
1765 src->
SetOrg().SetOrgname().SetLineage(
"Eukaryota; Viridiplantae; Streptophyta; Embryophyta; foo");
1768 src->
SetOrg().SetOrgname().SetLineage(
"Eukaryota; Rhodophyta; foo");
1771 src->
SetOrg().SetOrgname().SetLineage(
"Eukaryota; stramenopiles; Phaeophyceae; foo");
1778 BOOST_CHECK_EQUAL(src->
GetSubtype().size(), 1);
1782 BOOST_CHECK_EQUAL(src->
GetSubtype().size(), 1);
1790 src->
SetOrg().SetOrgname().SetLineage(
"Viruses; foo");
1814 src->
SetOrg().SetOrgname().SetLineage(
"Viruses; foo");
1854 BOOST_ASSERT(recomb_values.
find(
"chromosome_breakpoint") != recomb_values.
end());
1857 string old_recomb_value(
"meiotic_recombination");
1859 BOOST_CHECK_EQUAL(old_recomb_value,
"meiotic");
1861 old_recomb_value = (
"other:non_allelic_homologous_recombination");
1863 BOOST_CHECK_EQUAL(old_recomb_value,
"non_allelic_homologous");
1865 string valid_recomb_value(
"mitotic");
1867 BOOST_CHECK_EQUAL(valid_recomb_value,
"mitotic");
1880 src.
SetOrg().SetOrgname().SetLineage(
"viruses");
1883 src.
SetOrg().SetOrgname().SetLineage(
"viroids");
1886 src.
SetOrg().SetOrgname().ResetLineage();
1957 string taxname =
"Zea mays";
1961 BOOST_CHECK_EQUAL(
"", taxname);
1964 BOOST_CHECK_EQUAL(
lookup->GetTaxname(), taxname);
1965 BOOST_CHECK_EQUAL(
lookup->GetOrgname().GetDiv(),
"PLN");
1986 string voucher_type;
1987 bool is_miscapitalized;
1990 bool erroneous_country;
1991 string inst_code =
"ARBH";
1993 BOOST_CHECK_EQUAL(voucher_type,
"s");
1994 BOOST_CHECK_EQUAL(is_miscapitalized,
false);
1995 BOOST_CHECK_EQUAL(correct_cap,
"ARBH");
1996 BOOST_CHECK_EQUAL(needs_country,
false);
1997 BOOST_CHECK_EQUAL(erroneous_country,
false);
2001 BOOST_CHECK_EQUAL(voucher_type,
"sb");
2002 BOOST_CHECK_EQUAL(is_miscapitalized,
false);
2003 BOOST_CHECK_EQUAL(correct_cap,
"NMNH");
2004 BOOST_CHECK_EQUAL(needs_country,
false);
2005 BOOST_CHECK_EQUAL(erroneous_country,
false);
2009 BOOST_CHECK_EQUAL(voucher_type,
"s");
2010 BOOST_CHECK_EQUAL(is_miscapitalized,
false);
2011 BOOST_CHECK_EQUAL(correct_cap,
"ZMM");
2012 BOOST_CHECK_EQUAL(needs_country,
false);
2013 BOOST_CHECK_EQUAL(erroneous_country,
false);
2017 BOOST_CHECK_EQUAL(voucher_type,
"s");
2018 BOOST_CHECK_EQUAL(is_miscapitalized,
false);
2019 BOOST_CHECK_EQUAL(correct_cap,
"ZMUM");
2020 BOOST_CHECK_EQUAL(needs_country,
false);
2021 BOOST_CHECK_EQUAL(erroneous_country,
false);
2057 string val =
"p-element";
2059 BOOST_CHECK_EQUAL(
val,
"P-element");
2065 string val =
"Exon";
2067 BOOST_CHECK_EQUAL(
val,
"exon");
2090 BOOST_CHECK_EQUAL(hour, 11);
2091 BOOST_CHECK_EQUAL(
min, 13);
2092 BOOST_CHECK_EQUAL(sec, 0);
2097 BOOST_CHECK_EQUAL(hour, 11);
2098 BOOST_CHECK_EQUAL(
min, 13);
2099 BOOST_CHECK_EQUAL(sec, 0);
2109 BOOST_CHECK_EQUAL(user->
GetType().
GetStr(),
"RefGeneTracking");
2118 BOOST_CHECK_EQUAL(user->
GetData().back()->GetLabel().GetStr(),
"Status");
2119 BOOST_CHECK_EQUAL(user->
GetData().back()->GetData().GetStr(),
"PIPELINE");
2122 BOOST_CHECK_EQUAL(user->
GetData().back()->GetLabel().GetStr(),
"Status");
2123 BOOST_CHECK_EQUAL(user->
GetData().back()->GetData().GetStr(),
"INFERRED");
2124 BOOST_CHECK_EQUAL(user->
GetData().size(), 1);
2131 BOOST_CHECK_EQUAL(user->
GetData().back()->GetLabel().GetStr(),
"GenomicSource");
2132 BOOST_CHECK_EQUAL(user->
GetData().back()->GetData().GetStr(),
"XXX");
2136 BOOST_CHECK_EQUAL(user->
GetData().back()->GetLabel().GetStr(),
"GenomicSource");
2137 BOOST_CHECK_EQUAL(user->
GetData().back()->GetData().GetStr(),
"XXX2");
2139 BOOST_CHECK_EQUAL(user->
GetData().size(), 2);
2146 BOOST_CHECK_EQUAL(user->
GetData().back()->GetLabel().GetStr(),
"Collaborator");
2147 BOOST_CHECK_EQUAL(user->
GetData().back()->GetData().GetStr(),
"YYY");
2150 BOOST_CHECK_EQUAL(user->
GetData().back()->GetLabel().GetStr(),
"Collaborator");
2151 BOOST_CHECK_EQUAL(user->
GetData().back()->GetData().GetStr(),
"YYY2");
2154 BOOST_CHECK_EQUAL(user->
GetData().size(), 3);
2161 BOOST_CHECK_EQUAL(user->
GetData().back()->GetLabel().GetStr(),
"CollaboratorURL");
2162 BOOST_CHECK_EQUAL(user->
GetData().back()->GetData().GetStr(),
"ZZZ");
2166 BOOST_CHECK_EQUAL(user->
GetData().size(), 4);
2171 BOOST_CHECK_EQUAL(user->
GetData().back()->GetLabel().GetStr(),
"Generated");
2172 BOOST_CHECK_EQUAL(user->
GetData().back()->GetData().GetBool(),
true);
2178 BOOST_CHECK_EQUAL(user->
GetData().size(), 5);
2186 BOOST_CHECK_EQUAL(r_ident->GetAccession(),
"AY12345");
2187 BOOST_CHECK_EQUAL(user->
GetData().size(), 6);
2190 vector<CConstRef<CUser_object::CRefGeneTrackingAccession> > assembly;
2193 (
"XXX",
GI_CONST(123), 0, 100,
"comment1",
"name1")));
2196 (
"YYY",
GI_CONST(124), 10, 1100,
"comment2",
"name2")));
2198 BOOST_CHECK_EQUAL(user->
GetData().size(), 7);
2201 BOOST_CHECK_EQUAL(r_assembly.size(), 2);
2202 BOOST_CHECK_EQUAL(r_assembly.front()->GetAccession(),
"XXX");
2203 BOOST_CHECK_EQUAL(r_assembly.front()->GetGI(),
GI_CONST(123));
2204 BOOST_CHECK_EQUAL(r_assembly.front()->GetFrom(), 0);
2205 BOOST_CHECK_EQUAL(r_assembly.front()->GetTo(), 100);
2206 BOOST_CHECK_EQUAL(r_assembly.front()->GetName(),
"name1");
2207 BOOST_CHECK_EQUAL(r_assembly.front()->GetComment(),
"comment1");
2208 BOOST_CHECK_EQUAL(r_assembly.back()->GetAccession(),
"YYY");
2209 BOOST_CHECK_EQUAL(r_assembly.back()->GetGI(),
GI_CONST(124));
2210 BOOST_CHECK_EQUAL(r_assembly.back()->GetFrom(), 10);
2211 BOOST_CHECK_EQUAL(r_assembly.back()->GetTo(), 1100);
2212 BOOST_CHECK_EQUAL(r_assembly.back()->GetName(),
"name2");
2213 BOOST_CHECK_EQUAL(r_assembly.back()->GetComment(),
"comment2");
2217 BOOST_CHECK_EQUAL(user->
GetData().size(), 6);
2220 BOOST_CHECK_EQUAL(user->
GetData().size(), 5);
2223 BOOST_CHECK_EQUAL(user->
GetData().size(), 4);
2226 BOOST_CHECK_EQUAL(user->
GetData().size(), 3);
2229 BOOST_CHECK_EQUAL(user->
GetData().size(), 2);
2232 BOOST_CHECK_EQUAL(user->
GetData().size(), 1);
2235 BOOST_CHECK_EQUAL(user->
GetData().size(), 0);
2352 const size_t numExpectedQuals = 138;
2355 BOOST_CHECK_EQUAL(all_quals.size(), numExpectedQuals);
2356 for (
auto b : all_quals)
2358 BOOST_CHECK_EQUAL(count, numExpectedQuals);
2361 BOOST_CHECK_EQUAL(empty_quals.size(), 0);
2363 for (
auto b : empty_quals)
2365 BOOST_CHECK_EQUAL(count, 0);
2369 for (
auto rec: mandatory)
2371 std::cout << rec << std::endl;
2379 BOOST_CHECK_EQUAL(test1.second,
"host");
2382 BOOST_CHECK_EQUAL(
test2.second,
"host");
2385 BOOST_CHECK_EQUAL(test3.second,
"specific_host");
2388 BOOST_CHECK_EQUAL(test4.second,
"specific_host");
2391 BOOST_CHECK_EQUAL(test5,
"host");
2396 size_t orig_size =
orig.size();
2397 BOOST_CHECK(orig_size == 2);
2398 std::vector<CSeqFeatData::EQualifier> mandatory =
orig;
2401 ERASE_ITERATE(std::vector<CSeqFeatData::EQualifier>, it, mandatory) {
2402 if (*it == not_mandatory) {
2408 BOOST_CHECK(mandatory.size() == 1);
2410 auto mandatory_copy =
orig;
2411 bool res2 = mandatory_copy.reset(not_mandatory);
2412 BOOST_CHECK(res == res2);
2413 BOOST_CHECK(mandatory_copy.size() == 1);
2415 bool res3 = mandatory_copy.set(not_mandatory);
2416 BOOST_CHECK(res != res3);
2417 BOOST_CHECK(mandatory_copy.size() == 2);
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
static int lookup(const char *name, const struct lookup_int *table)
@Auth_list.hpp User-defined methods of the data storage class.
bool SameCitation(const CAuth_list &other) const
bool FixEnvironmentalSample()
string GetRepliconName(void) const
static bool ShouldIgnoreConflict(const string &label, string src_val, string sample_val, bool is_local_copy=false)
static bool AllowSexQualifier(const string &lineage)
void RemoveCultureNotes(bool is_species_level=true)
string GetBioprojectLocation(void) const
bool FixSexMatingTypeInconsistencies()
CRef< CBioSource > MakeCommon(const CBioSource &other) const
static bool AllowMatingTypeQualifier(const string &lineage)
bool FixGenomeForQualifiers()
string GetBioprojectType(void) const
bool RemoveUnexpectedViralQualifiers()
static string CountryFixupItem(const string &input, bool capitalize_after_colon)
static bool IsLegalMobileElementValue(const string &val)
static bool IsIllegalQualName(const string &val)
static bool FixRecombinationClassValue(string &val)
static string CleanupAndRepairInference(const string &orig_inference)
static bool FixMobileElementValue(string &val)
static const TLegalRecombinationClassSet & GetSetOfLegalRecombinationClassValues(void)
@OrgMod.hpp User-defined methods of the data storage class.
static string FixCapitalization(TSubtype subtype, const string &value)
static bool IsINSDCValidTypeMaterial(const string &type_material)
static bool IsInstitutionCodeValid(const string &inst_coll, string &voucher_type, bool &is_miscapitalized, string &correct_cap, bool &needs_country, bool &erroneous_country)
static bool IsDiscouraged(const TSubtype stype, bool indexer=false)
static string FixHost(const string &value)
bool RemoveAbbreviation()
static bool IsValidTypeMaterial(const string &type_material)
static string FixHostCapitalization(const string &value)
static string FixStrain(const string &strain)
CRef< COrgName > MakeCommon(const COrgName &other) const
static CConstRef< COrg_ref > TableLookup(const string &taxname)
TTaxId SetTaxId(TTaxId tax_id)
CRef< COrg_ref > MakeCommon(const COrg_ref &other) const
static bool IsECNumberSplit(const string &old_ecno)
static bool IsValidECNumberFormat(const string &ecno)
Verify correct form of EC number.
bool SameCitation(const CPub_equiv &other) const
bool SameCitation(const CPub &other) const
static vector< string > GetncRNAClassList()
bool IsLegalClass() const
@RNA_ref.hpp User-defined methods of the data storage class.
static const string & GetRegulatoryClass(ESubtype subtype)
bool IsLegalQualifier(EQualifier qual) const
Test wheather a certain qualifier is legal for the feature.
static bool IsDiscouragedQual(EQualifier qual)
static EFeatureLocationAllowed AllowedFeatureLocation(ESubtype subtype)
EQualifier
List of available qualifiers for feature keys.
@ eQual_recombination_class
@ eFeatureLocationAllowed_NucOnly
@ eFeatureLocationAllowed_Error
@ eFeatureLocationAllowed_ProtOnly
@ eFeatureLocationAllowed_Any
static bool ProhibitXref(CSeqFeatData::ESubtype subtype1, CSeqFeatData::ESubtype subtype2)
const TLegalQualifiers & GetLegalQualifiers(void) const
Get a list of all the legal qualifiers for the feature.
const TQualifiers & GetMandatoryQualifiers(void) const
Get the list of all mandatory qualifiers for the feature.
static bool IsDiscouragedSubtype(ESubtype subtype)
static std::pair< EQualifier, CTempString > GetQualifierTypeAndValue(CTempString qual)
static bool FixImportKey(string &key)
@ eSubtype_bad
These no longer need to match the FEATDEF values in the C toolkit's objfdef.h.
@ eSubtype_mat_peptide_aa
static CTempString GetQualifierAsString(EQualifier qual)
Convert a qualifier from an enumerated value to a string representation or empty if not found.
static ESubtype SubtypeNameToValue(CTempString sName)
Turn a string into its ESubtype which is NOT necessarily related to the identifier of the enum.
static CTempString SubtypeValueToName(ESubtype eSubtype)
Turns a ESubtype into its string value which is NOT necessarily related to the identifier of the enum...
static bool IsRegulatory(ESubtype subtype)
static bool AllowXref(CSeqFeatData::ESubtype subtype1, CSeqFeatData::ESubtype subtype2)
const_iterator find(const key_type &key) const
Return a const_iterator pointing to the specified element, or to the end if the element is not found.
const_iterator end() const
Return the end of the controlled sequence.
static string FixCapitalization(TSubtype subtype, const string &value)
static string GetCollectionDateProblem(const string &date_string)
static string FixTissueTypeCapitalization(const string &value)
static bool IsISOFormatTime(const string &orig_time, int &hour, int &min, int &sec, bool require_time_zone=true)
static string FixLatLonFormat(string orig_lat_lon, bool guess=false)
static string FixIsolationSourceCapitalization(const string &value)
static string FixCellTypeCapitalization(const string &value)
static string FixDateFormat(const string &orig_date)
Attempt to fix the format of the date Returns a blank if the format of the date cannot be determined.
static string CheckCellLine(const string &cell_line, const string &organism)
static CRef< CDate > DateFromCollectionDate(const string &str) THROWS((CException))
static string FixDevStageCapitalization(const string &value)
static string FixAltitude(const string &value)
static void RemoveCultureNotes(string &value, bool is_species_level=true)
static void IsCorrectDateFormat(const string &date_string, bool &bad_format, bool &in_future)
const string & GetRefGeneTrackingCollaborator() const
void SetObjectType(EObjectType obj_type)
void ResetRefGeneTrackingAssembly()
void ResetRefGeneTrackingStatus()
void RemoveUnverifiedFeature()
void AddUnverifiedOrganism()
void SetRefGeneTrackingCollaboratorURL(const string &collaborator_url)
const string & GetRefGeneTrackingCollaboratorURL() const
void AddUnverifiedContaminant()
@ eRefGeneTrackingStatus_INFERRED
@ eRefGeneTrackingStatus_NotSet
@ eRefGeneTrackingStatus_PIPELINE
void ResetRefGeneTrackingCollaboratorURL()
bool IsRefGeneTracking() const
void SetRefGeneTrackingAssembly(const TRefGeneTrackingAccessions &acc_list)
void ResetRefGeneTrackingGenerated()
void RemoveUnverifiedMisassembled()
void ResetRefGeneTrackingGenomicSource()
bool IsSetRefGeneTrackingIdenticalTo() const
bool IsSetRefGeneTrackingGenomicSource() const
void SetRefGeneTrackingStatus(ERefGeneTrackingStatus status)
void RemoveUnverifiedContaminant()
void SetRefGeneTrackingCollaborator(const string &collaborator)
void SetRefGeneTrackingIdenticalTo(const CRefGeneTrackingAccession &accession)
void SetRefGeneTrackingGenomicSource(const string &genomic_source)
@ eObjectType_RefGeneTracking
bool IsUnverifiedMisassembled() const
bool IsSetRefGeneTrackingCollaboratorURL() const
void SetRefGeneTrackingGenerated(bool val=true)
void SetFileTrackUploadId(const string &upload_id)
vector< CConstRef< CRefGeneTrackingAccession > > TRefGeneTrackingAccessions
const string & GetRefGeneTrackingGenomicSource() const
bool IsSetRefGeneTrackingStatus() const
bool IsUnverifiedOrganism() const
bool GetRefGeneTrackingGenerated() const
void ResetRefGeneTrackingCollaborator()
ERefGeneTrackingStatus GetRefGeneTrackingStatus() const
bool IsUnverifiedContaminant() const
TRefGeneTrackingAccessions GetRefGeneTrackingAssembly() const
bool IsUnverifiedFeature() const
bool IsUnverified() const
void RemoveUnverifiedOrganism()
void AddUnverifiedMisassembled()
CConstRef< CRefGeneTrackingAccession > GetRefGeneTrackingIdenticalTo() const
bool IsSetRefGeneTrackingCollaborator() const
void ResetRefGeneTrackingIdenticalTo()
EObjectType GetObjectType() const
void AddUnverifiedFeature()
#define ITERATE_0_IDX(idx, up_to)
idx loops from 0 (inclusive) to up_to (exclusive)
constexpr size_t ArraySize(const Element(&)[Size])
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define ERASE_ITERATE(Type, Var, Cont)
Non-constant version with ability to erase current element, if container permits.
#define VECTOR_ERASE(Var, Cont)
Use this macro inside body of ERASE_ITERATE cycle to erase from vector-like container.
#define ENTREZ_ID_FROM(T, value)
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Set object to copy of another one.
static bool IsValidLocalID(const CTempString &s)
Perform rudimentary validation on potential local IDs, whose contents should be pure ASCII and limite...
void Reset(void)
Reset reference object.
static list< string > & Split(const CTempString str, const CTempString delim, list< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL)
Split a string using specified delimiters.
static bool IsBlank(const CTempString str, SIZE_TYPE pos=0)
Check if a string is blank (has no text).
static bool EqualNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive equality of a substring with another string.
void SetBook(TBook &value)
Assign a value to Book data member.
void SetIssue(const TIssue &value)
Assign a value to Issue data member.
void SetTitle(TTitle &value)
Assign a value to Title data member.
const TFrom & GetFrom(void) const
Get the From member data.
void SetJournal(TJournal &value)
Assign a value to Journal data member.
void SetImp(TImp &value)
Assign a value to Imp data member.
void SetTitle(TTitle &value)
Assign a value to Title data member.
void SetName(TName &value)
Assign a value to Name data member.
void SetFrom(TFrom &value)
Assign a value to From data member.
void SetAffil(TAffil &value)
Assign a value to Affil data member.
bool IsSetFrom(void) const
Check if a value has been assigned to From data member.
void SetAuthors(TAuthors &value)
Assign a value to Authors data member.
void SetSerial_number(TSerial_number value)
Assign a value to Serial_number data member.
void SetPages(const TPages &value)
Assign a value to Pages data member.
void SetDate(TDate &value)
Assign a value to Date data member.
void SetAuthors(TAuthors &value)
Assign a value to Authors data member.
void SetPub(TPub &value)
Assign a value to Pub data member.
void SetTitle(TTitle &value)
Assign a value to Title data member.
void SetImp(TImp &value)
Assign a value to Imp data member.
void SetCit(TCit &value)
Assign a value to Cit data member.
void SetCit(const TCit &value)
Assign a value to Cit data member.
void SetVolume(const TVolume &value)
Assign a value to Volume data member.
void SetNames(TNames &value)
Assign a value to Names data member.
void SetAuthors(TAuthors &value)
Assign a value to Authors data member.
void SetDate(TDate &value)
Assign a value to Date data member.
void SetVolume(const TVolume &value)
Assign a value to Volume data member.
void SetTitle(const TTitle &value)
Assign a value to Title data member.
void SetMuid(TMuid value)
Assign a value to Muid data member.
bool IsBook(void) const
Check if variant Book is selected.
bool IsJournal(void) const
Check if variant Journal is selected.
void SetPrepub(TPrepub value)
Assign a value to Prepub data member.
void SetImp(TImp &value)
Assign a value to Imp data member.
void SetAuthors(TAuthors &value)
Assign a value to Authors data member.
Tdata & Set(void)
Assign a value to data member.
@ ePrepub_in_press
accepted, not published
@ ePrepub_submitted
submitted, not accepted
const TSubtype & GetSubtype(void) const
Get the Subtype member data.
TGenome GetGenome(void) const
Get the Genome member data.
void ResetGenome(void)
Reset Genome data member.
void SetSubtype(TSubtype value)
Assign a value to Subtype data member.
bool IsSetSubtype(void) const
Check if a value has been assigned to Subtype data member.
const TOrg & GetOrg(void) const
Get the Org member data.
void SetGenome(TGenome value)
Assign a value to Genome data member.
void SetOrg(TOrg &value)
Assign a value to Org data member.
void SetName(const TName &value)
Assign a value to Name data member.
const TName & GetName(void) const
Get the Name member data.
EGenome
biological context
bool IsSetName(void) const
Check if a value has been assigned to Name data member.
TSubtype & SetSubtype(void)
Assign a value to Subtype data member.
void ResetSubtype(void)
Reset Subtype data member.
@ eSubtype_insertion_seq_name
@ eSubtype_environmental_sample
@ eSubtype_endogenous_virus_name
@ eOrigin_mut
artificially mutagenized
@ eOrigin_artificial
artificially engineered
@ eGenome_endogenous_virus
@ eGenome_plasmid_in_mitochondrion
@ eGenome_plasmid_in_plastid
void SetYear(TYear value)
Assign a value to Year data member.
TStd & SetStd(void)
Select the variant.
const TStr & GetStr(void) const
Get the variant data.
const TData & GetData(void) const
Get the Data member data.
const TType & GetType(void) const
Get the Type member data.
const TMod & GetMod(void) const
Get the Mod member data.
const TDiv & GetDiv(void) const
Get the Div member data.
const TSubname & GetSubname(void) const
Get the Subname member data.
void SetDiv(const TDiv &value)
Assign a value to Div data member.
void SetSubtype(TSubtype value)
Assign a value to Subtype data member.
bool IsSetMod(void) const
Check if a value has been assigned to Mod data member.
bool IsSetTaxname(void) const
preferred formal name Check if a value has been assigned to Taxname data member.
TMod & SetMod(void)
Assign a value to Mod data member.
void SetSubname(const TSubname &value)
Assign a value to Subname data member.
const TOrgname & GetOrgname(void) const
Get the Orgname member data.
@ eSubtype_nat_host
natural host of this specimen
@ eSubtype_metagenome_source
@ eSubtype_specimen_voucher
TProc & SetProc(void)
Select the variant.
TPmid & SetPmid(void)
Select the variant.
TBook & SetBook(void)
Select the variant.
Tdata & Set(void)
Assign a value to data member.
const TArticle & GetArticle(void) const
Get the variant data.
E_Choice Which(void) const
Which variant is currently selected.
TMan & SetMan(void)
Select the variant.
TSub & SetSub(void)
Select the variant.
TGen & SetGen(void)
Select the variant.
TJournal & SetJournal(void)
Select the variant.
TArticle & SetArticle(void)
Select the variant.
bool IsGen(void) const
Check if variant Gen is selected.
@ e_Gen
general or generic unparsed
@ e_Proc
proceedings of a meeting
@ e_Man
manuscript, thesis, or letter
@ eType_ncRNA
non-coding RNA; subsumes snRNA, scRNA, snoRNA
where boath are integers</td > n< td ></td > n</tr > n< tr > n< td > tse</td > n< td > optional</td > n< td > String</td > n< td class=\"description\"> TSE option controls what blob is orig
const struct ncbi::grid::netcache::search::fields::SIZE size
const CharType(& source)[N]
Defines the CNcbiApplication and CAppException classes for creating NCBI applications.
Miscellaneous common-use basic types and functionality.
void s_ChangeAuthorLastName(CAuth_list &auth_list)
void s_TestAuthorChanges(CPub &pub)
void s_ChangeNameTitle(CTitle &title)
#define ESUBTYPE_SHOULD_FAIL(name)
#define CHECK_COMMON_FIELD(o1, o2, c, Field, val1, val2)
CRef< CImprint > s_SetImprint(CPub &pub)
CRef< CPub > s_MakeJournalArticlePub()
void s_ChangeImprintNoMatch(CImprint &imp, int change_no)
CRef< CCit_book > s_MakeBook()
static void SetSubSource(objects::CBioSource &src, objects::CSubSource::TSubtype subtype, string val)
BOOST_AUTO_TEST_CASE(s_TestSubtypeMaps)
CRef< CPub > s_MakeBookChapterPub()
CRef< CAuth_list > s_SetAuthList(CPub &pub)
void s_ChangeImprintMatch(CImprint &imp, int change_no)
CRef< CCit_jour > s_MakeJournal()
void s_TestImprintChanges(CPub &pub)
void CheckBioProjectLocationVals(CBioSource::EGenome genome, const string &bioprojectlocation)
void s_ChangeJTATitle(CTitle &title)
void s_AddJTATitle(CTitle &title)
void s_AddNameTitle(CTitle &title)
CRef< CImprint > s_MakeImprint()
void s_ChangeTitle(CPub &pub)
void s_ChangeDate(CDate &date)
void CheckPlasmid(CBioSource &src)
void s_TestTitleChange(CPub &pub)
CRef< CAuth_list > s_MakeAuthList()
void CheckViruses(CBioSource &src)
void s_ChangeAuthorFirstName(CAuth_list &auth_list)
#define CHECK_COMMON_STRING_LIST(o1, o2, c, Field, val1, val2)
CRef< objects::CObjectManager > om
const char * expected_result
#define test2(s, m, d, r)
Utility stuff for more convenient using of Boost.Test library.
#define NCBITEST_CHECK(P)
static bool ambig(char c)