45 #include <boost/test/parameterized_test.hpp>
51 #if defined(NCBI_COMPILER_MSVC) && defined(NCBI_DLL_BUILD)
67 s_SeqIdATP = AsnFind(
const_cast<char*
>(
"Seq-id"));
72 "local str \"foo|\"\"bar\"\"\"",
75 "giim { id 123, db \"foo\", release \"bar\" }",
78 "genbank { name \"AMU12345\", accession \"U12345\", release \"foo\" }",
79 "embl { name \"MTBH37RV\", accession \"AL123456\", version 2 }",
80 "pir { name \"S16356\" }",
81 "swissprot { name \"RS22_SALTY\", accession \"Q7CQJ0\","
82 " release \"reviewed\" }",
83 "swissprot { name \"Q9ORT2_9HIV1\", accession \"Q90RT2\","
84 " release \"unreviewed\" }",
85 "swissprot { accession \"Q7CQJ0\", release \"reviewed\", version 1 }",
86 "patent { seqid 1, cit { country \"US\", id number \"RE33188\" } }",
88 "other { accession \"NM_000170\", version 1 }",
89 "general { db \"EcoSeq\", tag str \"EcoAce\" }",
90 "general { db \"taxon\", tag id 9606 }",
91 "general { db \"dbSNP\", tag str \"rs31251_allelePos=201totallen=401"
92 "|taxid=9606|snpClass=1|alleles=?|mol=?|build=?\" }",
94 "ddbj { accession \"N00068\" }",
95 "prf { accession \"0806162C\" }",
96 "pdb { mol \"1GAV\" }",
97 "pdb { mol \"1GAV\", chain 0 }",
98 "pdb { mol \"1GAV\", chain 33 }",
99 "pdb { mol \"1GAV\", chain 88 }",
102 "tpg { accession \"BK003456\" }",
103 "tpe { accession \"BN000123\" }",
104 "tpd { accession \"FAA00017\" }",
105 "gpipe { accession \"GPC_123456789\", version 1 }",
106 "named-annot-track { accession \"AT_123456789\", version 1 }"
113 static void Delete(SeqIdPtr sip) { SeqIdFree(sip); }
152 size_t len = strlen(s);
155 AsnIoMemPtr aimp = AsnIoMemOpen
156 (
const_cast<char*
>(
"r"),
157 reinterpret_cast<BytePtr>(
const_cast<char*
>(s)),
len);
158 AsnIoPtr aip = AsnIoNew((ASNIO_IN | ASNIO_TEXT),
NULL, aimp,
159 AsnIoMemRead, AsnIoMemWrite);
element_type * get(void) const
Get pointer.
void GetLabel(string *label, ELabelType type=eDefault, TLabelFlags flags=fLabel_Default) const
Append a label for this Seq-id to the supplied string.
ELabelType
return the label for a given string
@ fLabel_Version
Show the version.
@ fLabel_GeneralDbIsContent
For type general, use the database name as the tag and the (text or numeric) key as the content.
@ eContent
Untagged human-readable accession or the like.
@ eFasta
Tagged ID in NCBI's traditional FASTA style.
void Read(const CObjectInfo &object)
Read object of know type.
static CTempString TruncateSpaces_Unsafe(const CTempString str, ETrunc where=eTrunc_Both)
Truncate spaces in a string.
static void TruncateSpacesInPlace(string &str, ETrunc where=eTrunc_Both)
Truncate spaces in a string (in-place)
@ eTrunc_End
Truncate trailing spaces only.
void NcbiTestSetGlobalDisabled(void)
Disable execution of all tests in current configuration.
void CONNECT_Init(const IRWRegistry *reg=0, CRWLock *lock=0, TConnectInitFlags flag=eConnectInit_OwnNothing, FSSLSetup ssl=0)
Init [X]CONNECT library with the specified "reg" and "lock" (ownership for either or both can be deta...
static const char label[]
static const size_t kNumRepresentativeIDs
static AsnTypePtr s_SeqIdATP
BOOST_AUTO_PARAM_TEST_CASE(s_TestIdFormatting, kRepresentativeIDs+0, kRepresentativeIDs+kNumRepresentativeIDs)
static string s_IdLabel(const TAutoSeqId &c_id, EIDLabelType type)
AutoPtr< SeqId, SSeqIdDeleter > TAutoSeqId
static void s_TestIdFormatting(const char *s)
static const char *const kRepresentativeIDs[]
static void Delete(SeqIdPtr sip)
Utility stuff for more convenient using of Boost.Test library.
BOOST_AUTO_TEST_CASE(TestUsingArg)