本文整理汇总了C++中DNASequence::longestDNASequence方法的典型用法代码示例。如果您正苦于以下问题:C++ DNASequence::longestDNASequence方法的具体用法?C++ DNASequence::longestDNASequence怎么用?C++ DNASequence::longestDNASequence使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DNASequence
的用法示例。
在下文中一共展示了DNASequence::longestDNASequence方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: do_test
bool do_test(string sequence, int __expected) {
time_t startClock = clock();
DNASequence *instance = new DNASequence();
int __result = instance->longestDNASequence(sequence);
double elapsed = (double)(clock() - startClock) / CLOCKS_PER_SEC;
delete instance;
if (__result == __expected) {
cout << "PASSED!" << " (" << elapsed << " seconds)" << endl;
return true;
}
else {
cout << "FAILED!" << " (" << elapsed << " seconds)" << endl;
cout << " Expected: " << to_string(__expected) << endl;
cout << " Received: " << to_string(__result) << endl;
return false;
}
}