Skip to content

Commit

Permalink
Rebase updates
Browse files Browse the repository at this point in the history
  • Loading branch information
amystamile-usgs committed Jan 27, 2025
1 parent edfe874 commit 9346e66
Show file tree
Hide file tree
Showing 29 changed files with 357 additions and 614 deletions.
2 changes: 1 addition & 1 deletion gtest
Submodule gtest updated 45 files
+0 −1 .gitignore
+0 −17 BUILD.bazel
+0 −9 CMakeLists.txt
+0 −1 CONTRIBUTORS
+0 −61 MODULE.bazel
+12 −14 WORKSPACE
+0 −35 WORKSPACE.bzlmod
+4 −6 ci/linux-presubmit.sh
+1 −2 ci/macos-presubmit.sh
+2 −2 ci/windows-presubmit.bat
+5 −15 docs/advanced.md
+0 −2 docs/gmock_for_dummies.md
+2 −2 docs/primer.md
+1 −3 docs/reference/testing.md
+0 −33 fake_fuchsia_sdk.bzl
+3 −4 googlemock/CMakeLists.txt
+3 −21 googlemock/include/gmock/gmock-actions.h
+11 −12 googlemock/include/gmock/gmock-matchers.h
+3 −4 googlemock/include/gmock/gmock-more-actions.h
+4 −4 googlemock/include/gmock/internal/gmock-port.h
+1 −2 googlemock/src/gmock-spec-builders.cc
+1 −39 googlemock/test/gmock-more-actions_test.cc
+0 −9 googlemock/test/gmock_link_test.h
+1 −1 googletest/CMakeLists.txt
+0 −4 googletest/cmake/Config.cmake.in
+1 −3 googletest/cmake/internal_utils.cmake
+21 −35 googletest/include/gtest/gtest-printers.h
+14 −32 googletest/include/gtest/gtest.h
+1 −1 googletest/include/gtest/internal/gtest-death-test-internal.h
+1 −7 googletest/include/gtest/internal/gtest-filepath.h
+18 −13 googletest/include/gtest/internal/gtest-internal.h
+70 −72 googletest/include/gtest/internal/gtest-param-util.h
+7 −16 googletest/include/gtest/internal/gtest-port.h
+16 −18 googletest/src/gtest-death-test.cc
+16 −28 googletest/src/gtest-internal-inl.h
+85 −107 googletest/src/gtest.cc
+0 −1 googletest/test/googletest-color-test.py
+37 −39 googletest/test/googletest-death-test-test.cc
+1 −4 googletest/test/googletest-options-test.cc
+5 −0 googletest/test/googletest-output-test-golden-lin.txt
+44 −52 googletest/test/gtest_environment_test.cc
+3 −1 googletest/test/gtest_repeat_test.cc
+7 −14 googletest/test/gtest_unittest.cc
+6 −9 googletest/test/gtest_xml_output_unittest.py
+8 −14 googletest_deps.bzl
36 changes: 18 additions & 18 deletions isis/src/base/apps/csv2table/csv2table.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ namespace Isis {
}
catch(IException &e) {
QString msg = "Failed to read CSV file [" + csvFileName + "].";
throw IException(e, IException::Io, msg, _FILEINFO_);
throw IException(e, IException::Io, msg.toStdString(), _FILEINFO_);
}
int numColumns = reader.columns();
int numRows = reader.rows();
if (numColumns < 1 || numRows < 1) {
QString msg = "CSV file does not have data.\nFile has [" + toString(numRows) +
std::string msg = "CSV file does not have data.\nFile has [" + toString(numRows) +
"] rows and [" + toString(numColumns) +"] columns.";
throw IException(IException::User, msg, _FILEINFO_);
}
Expand Down Expand Up @@ -78,13 +78,13 @@ namespace Isis {
else {
QString msg = "Field [" + type + "] cannot be translated. Accepted types are "
"Integer, Double, Text, and Real";
throw IException(IException::User, msg, _FILEINFO_);
throw IException(IException::User, msg.toStdString(), _FILEINFO_);
}
}
}
else {
int numFields = fieldTypes.size();
QString msg = "Number of fields provided does not equal the number of columns in the CSV. "
std::string msg = "Number of fields provided does not equal the number of columns in the CSV. "
"Number of fields [" + toString(numFields) +
"] vs Number of Columns [" + toString(numColumns) + "]";
throw IException(IException::User, msg, _FILEINFO_);
Expand All @@ -108,14 +108,14 @@ namespace Isis {
// If the next column header is different, create a field for this one
QRegularExpressionMatch nextMatch = (columnIndex<numColumns-1)?rex.match(header[columnIndex+1]):QRegularExpressionMatch();
if ((columnIndex == numColumns-1) || (nextMatch.hasMatch() && (name != nextMatch.captured("name")))) {
TableField columnField(name, tableTypes[columnIndex], (index.length()>0)?(index.toInt()+1):1);
TableField columnField(name.toStdString(), tableTypes[columnIndex], (index.length()>0)?(index.toInt()+1):1);
tableRow += columnField;
}
}
}

QString tableName = ui.GetString("tablename");
Table table(tableName, tableRow);
Table table(tableName.toStdString(), tableRow);

// Fill the table from the csv
for (int rowIndex = 0; rowIndex < numRows; rowIndex++) {
Expand All @@ -125,16 +125,16 @@ namespace Isis {
tableRow[fieldIndex].isText()) {
switch(tableTypes[columnIndex]) {
case TableField::Type::Integer:
tableRow[fieldIndex] = toInt(csvRow[columnIndex++]);
tableRow[fieldIndex] = csvRow[columnIndex++].toInt();
break;
case TableField::Type::Double:
tableRow[fieldIndex] = toDouble(csvRow[columnIndex++]);
tableRow[fieldIndex] = csvRow[columnIndex++].toDouble();
break;
case TableField::Type::Text:
tableRow[fieldIndex] = QString(csvRow[columnIndex++]);
tableRow[fieldIndex] = csvRow[columnIndex++].toStdString();
break;
case TableField::Type::Real:
tableRow[fieldIndex] = (float)toDouble(csvRow[columnIndex++]);
tableRow[fieldIndex] = (float)csvRow[columnIndex++].toDouble();
break;
}
}
Expand All @@ -146,22 +146,22 @@ namespace Isis {
switch(tableTypes[columnIndex]) {
case TableField::Type::Integer:
for (int arrayLen = 0; arrayLen < tableRow[fieldIndex].size(); arrayLen++) {
intVector.push_back(toInt(csvRow[columnIndex++]));
intVector.push_back((csvRow[columnIndex++]).toInt());
}
tableRow[fieldIndex] = intVector;
break;
case TableField::Type::Double:
for (int arrayLen = 0; arrayLen < tableRow[fieldIndex].size(); arrayLen++) {
dblVector.push_back(toDouble(csvRow[columnIndex++]));
dblVector.push_back((csvRow[columnIndex++]).toDouble());
}
tableRow[fieldIndex] = dblVector;
break;
case TableField::Type::Text:
throw IException(IException::User, strMsg, _FILEINFO_);
throw IException(IException::User, strMsg.toStdString(), _FILEINFO_);
break;
case TableField::Type::Real:
for (int arrayLen = 0; arrayLen < tableRow[fieldIndex].size(); arrayLen++) {
realVector.push_back((float)toDouble(csvRow[columnIndex++]));
realVector.push_back((float)csvRow[columnIndex++].toDouble());
}
tableRow[fieldIndex] = realVector;
break;
Expand All @@ -180,11 +180,11 @@ namespace Isis {
QString labelPvlFilename = ui.GetFileName("label");
Pvl labelPvl;
try {
labelPvl.read(labelPvlFilename);
labelPvl.read(labelPvlFilename.toStdString());
}
catch(IException &e) {
QString msg = "Failed to read PVL label file [" + labelPvlFilename + "].";
throw IException(e, IException::Io, msg, _FILEINFO_);
throw IException(e, IException::Io, msg.toStdString(), _FILEINFO_);
}

PvlObject &tableLabel = table.Label();
Expand All @@ -201,7 +201,7 @@ namespace Isis {
}
catch(IException &e) {
QString msg = "Could not open output cube [" + outCubeFileName + "].";
throw IException(e, IException::Io, msg, _FILEINFO_);
throw IException(e, IException::Io, msg.toStdString(), _FILEINFO_);
}

try {
Expand All @@ -210,7 +210,7 @@ namespace Isis {
catch(IException &e) {
QString msg = "Could not write output table [" + tableName +
"] to output cube [" + outCubeFileName + "].";
throw IException(e, IException::Io, msg, _FILEINFO_);
throw IException(e, IException::Io, msg.toStdString(), _FILEINFO_);
}

outCube.close();
Expand Down
28 changes: 14 additions & 14 deletions isis/src/base/apps/dstripe/dstripe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,13 @@ namespace Isis {
// Algorithm: lowpass(from, temp) -> hipass(temp, noise) -> to = from-noise

// Run lowpass filter on input
QString tempFileName =
std::string tempFileName =
FileName::createTempFile("$TEMPORARY/dstripe.temporary.cub").expanded();
QString lowParams = "";
lowParams += "from= " + ui.GetCubeName("FROM");
lowParams += " to= " + tempFileName + " ";
lowParams += " samples= " + toString(lowSamples);
lowParams += " lines= " + toString(lowLines);
lowParams += " to= " + QString::fromStdString(tempFileName) + " ";
lowParams += " samples= " + QString::number(lowSamples);
lowParams += " lines= " + QString::number(lowLines);

ProgramLauncher::RunIsisProgram("lowpass", lowParams);

Expand All @@ -90,33 +90,33 @@ namespace Isis {
QString lowParams = "";
lowParams += "from= " + ui.GetCubeName("FROM");
lowParams += " to= " + ui.GetCubeName("LPFNOISE");
lowParams += " samples= " + toString(lowSamples);
lowParams += " lines= " + toString(lowLines);
lowParams += " samples= " + QString::number(lowSamples);
lowParams += " lines= " + QString::number(lowLines);
ProgramLauncher::RunIsisProgram("lowpass", lowParams);
}

// Run highpass filter after lowpass is done, i.e. highpass(lowpass(input))
QString tempNoiseFileName =
std::string tempNoiseFileName =
FileName::createTempFile("$TEMPORARY/dstripe.noise.temporary.cub")
.expanded();
QString highParams = "";
highParams += " from= " + tempFileName + " ";
highParams += " to= " + tempNoiseFileName + " ";
highParams += " samples= " + toString(highSamples);
highParams += " lines= " + toString(highLines);
highParams += " from= " + QString::fromStdString(tempFileName) + " ";
highParams += " to= " + QString::fromStdString(tempNoiseFileName) + " ";
highParams += " samples= " + QString::number(highSamples);
highParams += " lines= " + QString::number(highLines);

ProgramLauncher::RunIsisProgram("highpass", highParams);
QFile::remove(tempFileName);
QFile::remove(QString::fromStdString(tempFileName));

// Take the difference (FROM-NOISE) and write it to output
CubeAttributeInput inatt;
p.SetInputCube(tempNoiseFileName, inatt);
p.SetInputCube(QString::fromStdString(tempNoiseFileName), inatt);
CubeAttributeOutput &outatt = ui.GetOutputAttribute("TO");
p.SetOutputCube(ui.GetCubeName("TO"), outatt);
p.StartProcess(difference);
p.EndProcess();
if (ui.GetBoolean("DELETENOISE")) {
QFile::remove(tempNoiseFileName);
QFile::remove(QString::fromStdString(tempNoiseFileName));
}
}

Expand Down
2 changes: 1 addition & 1 deletion isis/src/base/apps/footprintmerge/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ void IsisMain() {

allPolys.push_back(PolygonTools::CopyMultiPolygon(poly.Polys()));

files.push_back(imageList[img].name());
files.push_back(QString::fromStdString(imageList[img].name()));

prog.CheckStatus();

Expand Down
4 changes: 2 additions & 2 deletions isis/src/base/apps/isisimport/ClipperImportUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ namespace Isis {
instGroup = inputCubeLabel->findGroup("Instrument", PvlObject::FindOptions::Traverse);
}
catch(IException &e) {
QString msg = "Unable to find instrument group in [" + cube->fileName() + "]";
std::string msg = "Unable to find instrument group in [" + cube->fileName().toStdString() + "]";
throw IException(e, IException::User, msg, _FILEINFO_);
}

QString startTime = QString(instGroup.findKeyword("StartTime"));
QString startTime = QString::fromStdString(instGroup.findKeyword("StartTime"));
iTime time(startTime);
PvlKeyword exposureDuration = instGroup.findKeyword("ExposureDuration");
double lineDuration = (double)exposureDuration;
Expand Down
2 changes: 1 addition & 1 deletion isis/src/base/apps/isisminer/RunCommandStrategy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ namespace Isis {
}
else {
if ( isDebug() ) {
cout << "Command " << command.m_name << " succeeded\n";
cout << "Command " << command.m_name.toStdString() << " succeeded\n";
}
}
}
Expand Down
36 changes: 18 additions & 18 deletions isis/src/base/apps/noseam/noseam.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace Isis {
void noseam(UserInterface &ui) {

// Get Filename with list of cubes to mosaic
FileName cubeListFileName(ui.GetFileName("FROMLIST"));
FileName cubeListFileName(ui.GetFileName("FROMLIST").toStdString());

return noseam(cubeListFileName, ui);
}
Expand Down Expand Up @@ -83,14 +83,14 @@ namespace Isis {
// Sets up the pathName to be used for most application calls
FileName inFile = cubes[0];

QString pathName = FileName("$TEMPORARY/").expanded();
QString pathName = QString::fromStdString(FileName("$TEMPORARY/").expanded());

/**
* Creates a mosaic from the original images. It is placed here
* so that the failure MATCHBANDBIN causes does not leave
* highpasses cubes lying around!
*/
QString parameters = "FROMLIST=" + cubeListFileName.original() +
QString parameters = "FROMLIST=" + QString::fromStdString(cubeListFileName.original()) +
" MOSAIC=" + pathName + "OriginalMosaic.cub" +
" MATCHBANDBIN=" + match;
ProgramLauncher::RunIsisProgram("automos", parameters);
Expand All @@ -100,13 +100,13 @@ namespace Isis {
highPassList.open("HighPassList.lis");
for(int i = 0; i < cubes.size(); i++) {
inFile = cubes[i];
QString outParam = pathName + inFile.baseName() + "_highpass.cub";
parameters = "FROM=" + inFile.expanded() +
QString outParam = pathName + QString::fromStdString(inFile.baseName()) + "_highpass.cub";
parameters = "FROM=" + QString::fromStdString(inFile.expanded()) +
" TO=" + outParam
+ " SAMPLES=" + toString(samples) + " LINES=" + toString(lines);
+ " SAMPLES=" + QString::number(samples) + " LINES=" + QString::number(lines);
ProgramLauncher::RunIsisProgram("highpass", parameters);
// Reads the just created highpass cube into a list file for automos
highPassList << outParam << endl;
highPassList << outParam.toStdString() << endl;
}
highPassList.close();

Expand All @@ -118,7 +118,7 @@ namespace Isis {
// Does a lowpass on the original mosaic
parameters = "FROM=" + pathName + "OriginalMosaic.cub"
+ " TO=" + pathName + "LowpassMosaic.cub"
+ " SAMPLES=" + toString(samples) + " LINES=" + toString(lines);
+ " SAMPLES=" + QString::number(samples) + " LINES=" + QString::number(lines);
ProgramLauncher::RunIsisProgram("lowpass", parameters);

// Finally combines the highpass and lowpass mosaics
Expand All @@ -130,19 +130,19 @@ namespace Isis {

// Will remove all of the temp files by default
if(ui.GetBoolean("REMOVETEMP")) {
QString file("HighPassList.lis");
remove(file.toLatin1().data());
file = pathName + "HighpassMosaic.cub";
remove(file.toLatin1().data());
file = pathName + "LowpassMosaic.cub";
remove(file.toLatin1().data());
file = pathName + "OriginalMosaic.cub";
remove(file.toLatin1().data());
std::string file("HighPassList.lis");
remove(file.c_str());
file = pathName.toStdString() + "HighpassMosaic.cub";
remove(file.c_str());
file = pathName.toStdString() + "LowpassMosaic.cub";
remove(file.c_str());
file = pathName.toStdString() + "OriginalMosaic.cub";
remove(file.c_str());

for(int i = 0; i < cubes.size(); i++) {
inFile = cubes[i];
file = pathName + inFile.baseName() + "_highpass.cub";
remove(file.toLatin1().data());
file = pathName.toStdString() + inFile.baseName() + "_highpass.cub";
remove(file.c_str());
}
}
}
Expand Down
Loading

0 comments on commit 9346e66

Please sign in to comment.