本文整理汇总了C++中VLNString类的典型用法代码示例。如果您正苦于以下问题:C++ VLNString类的具体用法?C++ VLNString怎么用?C++ VLNString使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了VLNString类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main()
{
VLNString vl;
string l = "dance dance revolution";
string ac = vl.makeAcronym(l);
return 0;
}
示例2: test21
int test21() {
string longName = " slsljk andof of ckvifiwo zcihcnskbg and ";
VLNString* pObj = new VLNString();
clock_t start = clock();
string result = pObj->makeAcronym(longName);
clock_t end = clock();
delete pObj;
string expected = "SACZ";
if(result == expected) {
cout << "Test Case 21: Passed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
return 0;
} else {
cout << "Test Case 21: Failed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
return 1;
}
}
示例3: test56
int test56() {
string longName = "anda";
VLNString* pObj = new VLNString();
clock_t start = clock();
string result = pObj->makeAcronym(longName);
clock_t end = clock();
delete pObj;
string expected = "A";
if(result == expected) {
cout << "Test Case 56: Passed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
return 0;
} else {
cout << "Test Case 56: Failed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
return 1;
}
}
示例4: test48
int test48() {
string longName = " and phmymcamuy mrzo wnjejydhpqedthe of k";
VLNString* pObj = new VLNString();
clock_t start = clock();
string result = pObj->makeAcronym(longName);
clock_t end = clock();
delete pObj;
string expected = "PMWK";
if(result == expected) {
cout << "Test Case 48: Passed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
return 0;
} else {
cout << "Test Case 48: Failed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
return 1;
}
}
示例5: test46
int test46() {
string longName = " of sjgagjnkauthe ycxjsthxjbezdu wmlwplyayx ";
VLNString* pObj = new VLNString();
clock_t start = clock();
string result = pObj->makeAcronym(longName);
clock_t end = clock();
delete pObj;
string expected = "SYW";
if(result == expected) {
cout << "Test Case 46: Passed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
return 0;
} else {
cout << "Test Case 46: Failed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
return 1;
}
}
示例6: test44
int test44() {
string longName = " of trbubll sszxiryy mgbqvsgozaubfibnoj and ";
VLNString* pObj = new VLNString();
clock_t start = clock();
string result = pObj->makeAcronym(longName);
clock_t end = clock();
delete pObj;
string expected = "TSM";
if(result == expected) {
cout << "Test Case 44: Passed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
return 0;
} else {
cout << "Test Case 44: Failed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
return 1;
}
}
示例7: test42
int test42() {
string longName = " of kjfzxaof and the and xluofzvplx ay";
VLNString* pObj = new VLNString();
clock_t start = clock();
string result = pObj->makeAcronym(longName);
clock_t end = clock();
delete pObj;
string expected = "KXA";
if(result == expected) {
cout << "Test Case 42: Passed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
return 0;
} else {
cout << "Test Case 42: Failed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
return 1;
}
}
示例8: test40
int test40() {
string longName = "sualzwnkjq and czrrh xgand f j mc t";
VLNString* pObj = new VLNString();
clock_t start = clock();
string result = pObj->makeAcronym(longName);
clock_t end = clock();
delete pObj;
string expected = "SCXFJMT";
if(result == expected) {
cout << "Test Case 40: Passed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
return 0;
} else {
cout << "Test Case 40: Failed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
return 1;
}
}
示例9: test28
int test28() {
string longName = "khvc frzzzxkuro q lxaxpugnsl the slpdafrx h";
VLNString* pObj = new VLNString();
clock_t start = clock();
string result = pObj->makeAcronym(longName);
clock_t end = clock();
delete pObj;
string expected = "KFQLSH";
if(result == expected) {
cout << "Test Case 28: Passed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
return 0;
} else {
cout << "Test Case 28: Failed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
return 1;
}
}
示例10: test27
int test27() {
string longName = "uhnikqrpl c czepogygaerpgh vgrmleand ofrzxvkydcy";
VLNString* pObj = new VLNString();
clock_t start = clock();
string result = pObj->makeAcronym(longName);
clock_t end = clock();
delete pObj;
string expected = "UCCVO";
if(result == expected) {
cout << "Test Case 27: Passed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
return 0;
} else {
cout << "Test Case 27: Failed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
return 1;
}
}
示例11: test26
int test26() {
string longName = " and hdcfwqvqsw bluldkm urfmxtq vtssdwykkc ";
VLNString* pObj = new VLNString();
clock_t start = clock();
string result = pObj->makeAcronym(longName);
clock_t end = clock();
delete pObj;
string expected = "HBUV";
if(result == expected) {
cout << "Test Case 26: Passed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
return 0;
} else {
cout << "Test Case 26: Failed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
return 1;
}
}
示例12: test25
int test25() {
string longName = " p the ad hyfxlddpxl the k lxkntauoi";
VLNString* pObj = new VLNString();
clock_t start = clock();
string result = pObj->makeAcronym(longName);
clock_t end = clock();
delete pObj;
string expected = "PAHKL";
if(result == expected) {
cout << "Test Case 25: Passed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
return 0;
} else {
cout << "Test Case 25: Failed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
return 1;
}
}
示例13: test24
int test24() {
string longName = " ofpdgdodpdok bdp oehnqooc swuomeivdryko ";
VLNString* pObj = new VLNString();
clock_t start = clock();
string result = pObj->makeAcronym(longName);
clock_t end = clock();
delete pObj;
string expected = "OBOS";
if(result == expected) {
cout << "Test Case 24: Passed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
return 0;
} else {
cout << "Test Case 24: Failed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
return 1;
}
}
示例14: test23
int test23() {
string longName = "qefw jmo of eec glqxnyseo andezstlof the";
VLNString* pObj = new VLNString();
clock_t start = clock();
string result = pObj->makeAcronym(longName);
clock_t end = clock();
delete pObj;
string expected = "QJEGA";
if(result == expected) {
cout << "Test Case 23: Passed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
return 0;
} else {
cout << "Test Case 23: Failed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
return 1;
}
}
示例15: test22
int test22() {
string longName = "rnikdltuo fsoqui sdbmexbfhbuoq iax szollfq";
VLNString* pObj = new VLNString();
clock_t start = clock();
string result = pObj->makeAcronym(longName);
clock_t end = clock();
delete pObj;
string expected = "RFSIS";
if(result == expected) {
cout << "Test Case 22: Passed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
return 0;
} else {
cout << "Test Case 22: Failed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
return 1;
}
}