Commit 06fd6ced authored by Eric Cano's avatar Eric Cano
Browse files

Renamed unit tests for easier location.

Lowercased/Upercased some namespace/class names for homogeneity.
parent ccab13ab
......@@ -68,14 +68,14 @@ throw (castor::tape::Exception)
break;
case ':':
{
castor::tape::Exceptions::InvalidArgument ex(std::string("The -") + (char) optopt + " option requires a parameter");
castor::tape::exceptions::InvalidArgument ex(std::string("The -") + (char) optopt + " option requires a parameter");
throw ex;
}
case '?':
{
std::stringstream err("Unknown command-line option");
if (optopt) err << std::string(": -") << optopt;
castor::tape::Exceptions::InvalidArgument ex(err.str().c_str());
castor::tape::exceptions::InvalidArgument ex(err.str().c_str());
throw ex;
}
default:
......@@ -83,7 +83,7 @@ throw (castor::tape::Exception)
std::stringstream err;
err << "getopt_long returned the following unknown value: 0x" <<
std::hex << (int) c;
castor::tape::Exceptions::InvalidArgument ex(err.str().c_str());
castor::tape::exceptions::InvalidArgument ex(err.str().c_str());
throw ex;
}
}
......@@ -101,7 +101,7 @@ void castor::tape::Server::Daemon::daemonize()
/* Fork off the parent process */
pid = fork();
if (pid < 0) {
castor::tape::Exceptions::Errnum e("Failed to fork in castor::tape::Server::Daemon::daemonize");
castor::tape::exceptions::Errnum e("Failed to fork in castor::tape::Server::Daemon::daemonize");
throw e;
}
/* If we got a good PID, then we can exit the parent process. */
......@@ -115,7 +115,7 @@ void castor::tape::Server::Daemon::daemonize()
/* Create a new session for the child process */
sid = setsid();
if (sid < 0) {
castor::tape::Exceptions::Errnum e("Failed to create new session in castor::tape::Server::Daemon::daemonize");
castor::tape::exceptions::Errnum e("Failed to create new session in castor::tape::Server::Daemon::daemonize");
throw e;
}
......@@ -130,7 +130,7 @@ void castor::tape::Server::Daemon::daemonize()
if ((chdir(m_options.runDirectory.c_str())) < 0) {
std::stringstream err("Failed to chdir in castor::tape::Server::Daemon::daemonize");
err << " ( destination directory: " << m_options.runDirectory << ")";
castor::tape::Exceptions::Errnum e(err.str());
castor::tape::exceptions::Errnum e(err.str());
throw e;
}
......
......@@ -6,5 +6,5 @@ set_property(SOURCE Drive.cpp
add_executable(TapeDriveReadWriteTest TapeDriveReadWriteTest.cpp)
target_link_libraries(TapeDriveReadWriteTest TapeDrive Exception SCSI System Utils castorcommon ${GTEST_LIBRARY} gmock pthread)
install(TARGETS TapeDriveReadWriteTest
RUNTIME DESTINATION bin)
#install(TARGETS TapeDriveReadWriteTest
# RUNTIME DESTINATION bin)
......@@ -34,10 +34,10 @@ m_tapeFD(-1), m_sysWrapper(sw) {
*/
m_tapeFD = m_sysWrapper.open(m_SCSIInfo.nst_dev.c_str(), O_RDWR | O_NONBLOCK);
if (-1 == m_tapeFD)
throw Exceptions::Errnum(std::string("Could not open device file: " + m_SCSIInfo.nst_dev));
throw exceptions::Errnum(std::string("Could not open device file: " + m_SCSIInfo.nst_dev));
/* Read drive status */
if (-1 == m_sysWrapper.ioctl(m_tapeFD, MTIOCGET, &m_mtInfo))
throw Exceptions::Errnum(std::string("Could not read drive status: " + m_SCSIInfo.nst_dev));
throw exceptions::Errnum(std::string("Could not read drive status: " + m_SCSIInfo.nst_dev));
}
/**
......@@ -59,7 +59,7 @@ void drives::DriveGeneric::clearCompressionStats() throw (Exception) {
/* Manage both system error and SCSI errors. */
if (-1 == m_sysWrapper.ioctl(m_tapeFD, SG_IO, &sgh))
throw Exceptions::Errnum("Failed SG_IO ioctl");
throw exceptions::Errnum("Failed SG_IO ioctl");
SCSI::ExceptionLauncher(sgh, "SCSI error in clearCompressionStats:");
}
......@@ -81,7 +81,7 @@ drives::deviceInfo drives::DriveGeneric::getDeviceInfo() throw (Exception) {
/* Manage both system error and SCSI errors. */
if (-1 == m_sysWrapper.ioctl(m_tapeFD, SG_IO, &sgh))
throw Exceptions::Errnum("Failed SG_IO ioctl");
throw exceptions::Errnum("Failed SG_IO ioctl");
SCSI::ExceptionLauncher(sgh, std::string("SCSI error in getDeviceInfo: ") +
SCSI::statusToString(sgh.status));
......@@ -115,7 +115,7 @@ std::string drives::DriveGeneric::getSerialNumber() throw (Exception) {
/* Manage both system error and SCSI errors. */
if (-1 == m_sysWrapper.ioctl(m_tapeFD, SG_IO, &sgh))
throw Exceptions::Errnum("Failed SG_IO ioctl");
throw exceptions::Errnum("Failed SG_IO ioctl");
SCSI::ExceptionLauncher(sgh, std::string("SCSI error in getSerialNumber: ") +
SCSI::statusToString(sgh.status));
std::string serialNumber;
......@@ -148,7 +148,7 @@ throw (Exception) {
/* Manage both system error and SCSI errors. */
if (-1 == m_sysWrapper.ioctl(m_tapeFD, SG_IO, &sgh))
throw Exceptions::Errnum("Failed SG_IO ioctl");
throw exceptions::Errnum("Failed SG_IO ioctl");
SCSI::ExceptionLauncher(sgh, "SCSI error in positionToLogicalObject:");
}
......@@ -174,7 +174,7 @@ throw (Exception) {
/* Manage both system error and SCSI errors. */
if (-1 == m_sysWrapper.ioctl(m_tapeFD, SG_IO, &sgh))
throw Exceptions::Errnum("Failed SG_IO ioctl");
throw exceptions::Errnum("Failed SG_IO ioctl");
SCSI::ExceptionLauncher(sgh, std::string("SCSI error in getPositionInfo: ") +
SCSI::statusToString(sgh.status));
......@@ -219,7 +219,7 @@ std::vector<std::string> drives::DriveGeneric::getTapeAlerts() throw (Exception)
sgh.dxfer_direction = SG_DXFER_FROM_DEV;
/* Manage both system error and SCSI errors. */
if (-1 == m_sysWrapper.ioctl(m_tapeFD, SG_IO, &sgh))
throw Exceptions::Errnum("Failed SG_IO ioctl");
throw exceptions::Errnum("Failed SG_IO ioctl");
SCSI::ExceptionLauncher(sgh, std::string("SCSI error in getTapeAlerts: ") +
SCSI::statusToString(sgh.status));
/* Return the ACTIVE tape alerts (this is indicated by "flag" (see
......@@ -265,7 +265,7 @@ void drives::DriveGeneric::setDensityAndCompression(unsigned char densityCode,
/* Manage both system error and SCSI errors. */
if (-1 == m_sysWrapper.ioctl(m_tapeFD, SG_IO, &sgh))
throw Exceptions::Errnum("Failed SG_IO ioctl");
throw exceptions::Errnum("Failed SG_IO ioctl");
SCSI::ExceptionLauncher(sgh,
std::string("SCSI error in setDensityAndCompression: ") +
SCSI::statusToString(sgh.status));
......@@ -291,7 +291,7 @@ void drives::DriveGeneric::setDensityAndCompression(unsigned char densityCode,
/* Manage both system error and SCSI errors. */
if (-1 == m_sysWrapper.ioctl(m_tapeFD, SG_IO, &sgh))
throw Exceptions::Errnum("Failed SG_IO ioctl");
throw exceptions::Errnum("Failed SG_IO ioctl");
SCSI::ExceptionLauncher(sgh,
std::string("SCSI error in setDensityAndCompression: ") +
SCSI::statusToString(sgh.status));
......@@ -309,7 +309,7 @@ void drives::DriveGeneric::setSTBufferWrite(bool bufWrite) throw (Exception) {
m_mtCmd.mt_op = MTSETDRVBUFFER;
m_mtCmd.mt_count = bufWrite ? (MT_ST_SETBOOLEANS | MT_ST_BUFFER_WRITES) : (MT_ST_CLEARBOOLEANS | MT_ST_BUFFER_WRITES);
if (-1 == m_sysWrapper.ioctl(m_tapeFD, MTIOCTOP, &m_mtCmd))
throw Exceptions::Errnum("Failed ST ioctl (MTSETDRVBUFFER)");
throw exceptions::Errnum("Failed ST ioctl (MTSETDRVBUFFER)");
}
/**
......@@ -326,7 +326,7 @@ void drives::DriveGeneric::spaceToEOM(void) throw (Exception) {
m_mtCmd.mt_op = MTEOM;
m_mtCmd.mt_count = 1;
if (-1 == m_sysWrapper.ioctl(m_tapeFD, MTIOCTOP, &m_mtCmd))
throw Exceptions::Errnum("Failed ST ioctl (MTEOM)");
throw exceptions::Errnum("Failed ST ioctl (MTEOM)");
}
/**
......@@ -340,7 +340,7 @@ void drives::DriveGeneric::setSTFastMTEOM(bool fastMTEOM) throw (Exception) {
m_mtCmd.mt_op = MTSETDRVBUFFER;
m_mtCmd.mt_count = fastMTEOM ? (MT_ST_SETBOOLEANS | MT_ST_FAST_MTEOM) : (MT_ST_CLEARBOOLEANS | MT_ST_FAST_MTEOM);
if (-1 == m_sysWrapper.ioctl(m_tapeFD, MTIOCTOP, &m_mtCmd))
throw Exceptions::Errnum("Failed ST ioctl (MTSETDRVBUFFER)");
throw exceptions::Errnum("Failed ST ioctl (MTSETDRVBUFFER)");
}
/**
......@@ -353,7 +353,7 @@ void drives::DriveGeneric::fastSpaceToEOM(void) throw (Exception) {
m_mtCmd.mt_op = MTEOM;
m_mtCmd.mt_count = 1;
if (-1 == m_sysWrapper.ioctl(m_tapeFD, MTIOCTOP, &m_mtCmd))
throw Exceptions::Errnum("Failed ST ioctl (MTEOM)");
throw exceptions::Errnum("Failed ST ioctl (MTEOM)");
}
/**
......@@ -364,7 +364,7 @@ void drives::DriveGeneric::rewind(void) throw (Exception) {
m_mtCmd.mt_op = MTREW;
m_mtCmd.mt_count = 1;
if (-1 == m_sysWrapper.ioctl(m_tapeFD, MTIOCTOP, &m_mtCmd))
throw Exceptions::Errnum("Failed ST ioctl (MTREW)");
throw exceptions::Errnum("Failed ST ioctl (MTREW)");
}
/**
......@@ -376,7 +376,7 @@ void drives::DriveGeneric::spaceFileMarksBackwards(size_t count) throw (Exceptio
m_mtCmd.mt_op = MTBSF;
m_mtCmd.mt_count = (int)count;
if (-1 == m_sysWrapper.ioctl(m_tapeFD, MTIOCTOP, &m_mtCmd))
throw Exceptions::Errnum("Failed ST ioctl (MTBSF)");
throw exceptions::Errnum("Failed ST ioctl (MTBSF)");
}
/**
......@@ -388,7 +388,7 @@ void drives::DriveGeneric::spaceFileMarksForward(size_t count) throw (Exception)
m_mtCmd.mt_op = MTFSF;
m_mtCmd.mt_count = (int)count;
if (-1 == m_sysWrapper.ioctl(m_tapeFD, MTIOCTOP, &m_mtCmd))
throw Exceptions::Errnum("Failed ST ioctl (MTFSF)");
throw exceptions::Errnum("Failed ST ioctl (MTFSF)");
}
/**
......@@ -403,7 +403,7 @@ void drives::DriveGeneric::spaceBlocksBackwards(size_t count) throw (Exception)
m_mtCmd.mt_op = MTBSR;
m_mtCmd.mt_count = (int)count;
if (-1 == m_sysWrapper.ioctl(m_tapeFD, MTIOCTOP, &m_mtCmd))
throw Exceptions::Errnum("Failed ST ioctl (MTBSR)");
throw exceptions::Errnum("Failed ST ioctl (MTBSR)");
}
/**
......@@ -418,7 +418,7 @@ void drives::DriveGeneric::spaceBlocksForward(size_t count) throw (Exception) {
m_mtCmd.mt_op = MTFSR;
m_mtCmd.mt_count = (int)count;
if (-1 == m_sysWrapper.ioctl(m_tapeFD, MTIOCTOP, &m_mtCmd))
throw Exceptions::Errnum("Failed ST ioctl (MTFSR)");
throw exceptions::Errnum("Failed ST ioctl (MTFSR)");
}
/**
......@@ -429,7 +429,7 @@ void drives::DriveGeneric::unloadTape(void) throw (Exception) {
m_mtCmd.mt_op = MTUNLOAD;
m_mtCmd.mt_count = 1;
if (-1 == m_sysWrapper.ioctl(m_tapeFD, MTIOCTOP, &m_mtCmd))
throw Exceptions::Errnum("Failed ST ioctl (MTUNLOAD)");
throw exceptions::Errnum("Failed ST ioctl (MTUNLOAD)");
}
/**
......@@ -441,7 +441,7 @@ void drives::DriveGeneric::sync(void) throw (Exception) {
m_mtCmd.mt_op = MTNOP; //The side effect of the no-op is to actually flush the driver's buffer to tape (see "man st").
m_mtCmd.mt_count = 1;
if (-1 == m_sysWrapper.ioctl(m_tapeFD, MTIOCTOP, &m_mtCmd))
throw Exceptions::Errnum("Failed ST ioctl (MTNOP)");
throw exceptions::Errnum("Failed ST ioctl (MTNOP)");
}
/**
......@@ -454,7 +454,7 @@ void drives::DriveGeneric::writeSyncFileMarks(size_t count) throw (Exception) {
m_mtCmd.mt_op = MTWEOF;
m_mtCmd.mt_count = (int)count;
if (-1 == m_sysWrapper.ioctl(m_tapeFD, MTIOCTOP, &m_mtCmd))
throw Exceptions::Errnum("Failed ST ioctl (MTWEOF)");
throw exceptions::Errnum("Failed ST ioctl (MTWEOF)");
}
/**
......@@ -467,7 +467,7 @@ void drives::DriveGeneric::writeImmediateFileMarks(size_t count) throw (Exceptio
m_mtCmd.mt_op = MTWEOFI; //Undocumented in "man st" needs the mtio_add.hh header file (see above)
m_mtCmd.mt_count = (int)count;
if (-1 == m_sysWrapper.ioctl(m_tapeFD, MTIOCTOP, &m_mtCmd))
throw Exceptions::Errnum("Failed ST ioctl (MTWEOFI)");
throw exceptions::Errnum("Failed ST ioctl (MTWEOFI)");
}
/**
......@@ -477,7 +477,7 @@ void drives::DriveGeneric::writeImmediateFileMarks(size_t count) throw (Exceptio
*/
void drives::DriveGeneric::writeBlock(const unsigned char * data, size_t count) throw (Exception) {
if (-1 == m_sysWrapper.write(m_tapeFD, data, count))
throw Exceptions::Errnum("Failed ST write");
throw exceptions::Errnum("Failed ST write");
}
/**
......@@ -487,7 +487,7 @@ void drives::DriveGeneric::writeBlock(const unsigned char * data, size_t count)
*/
void drives::DriveGeneric::readBlock(unsigned char * data, size_t count) throw (Exception) {
if (-1 == m_sysWrapper.read(m_tapeFD, data, count))
throw Exceptions::Errnum("Failed ST read");
throw exceptions::Errnum("Failed ST read");
}
void drives::DriveGeneric::SCSI_inquiry() {
......@@ -514,7 +514,7 @@ void drives::DriveGeneric::SCSI_inquiry(int fd) {
sgh.dxfer_len = sizeof (dataBuff);
sgh.timeout = 30000;
if (-1 == m_sysWrapper.ioctl(fd, SG_IO, &sgh))
throw Exceptions::Errnum("Failed SG_IO ioctl");
throw exceptions::Errnum("Failed SG_IO ioctl");
std::cout << "INQUIRY result: " << std::endl
<< "sgh.dxfer_len=" << sgh.dxfer_len
<< " sgh.sb_len_wr=" << ((int) sgh.sb_len_wr)
......@@ -547,7 +547,7 @@ drives::compressionStats drives::DriveT10000::getCompression() throw (Exception)
/* Manage both system error and SCSI errors. */
if (-1 == this->m_sysWrapper.ioctl(this->m_tapeFD, SG_IO, &sgh))
throw Exceptions::Errnum("Failed SG_IO ioctl");
throw exceptions::Errnum("Failed SG_IO ioctl");
SCSI::ExceptionLauncher(sgh, std::string("SCSI error in getCompression: ") +
SCSI::statusToString(sgh.status));
......@@ -604,7 +604,7 @@ drives::compressionStats drives::DriveLTO::getCompression() throw (Exception) {
/* Manage both system error and SCSI errors. */
if (-1 == this->m_sysWrapper.ioctl(this->m_tapeFD, SG_IO, &sgh))
throw Exceptions::Errnum("Failed SG_IO ioctl");
throw exceptions::Errnum("Failed SG_IO ioctl");
SCSI::ExceptionLauncher(sgh, std::string("SCSI error in getCompression: ") +
SCSI::statusToString(sgh.status));
......@@ -679,7 +679,7 @@ drives::compressionStats drives::DriveIBM3592::getCompression() throw (Exception
/* Manage both system error and SCSI errors. */
if (-1 == this->m_sysWrapper.ioctl(this->m_tapeFD, SG_IO, &sgh))
throw Exceptions::Errnum("Failed SG_IO ioctl");
throw exceptions::Errnum("Failed SG_IO ioctl");
SCSI::ExceptionLauncher(sgh, std::string("SCSI error in getCompression: ") +
SCSI::statusToString(sgh.status));
......
......@@ -35,7 +35,7 @@ using ::testing::An;
namespace UnitTests {
TEST(TapeDrive, OpensCorrectly) {
TEST(castor_tape_drives_Drive, OpensCorrectly) {
/* Prepare the test harness */
castor::tape::System::mockWrapper sysWrapper;
sysWrapper.fake.setupSLC5();
......@@ -64,7 +64,7 @@ TEST(TapeDrive, OpensCorrectly) {
}
}
TEST(TapeDrive, getPositionInfoAndPositionToLogicalObject) {
TEST(castor_tape_drives_Drive, getPositionInfoAndPositionToLogicalObject) {
/* Prepare the test harness */
castor::tape::System::mockWrapper sysWrapper;
sysWrapper.fake.setupSLC5();
......@@ -115,7 +115,7 @@ TEST(TapeDrive, getPositionInfoAndPositionToLogicalObject) {
}
}
}
TEST(TapeDrive, setDensityAndCompression) {
TEST(castor_tape_drives_Drive, setDensityAndCompression) {
/* Prepare the test harness */
castor::tape::System::mockWrapper sysWrapper;
sysWrapper.fake.setupSLC5();
......@@ -162,7 +162,7 @@ TEST(TapeDrive, setDensityAndCompression) {
}
}
TEST(TapeDrive, setStDriverOptions) {
TEST(castor_tape_drives_Drive, setStDriverOptions) {
/* Prepare the test harness */
castor::tape::System::mockWrapper sysWrapper;
sysWrapper.fake.setupSLC5();
......@@ -199,7 +199,7 @@ TEST(TapeDrive, setStDriverOptions) {
}
}
TEST(TapeDrive, getDeviceInfo) {
TEST(castor_tape_drives_Drive, getDeviceInfo) {
/* Prepare the test harness */
castor::tape::System::mockWrapper sysWrapper;
sysWrapper.fake.setupSLC5();
......@@ -240,7 +240,7 @@ TEST(TapeDrive, getDeviceInfo) {
}
}
TEST(TapeDrive, getCompressionAndClearCompressionStats) {
TEST(castor_tape_drives_Drive, getCompressionAndClearCompressionStats) {
/* Prepare the test harness */
castor::tape::System::mockWrapper sysWrapper;
sysWrapper.fake.setupSLC5();
......@@ -337,7 +337,7 @@ TEST(TapeDrive, getCompressionAndClearCompressionStats) {
}
}
TEST(TapeDrive, getTapeAlerts) {
TEST(castor_tape_drives_Drive, getTapeAlerts) {
/**
* "Local function" allowing the test to be run twice (for SLC5 and then for
......
......@@ -46,7 +46,7 @@ Exception::Exception(const Exception &ex): castor::exception::Exception(0) {
m_backtrace = ex.m_backtrace;
}
Exceptions::Errnum::Errnum(std::string what):Exception("") {
exceptions::Errnum::Errnum(std::string what):Exception("") {
m_errnum = errno;
char s[1000];
/* _XOPEN_SOURCE seems not to work. */
......
......@@ -39,7 +39,7 @@ namespace tape {
void setWhat(const std::string &w);
};
namespace Exceptions {
namespace exceptions {
class Errnum: public Exception {
public:
Errnum(std::string what = "");
......
......@@ -52,7 +52,7 @@ namespace UnitTests {
f2();
}
TEST(Exceptions, stacktrace_with_demangling) {
TEST(castor_tape_exceptions, stacktrace_with_demangling) {
try {
Nested x;
} catch (castor::tape::Exception & e) {
......@@ -65,11 +65,11 @@ namespace UnitTests {
}
}
TEST(Exceptions, errnum_throwing) {
TEST(castor_tape_exceptions, errnum_throwing) {
/* Mickey Mouse test as we had trouble which throwing Errnum (with errno=ENOENT)*/
errno = ENOENT;
try {
throw castor::tape::Exceptions::Errnum("Test ENOENT");
throw castor::tape::exceptions::Errnum("Test ENOENT");
} catch (std::exception & e) {
std::string temp = e.what();
temp += " ";
......
......@@ -38,29 +38,29 @@ void AULFile::VOL1::fill(std::string vsn) {
void AULFile::VOL1::verify() {
if (cmpString(label, "VOL1"))
throw Exceptions::Errnum(std::string("Failed verify for the VOL1: ") +
throw exceptions::Errnum(std::string("Failed verify for the VOL1: ") +
AULFile::toString(label));
if (!cmpString(VSN, ""))
throw Exceptions::Errnum(std::string("Failed verify for the VSN: ") +
throw exceptions::Errnum(std::string("Failed verify for the VSN: ") +
AULFile::toString(VSN));
if (cmpString(lblStandard, "3"))
throw Exceptions::Errnum(
throw exceptions::Errnum(
std::string("Failed verify for the label standard: ") +
AULFile::toString(lblStandard));
if (cmpString(ownerID, "CASTOR"))
throw Exceptions::Errnum(
throw exceptions::Errnum(
std::string("Failed verify for the ownerID: ") +
AULFile::toString(ownerID));
/* now we verify all other fields which must be spaces */
if (cmpString(accessibility, ""))
throw Exceptions::Errnum("accessibility is not empty");
throw exceptions::Errnum("accessibility is not empty");
if (cmpString(reserved1, ""))
throw Exceptions::Errnum("reserved1 is not empty");
throw exceptions::Errnum("reserved1 is not empty");
if (cmpString(implID, ""))
throw Exceptions::Errnum("implID is not empty");
throw exceptions::Errnum("implID is not empty");
if (cmpString(reserved2, ""))
throw Exceptions::Errnum("reserved2 is not empty");
throw exceptions::Errnum("reserved2 is not empty");
}
void AULFile::HDR1EOF1::fillCommon(
......@@ -86,47 +86,47 @@ void AULFile::HDR1EOF1::fillCommon(
}
void AULFile::HDR1EOF1::verifyCommon()
const throw (Exceptions::Errnum) {
const throw (exceptions::Errnum) {
if (!cmpString(fileId, ""))
throw Exceptions::Errnum(
throw exceptions::Errnum(
std::string("Failed verify for the fileId: ") +
AULFile::toString(fileId));
if (!cmpString(VSN, ""))
throw Exceptions::Errnum(std::string("Failed verify for the VSN: ") +
throw exceptions::Errnum(std::string("Failed verify for the VSN: ") +
AULFile::toString(VSN));
if (cmpString(fSec, "0001"))
throw Exceptions::Errnum(
throw exceptions::Errnum(
std::string("Failed verify for the fSec: ") +
AULFile::toString(fSec));
if (!cmpString(fSeq, ""))
throw Exceptions::Errnum(
throw exceptions::Errnum(
std::string("Failed verify for the fSeq: ") +
AULFile::toString(fSeq));
if (cmpString(genNum, "0001"))
throw Exceptions::Errnum(
throw exceptions::Errnum(
std::string("Failed verify for the genNum: ") +
AULFile::toString(genNum));
if (cmpString(verNumOfGen, "00"))
throw Exceptions::Errnum(
throw exceptions::Errnum(
std::string("Failed verify for the verNumOfGen: ") +
AULFile::toString(verNumOfGen));
if (!cmpString(creationDate, ""))
throw Exceptions::Errnum(
throw exceptions::Errnum(
std::string("Failed verify for the creationDate: ") +
AULFile::toString(creationDate));
if (!cmpString(expirationDate, ""))
throw Exceptions::Errnum(
throw exceptions::Errnum(
std::string("Failed verify for the expirationDate: ") +
AULFile::toString(expirationDate));
if (cmpString(accessibility, ""))
throw Exceptions::Errnum("accessibility is not empty");
throw exceptions::Errnum("accessibility is not empty");
if (!cmpString(sysCode, ""))
throw Exceptions::Errnum(
throw exceptions::Errnum(
std::string("Failed verify for the sysCode: ") +
AULFile::toString(sysCode));
if (cmpString(reserved, ""))
throw Exceptions::Errnum("reserved is not empty");
throw exceptions::Errnum("reserved is not empty");
}
void AULFile::HDR1::fill(
......@@ -140,12 +140,12 @@ void AULFile::HDR1::fill(
fillCommon(_fileId, _VSN, _fSeq);
}
void AULFile::HDR1::verify() const throw (Exceptions::Errnum) {
void AULFile::HDR1::verify() const throw (exceptions::Errnum) {
if (cmpString(label, "HDR1"))
throw Exceptions::Errnum(std::string("Failed verify for the HDR1: ") +
throw exceptions::Errnum(std::string("Failed verify for the HDR1: ") +
AULFile::toString(label));
if (cmpString(blockCount, "000000"))
throw Exceptions::Errnum(
throw exceptions::Errnum(
std::string("Failed verify for the blockCount: ") +
AULFile::toString(blockCount));
......@@ -160,17 +160,17 @@ void AULFile::HDR1PRELABEL::fill(std::string _VSN) {
}
void AULFile::HDR1PRELABEL::verify()
const throw (Exceptions::Errnum) {
const throw (exceptions::Errnum) {
if (cmpString(label, "HDR1"))
throw Exceptions::Errnum(std::string("Failed verify for the HDR1: ") +
throw exceptions::Errnum(std::string("Failed verify for the HDR1: ") +
AULFile::toString(label));
if (cmpString(blockCount, "000000"))
throw Exceptions::Errnum(
throw exceptions::Errnum(
std::string("Failed verify for the blockCount: ") +
AULFile::toString(blockCount));
if (cmpString(fileId, "PRELABEL"))
throw Exceptions::Errnum(
throw exceptions::Errnum(
std::string("Failed verify for the PRELABEL: ") +
AULFile::toString(fileId));
......@@ -186,12 +186,12 @@ void AULFile::EOF1::fill(
fillCommon(_fileId, _VSN, _fSeq);
}
void AULFile::EOF1::verify() const throw (Exceptions::Errnum) {
void AULFile::EOF1::verify() const throw (exceptions::Errnum) {
if (cmpString(label, "EOF1"))
throw Exceptions::Errnum(std::string("Failed verify for the EOF1: ") +
throw exceptions::Errnum(std::string("Failed verify for the EOF1: ") +
AULFile::toString(label));
if (!cmpString(blockCount, ""))
throw Exceptions::Errnum(
throw exceptions::Errnum(
std::string("Failed verify for the blockCount: ") +
AULFile::toString(blockCount));
......@@ -212,30 +212,30 @@ void AULFile::HDR2EOF2::fillCommon(int _blockLength, bool driveHasCompression) {
}
void AULFile::HDR2EOF2::verifyCommon()
const throw (Exceptions::Errnum) {
const throw (exceptions::Errnum) {
if (cmpString(recordFormat, "F"))
throw Exceptions::Errnum(
throw exceptions::Errnum(
std::string("Failed verify for the recordFormat: ") +
AULFile::toString(recordFormat));
if (!cmpString(blockLength, ""))
throw Exceptions::Errnum(
throw exceptions::Errnum(
std::string("Failed verify for the blockLength: ") +
AULFile::toString(blockLength));
if (!cmpString(recordLength, ""))
throw Exceptions::Errnum(
throw exceptions::Errnum(
std::string("Failed verify for the recordLength: ") +
AULFile::toString(recordLength));
if (cmpString(aulId, "00"))
throw Exceptions::Errnum(
throw exceptions::Errnum(
std::string("Failed verify for the aulId: ") +
AULFile::toString(aulId));
if (cmpString(reserved1, ""))
throw Exceptions::Errnum("reserved1 is not empty");
throw exceptions::Errnum("reserved1 is not empty");
if (cmpString(reserved2, ""))
throw Exceptions::Errnum("reserved2 is not empty");
throw exceptions::Errnum("reserved2 is not empty");
if (cmpString(reserved3, ""))
throw Exceptions::Errnum("reserved2 is not empty");
throw exceptions::Errnum("reserved2 is not empty");
}
void AULFile::HDR2::fill(int _blockLength, bool driveHasCompression) {
......@@ -243,9 +243,9 @@ void AULFile::HDR2::fill(int _blockLength, bool driveHasCompression) {