コード例 #1
0
void SPSSImporterTest::spssTester()
{
	QFETCH(QString, filename);
	qDebug() << "File: " << filename;

	//spss file open
	QString fullPath_spss = QString(TESTFILE_FOLDER "spssimporter_test/spss_files/").append(filename);

	DataSetPackage *ds_spss = new DataSetPackage();
	fe_spss->setPath(fullPath_spss);
	asl_spss->loadTask(fe_spss, ds_spss);          //load the spss file
	//asl_spss->_thread.quit();

	struct fileContent fc_spss;
	copyToStructure(ds_spss, &fc_spss);            //copy contents of ds_spss to file contents structure
	SharedMemory::deleteDataSet(ds_spss->dataSet); //clear shared memory
	ds_spss->~DataSetPackage();

	//csv file open
	QString csvFile = filename;
	csvFile.replace(filename.size()-3, 3, "csv");
	QString fullPath_csv = QString(TESTFILE_FOLDER "spssimporter_test/csv_files/").append(csvFile);

	DataSetPackage *ds_csv = new DataSetPackage();
	fe_csv->setPath(fullPath_csv);
	asl_csv->loadTask(fe_csv, ds_csv);             //load the corresponding csv file - this is the expected output
	//asl_csv->_thread.quit();

	struct fileContent fc_csv;
	copyToStructure(ds_csv, &fc_csv);              //copy contents of ds_csv to fc_csv structure
	SharedMemory::deleteDataSet(ds_csv->dataSet);  //clear the shared memory
	ds_csv->~DataSetPackage();

	QVERIFY(checkIfEqual(&fc_spss, &fc_csv));      // end of test
}
コード例 #2
0
int main(int argc, char **argv) {
   

    int *x = new int;
    delete x;
    
     std::string *s = new std::string();
    
    checkIfEqual();

    int *values[8];
    for(unsigned int v = 0; v < 8; ++v) values[v] = new int;
    
    for(unsigned int v = 0; v < 8; ++v) delete values[v];
    
    checkIfEqual();
    return 0;
}
コード例 #3
0
ファイル: fft.c プロジェクト: ironhide23586/iit-jarvis
int main()
{
    float dataA[N][N], dataB[N][N], dataD[N][N];
    //int i, j;

    complex A[N][N], B[N][N];

    readFile("1_im1", dataA);
    readFile("1_im2", dataB);
    readFile("out_1", dataD);

    //print2DMatrix(dataA);

    //readFile("1_im1", dataA);
    //readFile("1_im2", dataB);
    //readFile("out_1", dataD);

    parseToComplex(A, dataA);
    parseToComplex(B, dataB);

    double startTime = MPI_Wtime();

    c_fft2d_serial(A);
    c_fft2d_serial(B);

    pointMul_serial(A, B);

    c_inv_fft2d_serial(A);

    double endTime = MPI_Wtime();

    printf("Duration = %f\n", (endTime - startTime));

    float D[N][N];
    parseToReal(D, A);

    //print2DMatrix(D);

    checkIfEqual(D, dataD);
}