Example #1
0
int main()
{
	VLNString vl;

	string l = "dance dance revolution";
	string ac = vl.makeAcronym(l);
	return 0;
}
Example #2
0
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;
    }
}
Example #3
0
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;
    }
}
Example #4
0
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;
    }
}
Example #5
0
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;
    }
}
Example #6
0
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;
    }
}
Example #7
0
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;
    }
}
Example #8
0
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;
    }
}
Example #9
0
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;
    }
}
Example #10
0
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;
    }
}
Example #11
0
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;
    }
}
Example #12
0
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;
    }
}
Example #13
0
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;
    }
}
Example #14
0
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;
    }
}
Example #15
0
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;
    }
}
Example #16
0
int test38() {
    string longName = " fkiomof cwsjand dlvtheqdoskgselv brj bfragezs";
    VLNString* pObj = new VLNString();
    clock_t start = clock();
    string result = pObj->makeAcronym(longName);
    clock_t end = clock();
    delete pObj;
    string expected = "FCDBB";
    if(result == expected) {
        cout << "Test Case 38: Passed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
        return 0;
    } else {
        cout << "Test Case 38: Failed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
        return 1;
    }
}
Example #17
0
int test39() {
    string longName = " hdrbidiqn ydhpkciabmf the lzwlcbmw dbg";
    VLNString* pObj = new VLNString();
    clock_t start = clock();
    string result = pObj->makeAcronym(longName);
    clock_t end = clock();
    delete pObj;
    string expected = "HYLD";
    if(result == expected) {
        cout << "Test Case 39: Passed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
        return 0;
    } else {
        cout << "Test Case 39: Failed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
        return 1;
    }
}
Example #18
0
int test29() {
    string longName = " kd zxcyjesypg rka bkwh nvlawkbdfo kmucex";
    VLNString* pObj = new VLNString();
    clock_t start = clock();
    string result = pObj->makeAcronym(longName);
    clock_t end = clock();
    delete pObj;
    string expected = "KZRBNK";
    if(result == expected) {
        cout << "Test Case 29: Passed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
        return 0;
    } else {
        cout << "Test Case 29: Failed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
        return 1;
    }
}
Example #19
0
int test41() {
    string longName = " fqnsdldqvkd and theof cdkzfpaaa niicfogc";
    VLNString* pObj = new VLNString();
    clock_t start = clock();
    string result = pObj->makeAcronym(longName);
    clock_t end = clock();
    delete pObj;
    string expected = "FTCN";
    if(result == expected) {
        cout << "Test Case 41: Passed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
        return 0;
    } else {
        cout << "Test Case 41: Failed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
        return 1;
    }
}
Example #20
0
int test30() {
    string longName = "ktzayeesj and jkcffgra pqztp gmdhhozu m of ";
    VLNString* pObj = new VLNString();
    clock_t start = clock();
    string result = pObj->makeAcronym(longName);
    clock_t end = clock();
    delete pObj;
    string expected = "KJPGM";
    if(result == expected) {
        cout << "Test Case 30: Passed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
        return 0;
    } else {
        cout << "Test Case 30: Failed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
        return 1;
    }
}
Example #21
0
int test43() {
    string longName = " o mart nujxrjesvjywpqentexwngv the and the";
    VLNString* pObj = new VLNString();
    clock_t start = clock();
    string result = pObj->makeAcronym(longName);
    clock_t end = clock();
    delete pObj;
    string expected = "OMN";
    if(result == expected) {
        cout << "Test Case 43: Passed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
        return 0;
    } else {
        cout << "Test Case 43: Failed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
        return 1;
    }
}
Example #22
0
int test31() {
    string longName = " apdqbxat xq of rgr and naand the palvm";
    VLNString* pObj = new VLNString();
    clock_t start = clock();
    string result = pObj->makeAcronym(longName);
    clock_t end = clock();
    delete pObj;
    string expected = "AXRNP";
    if(result == expected) {
        cout << "Test Case 31: Passed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
        return 0;
    } else {
        cout << "Test Case 31: Failed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
        return 1;
    }
}
Example #23
0
int test45() {
    string longName = " tiohszjz the the ankyrr and cfnxcvhaaof t";
    VLNString* pObj = new VLNString();
    clock_t start = clock();
    string result = pObj->makeAcronym(longName);
    clock_t end = clock();
    delete pObj;
    string expected = "TACT";
    if(result == expected) {
        cout << "Test Case 45: Passed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
        return 0;
    } else {
        cout << "Test Case 45: Failed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
        return 1;
    }
}
Example #24
0
int test32() {
    string longName = " the yunfgdl rfxygsgdws the of hrovn xrgg";
    VLNString* pObj = new VLNString();
    clock_t start = clock();
    string result = pObj->makeAcronym(longName);
    clock_t end = clock();
    delete pObj;
    string expected = "YRHX";
    if(result == expected) {
        cout << "Test Case 32: Passed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
        return 0;
    } else {
        cout << "Test Case 32: Failed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
        return 1;
    }
}
Example #25
0
int test47() {
    string longName = " lwje wgfprtcxb of qjhjtxkup zydytbahi ";
    VLNString* pObj = new VLNString();
    clock_t start = clock();
    string result = pObj->makeAcronym(longName);
    clock_t end = clock();
    delete pObj;
    string expected = "LWQZ";
    if(result == expected) {
        cout << "Test Case 47: Passed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
        return 0;
    } else {
        cout << "Test Case 47: Failed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
        return 1;
    }
}
Example #26
0
int test34() {
    string longName = " zkf of hivggp shdu dhastzpofdzegzkbag zmvh";
    VLNString* pObj = new VLNString();
    clock_t start = clock();
    string result = pObj->makeAcronym(longName);
    clock_t end = clock();
    delete pObj;
    string expected = "ZHSDZ";
    if(result == expected) {
        cout << "Test Case 34: Passed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
        return 0;
    } else {
        cout << "Test Case 34: Failed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
        return 1;
    }
}
Example #27
0
int test49() {
    string longName = " yttthe ceu xcith the thethe fxqjry hgi";
    VLNString* pObj = new VLNString();
    clock_t start = clock();
    string result = pObj->makeAcronym(longName);
    clock_t end = clock();
    delete pObj;
    string expected = "YCXTFH";
    if(result == expected) {
        cout << "Test Case 49: Passed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
        return 0;
    } else {
        cout << "Test Case 49: Failed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
        return 1;
    }
}
Example #28
0
int test35() {
    string longName = " mlxohespzjbioufkef mbt and ymtirjn xl ";
    VLNString* pObj = new VLNString();
    clock_t start = clock();
    string result = pObj->makeAcronym(longName);
    clock_t end = clock();
    delete pObj;
    string expected = "MMYX";
    if(result == expected) {
        cout << "Test Case 35: Passed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
        return 0;
    } else {
        cout << "Test Case 35: Failed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
        return 1;
    }
}
Example #29
0
int test37() {
    string longName = " rgnqffhbl cyabkw gdoz jfdzqpjspu of r ";
    VLNString* pObj = new VLNString();
    clock_t start = clock();
    string result = pObj->makeAcronym(longName);
    clock_t end = clock();
    delete pObj;
    string expected = "RCGJR";
    if(result == expected) {
        cout << "Test Case 37: Passed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
        return 0;
    } else {
        cout << "Test Case 37: Failed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
        return 1;
    }
}
Example #30
0
int test20() {
    string longName = " w iizcgfj nhwnitcxsis hicammgfj ythe and and";
    VLNString* pObj = new VLNString();
    clock_t start = clock();
    string result = pObj->makeAcronym(longName);
    clock_t end = clock();
    delete pObj;
    string expected = "WINHY";
    if(result == expected) {
        cout << "Test Case 20: Passed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
        return 0;
    } else {
        cout << "Test Case 20: Failed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
        return 1;
    }
}