SourceFile tmp; tmp.setFileType("PUBLICATION"); tmp.setNameOfFile("The White Stripes - Ball and Biscuit"); tmp.setPathToFile("/misc/sturm/mp3/"); tmp.setChecksum("2fd4e1c67a2d28fced849ee1bb76e7391b93eb12", SourceFile::MD5); tmp.setMetaValue("bla",4.0); //normal assignment SourceFile tmp2; tmp2 = tmp; TEST_EQUAL(tmp2.getFileType(),"PUBLICATION"); TEST_EQUAL(tmp2.getNameOfFile(),"The White Stripes - Ball and Biscuit"); TEST_EQUAL(tmp2.getPathToFile(),"/misc/sturm/mp3/"); TEST_EQUAL(tmp2.getChecksum(),"2fd4e1c67a2d28fced849ee1bb76e7391b93eb12"); TEST_EQUAL(tmp2.getChecksumType(), SourceFile::MD5); TEST_REAL_SIMILAR(tmp2.getMetaValue("bla"), 4.0); //assignment of empty object tmp2 = SourceFile(); TEST_EQUAL(tmp2.getFileType(), ""); TEST_EQUAL(tmp2.getNameOfFile(),""); TEST_EQUAL(tmp2.getPathToFile(),""); TEST_EQUAL(tmp2.getChecksum(),""); TEST_EQUAL(tmp2.getChecksumType(), SourceFile::UNKNOWN_CHECKSUM); TEST_EQUAL(tmp2.metaValueExists("bla"), false); END_SECTION START_SECTION((bool operator== (const SourceFile& rhs) const)) SourceFile tmp,tmp2; TEST_EQUAL(tmp==tmp2, true);