Fix unit test issues

remove dead store
initialize default values in class definition

Change-Id: I39abef12104a80df13ace0fb127c4ee24e00b184
Signed-off-by: Jablonski, Mateusz <mateusz.jablonski@intel.com>
This commit is contained in:
Jablonski, Mateusz
2020-03-13 14:59:00 +01:00
parent 43433244f9
commit a996ec6d9a
29 changed files with 116 additions and 231 deletions

View File

@@ -19,31 +19,21 @@ namespace NEO {
class OfflineCompilerTests : public ::testing::Test {
public:
OfflineCompilerTests() : pOfflineCompiler(nullptr),
retVal(CL_SUCCESS) {
uniqueHelper = std::make_unique<OclocArgHelper>();
// ctor
}
OfflineCompiler *pOfflineCompiler;
int retVal;
std::unique_ptr<OclocArgHelper> uniqueHelper;
OfflineCompiler *pOfflineCompiler = nullptr;
int retVal = CL_SUCCESS;
std::unique_ptr<OclocArgHelper> uniqueHelper = std::make_unique<OclocArgHelper>();
};
class MultiCommandTests : public ::testing::Test {
public:
MultiCommandTests() : pMultiCommand(nullptr),
retVal(CL_SUCCESS) {
uniqueHelper = std::make_unique<OclocArgHelper>();
}
void createFileWithArgs(const std::vector<std::string> &, int numOfBuild);
void deleteFileWithArgs();
void deleteOutFileList();
MultiCommand *pMultiCommand;
MultiCommand *pMultiCommand = nullptr;
std::string nameOfFileWithArgs;
std::string outFileList;
int retVal;
std::unique_ptr<OclocArgHelper> uniqueHelper;
int retVal = CL_SUCCESS;
std::unique_ptr<OclocArgHelper> uniqueHelper = std::make_unique<OclocArgHelper>();
};
void MultiCommandTests::createFileWithArgs(const std::vector<std::string> &singleArgs, int numOfBuild) {