[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot]
2023-09-12 13:03:02 +00:00
committed by WandererFan
parent c469601f95
commit 222a2520b1
435 changed files with 2669 additions and 2645 deletions

View File

@@ -113,7 +113,7 @@ private:
// NOLINTBEGIN(readability-magic-numbers)
TEST_F(ComplexGeoDataTest, getIndexedNameNoName)// NOLINT
TEST_F(ComplexGeoDataTest, getIndexedNameNoName) // NOLINT
{
// Arrange & Act
auto result = cgd().getIndexedName(Data::MappedName());
@@ -122,7 +122,7 @@ TEST_F(ComplexGeoDataTest, getIndexedNameNoName)// NOLINT
EXPECT_FALSE(result);
}
TEST_F(ComplexGeoDataTest, getIndexedNameNoElementMap)// NOLINT
TEST_F(ComplexGeoDataTest, getIndexedNameNoElementMap) // NOLINT
{
// Arrange & Act
auto result = cgd().getIndexedName(Data::MappedName("TestName"));
@@ -131,7 +131,7 @@ TEST_F(ComplexGeoDataTest, getIndexedNameNoElementMap)// NOLINT
EXPECT_TRUE(result);
}
TEST_F(ComplexGeoDataTest, getMappedNameNoElement)// NOLINT
TEST_F(ComplexGeoDataTest, getMappedNameNoElement) // NOLINT
{
// Arrange & Act
auto result = cgd().getMappedName(Data::IndexedName {});
@@ -140,7 +140,7 @@ TEST_F(ComplexGeoDataTest, getMappedNameNoElement)// NOLINT
EXPECT_FALSE(result);
}
TEST_F(ComplexGeoDataTest, getMappedNameDisallowUnmappedNoMap)// NOLINT
TEST_F(ComplexGeoDataTest, getMappedNameDisallowUnmappedNoMap) // NOLINT
{
// Arrange & Act
auto result = cgd().getMappedName(Data::IndexedName {"TestName"}, false);
@@ -149,7 +149,7 @@ TEST_F(ComplexGeoDataTest, getMappedNameDisallowUnmappedNoMap)// NOLINT
EXPECT_FALSE(result);
}
TEST_F(ComplexGeoDataTest, getMappedNameDisallowUnmappedWithMap)// NOLINT
TEST_F(ComplexGeoDataTest, getMappedNameDisallowUnmappedWithMap) // NOLINT
{
// Arrange
auto elementMap = std::make_shared<Data::ElementMap>();
@@ -166,11 +166,11 @@ TEST_F(ComplexGeoDataTest, getMappedNameDisallowUnmappedWithMap)// NOLINT
EXPECT_EQ(mappedName, result);
}
TEST_F(ComplexGeoDataTest, getMappedNameDisallowUnmappedMissingFromMap)// NOLINT
TEST_F(ComplexGeoDataTest, getMappedNameDisallowUnmappedMissingFromMap) // NOLINT
{
// Arrange
auto mappedName = Data::MappedName("NotTheTestName");
cgd().getIndexedName(mappedName);// Put it in the map
cgd().getIndexedName(mappedName); // Put it in the map
// Act
auto result = cgd().getMappedName(Data::IndexedName {"TestName"}, false);
@@ -179,7 +179,7 @@ TEST_F(ComplexGeoDataTest, getMappedNameDisallowUnmappedMissingFromMap)// NOLINT
EXPECT_FALSE(result);
}
TEST_F(ComplexGeoDataTest, getMappedNameAllowUnmapped)// NOLINT
TEST_F(ComplexGeoDataTest, getMappedNameAllowUnmapped) // NOLINT
{
// Arrange & Act
auto result = cgd().getMappedName(Data::IndexedName {"TestName"}, true);
@@ -188,7 +188,7 @@ TEST_F(ComplexGeoDataTest, getMappedNameAllowUnmapped)// NOLINT
EXPECT_TRUE(result);
}
TEST_F(ComplexGeoDataTest, getElementNameGivenIndexedName)// NOLINT
TEST_F(ComplexGeoDataTest, getElementNameGivenIndexedName) // NOLINT
{
// Arrange
const char* name {"EDGE123"};
@@ -201,7 +201,7 @@ TEST_F(ComplexGeoDataTest, getElementNameGivenIndexedName)// NOLINT
EXPECT_EQ(result.index, indexedName);
}
TEST_F(ComplexGeoDataTest, getElementNameGivenMappedName)// NOLINT
TEST_F(ComplexGeoDataTest, getElementNameGivenMappedName) // NOLINT
{
// Arrange
const char* name {"EDGE123"};
@@ -214,7 +214,7 @@ TEST_F(ComplexGeoDataTest, getElementNameGivenMappedName)// NOLINT
EXPECT_EQ(result.name, mappedName);
}
TEST_F(ComplexGeoDataTest, getElementMappedNamesNoMapNoUnmapped)// NOLINT
TEST_F(ComplexGeoDataTest, getElementMappedNamesNoMapNoUnmapped) // NOLINT
{
// Arrange
// Do not create an element map
@@ -227,7 +227,7 @@ TEST_F(ComplexGeoDataTest, getElementMappedNamesNoMapNoUnmapped)// NOLINT
EXPECT_TRUE(result.empty());
}
TEST_F(ComplexGeoDataTest, getElementMappedNamesWithMapNoUnmapped)// NOLINT
TEST_F(ComplexGeoDataTest, getElementMappedNamesWithMapNoUnmapped) // NOLINT
{
// Arrange
auto elementMap = std::make_shared<Data::ElementMap>();
@@ -244,7 +244,7 @@ TEST_F(ComplexGeoDataTest, getElementMappedNamesWithMapNoUnmapped)// NOLINT
EXPECT_EQ(result[0].first, mappedName);
}
TEST_F(ComplexGeoDataTest, getElementMappedNamesNoMapWithUnmapped)// NOLINT
TEST_F(ComplexGeoDataTest, getElementMappedNamesNoMapWithUnmapped) // NOLINT
{
// Do not create an element map
auto indexedName = Data::IndexedName("EDGE1");
@@ -257,7 +257,7 @@ TEST_F(ComplexGeoDataTest, getElementMappedNamesNoMapWithUnmapped)// NOLINT
}
TEST_F(ComplexGeoDataTest, getElementMappedNamesWithMapWithUnmapped)// NOLINT
TEST_F(ComplexGeoDataTest, getElementMappedNamesWithMapWithUnmapped) // NOLINT
{
// Arrange
Data::MappedName mappedName;
@@ -273,7 +273,7 @@ TEST_F(ComplexGeoDataTest, getElementMappedNamesWithMapWithUnmapped)// NOLINT
EXPECT_NE(result[0].first, mappedName);
}
TEST_F(ComplexGeoDataTest, elementTypeValidIndexName)// NOLINT
TEST_F(ComplexGeoDataTest, elementTypeValidIndexName) // NOLINT
{
// Arrange
auto indexedName = Data::IndexedName("EDGE", 1);
@@ -285,10 +285,10 @@ TEST_F(ComplexGeoDataTest, elementTypeValidIndexName)// NOLINT
EXPECT_EQ(elementType, 'E');
}
TEST_F(ComplexGeoDataTest, elementTypeInvalidIndexedName)// NOLINT
TEST_F(ComplexGeoDataTest, elementTypeInvalidIndexedName) // NOLINT
{
// Arrange
auto indexedName = Data::IndexedName("INVALID", 1);// Not in the element type list
auto indexedName = Data::IndexedName("INVALID", 1); // Not in the element type list
// Act
char elementType = cgd().elementType(indexedName);
@@ -297,7 +297,7 @@ TEST_F(ComplexGeoDataTest, elementTypeInvalidIndexedName)// NOLINT
EXPECT_EQ(elementType, 0);
}
TEST_F(ComplexGeoDataTest, elementTypeCharEmptyName)// NOLINT
TEST_F(ComplexGeoDataTest, elementTypeCharEmptyName) // NOLINT
{
// Arrange & Act
char elementType = cgd().elementType(nullptr);
@@ -306,7 +306,7 @@ TEST_F(ComplexGeoDataTest, elementTypeCharEmptyName)// NOLINT
EXPECT_EQ(elementType, 0);
}
TEST_F(ComplexGeoDataTest, elementTypeCharIndexedName)// NOLINT
TEST_F(ComplexGeoDataTest, elementTypeCharIndexedName) // NOLINT
{
// Arrange & Act
char elementType = cgd().elementType("EDGE1");
@@ -315,7 +315,7 @@ TEST_F(ComplexGeoDataTest, elementTypeCharIndexedName)// NOLINT
EXPECT_EQ(elementType, 'E');
}
TEST_F(ComplexGeoDataTest, elementTypeCharMappedNameNoPrefix)// NOLINT
TEST_F(ComplexGeoDataTest, elementTypeCharMappedNameNoPrefix) // NOLINT
{
// Arrange
int size {0};
@@ -330,7 +330,7 @@ TEST_F(ComplexGeoDataTest, elementTypeCharMappedNameNoPrefix)// NOLINT
EXPECT_EQ(elementType, 'E');
}
TEST_F(ComplexGeoDataTest, elementTypeCharMappedNameWithPrefix)// NOLINT
TEST_F(ComplexGeoDataTest, elementTypeCharMappedNameWithPrefix) // NOLINT
{
// Arrange
int size {0};
@@ -346,7 +346,7 @@ TEST_F(ComplexGeoDataTest, elementTypeCharMappedNameWithPrefix)// NOLINT
EXPECT_EQ(elementType, 'E');
}
TEST_F(ComplexGeoDataTest, resetElementMapNoArgument)// NOLINT
TEST_F(ComplexGeoDataTest, resetElementMapNoArgument) // NOLINT
{
// Arrange & Act
cgd().resetElementMap();
@@ -355,7 +355,7 @@ TEST_F(ComplexGeoDataTest, resetElementMapNoArgument)// NOLINT
EXPECT_EQ(cgd().getElementMapSize(), 0);
}
TEST_F(ComplexGeoDataTest, resetElementMapWithArgument)// NOLINT
TEST_F(ComplexGeoDataTest, resetElementMapWithArgument) // NOLINT
{
// Arrange
auto elementMap = std::make_shared<Data::ElementMap>();
@@ -370,7 +370,7 @@ TEST_F(ComplexGeoDataTest, resetElementMapWithArgument)// NOLINT
EXPECT_EQ(cgd().getElementMapSize(), 1);
}
TEST_F(ComplexGeoDataTest, setAndGetElementMap)// NOLINT
TEST_F(ComplexGeoDataTest, setAndGetElementMap) // NOLINT
{
// Arrange
auto elementMap = std::make_shared<Data::ElementMap>();
@@ -393,7 +393,7 @@ TEST_F(ComplexGeoDataTest, setAndGetElementMap)// NOLINT
EXPECT_EQ(resultingElementMap.size(), vecMappedElements.size());
}
TEST_F(ComplexGeoDataTest, getElementMapSize)// NOLINT
TEST_F(ComplexGeoDataTest, getElementMapSize) // NOLINT
{
// Arrange
auto elementMap = std::make_shared<Data::ElementMap>();
@@ -409,7 +409,7 @@ TEST_F(ComplexGeoDataTest, getElementMapSize)// NOLINT
EXPECT_EQ(result, 1);
}
TEST_F(ComplexGeoDataTest, flushElementMap)// NOLINT
TEST_F(ComplexGeoDataTest, flushElementMap) // NOLINT
{
// Does nothing in the base class
}

View File

@@ -149,7 +149,7 @@ TEST_F(ElementMapTest, setElementNameWithHashing)
Data::ElementMap elementMap;
std::ostringstream ss;
Data::IndexedName element("Edge", 1);
Data::MappedName elementNameHolder(element);// Will get modified by the encoder
Data::MappedName elementNameHolder(element); // Will get modified by the encoder
const Data::MappedName expectedName(element);
// Act
@@ -376,7 +376,7 @@ TEST_F(ElementMapTest, mimicSimpleUnion)
// we are only going to simulate one face for testing purpose
Data::IndexedName uface3("Face", 3);
auto PartOp = "FUS";// Part::OpCodes::Fuse;
auto PartOp = "FUS"; // Part::OpCodes::Fuse;
// Act
// act: simulate a union/fuse operation
@@ -468,7 +468,7 @@ TEST_F(ElementMapTest, mimicOperationAgainstSelf)
// Assert
EXPECT_EQ(postfixStr, ":M9999;MYS");
EXPECT_EQ(finalPart.elementMapPtr->find(uface3).toString(), "Face3");// override not forced
EXPECT_EQ(finalPart.elementMapPtr->find(uface3).toString(), "Face3"); // override not forced
EXPECT_EQ(uface3Holder.toString(), "Face6;:M9999;MYS;:H63:b,F");
// explaining ";Face6;:M2;MYS;:H2:3,F" name:
//
@@ -511,7 +511,7 @@ TEST_F(ElementMapTest, hashChildMapsTest)
7,
3L,
Data::ElementMapPtr(),
QByteArray("abcdefghij"),// postfix must be 10 or more bytes to invoke hasher
QByteArray("abcdefghij"), // postfix must be 10 or more bytes to invoke hasher
_sid};
std::vector<Data::ElementMap::MappedChildElements> children = {childOne};
cube.elementMapPtr->addChildElements(cube.Tag, children);
@@ -536,7 +536,7 @@ TEST_F(ElementMapTest, addAndGetChildElementsTest)
7,
3L,
Data::ElementMapPtr(),
QByteArray("abcdefghij"),// postfix must be 10 or more bytes to invoke hasher
QByteArray("abcdefghij"), // postfix must be 10 or more bytes to invoke hasher
_sid};
Data::ElementMap::MappedChildElements childTwo =
{Data::IndexedName("Pong", 2), 2, 7, 4L, Data::ElementMapPtr(), QByteArray("abc"), _sid};

View File

@@ -374,7 +374,7 @@ TEST_F(IndexedNameTest, booleanConversionFalse)
}
// Usage example:
auto indexedName = Data::IndexedName(".EDGE", 1);// Invalid name
auto indexedName = Data::IndexedName(".EDGE", 1); // Invalid name
if (indexedName) {
FAIL() << "indexedName as a boolean should have been false for an invalid name";
}
@@ -474,7 +474,7 @@ TEST_F(IndexedNameTest, assignmentOperator)
const int testIndex2 {24};
auto indexedName1 = Data::IndexedName::fromConst("TestName", testIndex1);
auto indexedName2 = Data::IndexedName::fromConst("TestName2", testIndex2);
EXPECT_NE(indexedName1, indexedName2);// Ensure the test is set up correctly
EXPECT_NE(indexedName1, indexedName2); // Ensure the test is set up correctly
// Act
indexedName1 = indexedName2;

View File

@@ -55,7 +55,7 @@ TEST_F(MappedElementTest, assignmentOperator)
// Arrange
auto mappedElementA = givenMappedElement("EDGE1", "OTHER_NAME");
auto mappedElementB = givenMappedElement("EDGE2", "ANOTHER_NAME");
EXPECT_NE(mappedElementA, mappedElementB);// Verify test setup
EXPECT_NE(mappedElementA, mappedElementB); // Verify test setup
// Act
mappedElementA = mappedElementB;
@@ -69,7 +69,7 @@ TEST_F(MappedElementTest, moveAssignmentOperator)
// Arrange
auto mappedElementA = givenMappedElement("EDGE1", "OTHER_NAME");
auto mappedElementB = givenMappedElement("EDGE2", "ANOTHER_NAME");
EXPECT_NE(mappedElementA, mappedElementB);// Verify test setup
EXPECT_NE(mappedElementA, mappedElementB); // Verify test setup
// Act
mappedElementA = std::move(mappedElementB);

View File

@@ -102,7 +102,7 @@ TEST(MappedName, constructFromIndexedNameNoIndex)
Data::MappedName mappedName {indexedName};
// Assert
EXPECT_EQ(mappedName.dataBytes().constData(), indexedName.getType());// shared memory
EXPECT_EQ(mappedName.dataBytes().constData(), indexedName.getType()); // shared memory
EXPECT_EQ(mappedName.isRaw(), true);
}
@@ -115,7 +115,7 @@ TEST(MappedName, constructFromIndexedNameWithIndex)
Data::MappedName mappedName {indexedName};
// Assert
EXPECT_NE(mappedName.dataBytes().constData(), indexedName.getType());// NOT shared memory
EXPECT_NE(mappedName.dataBytes().constData(), indexedName.getType()); // NOT shared memory
EXPECT_EQ(mappedName.isRaw(), false);
EXPECT_EQ(mappedName.toString(), indexedName.toString());
}
@@ -245,7 +245,7 @@ TEST(MappedName, fromRawDataCopy)
QByteArray testByteArray("TESTTEST", 10);
Data::MappedName temp = Data::MappedName::fromRawData(testByteArray);
temp.append("TESTPOSTFIX");
temp.compact();// Always call compact before accessing data!
temp.compact(); // Always call compact before accessing data!
// Act
Data::MappedName mappedName = Data::MappedName::fromRawData(temp, 0);
@@ -263,8 +263,8 @@ TEST(MappedName, fromRawDataCopyStartposAndSize)
// Arrange
QByteArray testByteArray("TESTTEST", 8);
Data::MappedName temp = Data::MappedName::fromRawData(testByteArray);
temp.append("ABCDEFGHIJKLM");// postfix
temp.compact(); // Always call compact before accessing data!
temp.append("ABCDEFGHIJKLM"); // postfix
temp.compact(); // Always call compact before accessing data!
// Act
Data::MappedName mappedName = Data::MappedName::fromRawData(temp, 2, 13);
@@ -576,8 +576,8 @@ TEST(MappedName, appendToBufferWithPrefix)
EXPECT_EQ(buffer, std::string("STUFF") + elemMapPrefix + std::string("TESTPOSTFIXTEST"));
// Arrange
Data::MappedName mappedName2("TEST");// If mappedName does not have a postfix and is a valid
// indexedName: prefix is not added
Data::MappedName mappedName2("TEST"); // If mappedName does not have a postfix and is a valid
// indexedName: prefix is not added
// Act
mappedName2.appendToBufferWithPrefix(buffer);
@@ -602,8 +602,8 @@ TEST(MappedName, toPrefixedString)
EXPECT_EQ(buffer, std::string("STUFF") + elemMapPrefix + std::string("TESTPOSTFIXTEST"));
// Arrange
Data::MappedName mappedName2("TEST");// If mappedName does not have a postfix and is a valid
// indexedName: prefix is not added
Data::MappedName mappedName2("TEST"); // If mappedName does not have a postfix and is a valid
// indexedName: prefix is not added
// Act
buffer += mappedName2.toPrefixedString();
@@ -732,7 +732,7 @@ TEST(MappedName, find)
EXPECT_EQ(mappedName.find(""), 0);
EXPECT_EQ(mappedName.find(std::string("")), 0);
EXPECT_EQ(mappedName.find("TEST"), 0);
EXPECT_EQ(mappedName.find("STPO"), -1);// sentence must be fully contained in data or postfix
EXPECT_EQ(mappedName.find("STPO"), -1); // sentence must be fully contained in data or postfix
EXPECT_EQ(mappedName.find("POST"), 4);
EXPECT_EQ(mappedName.find("POST", 4), 4);
EXPECT_EQ(mappedName.find("POST", 5), -1);
@@ -766,7 +766,7 @@ TEST(MappedName, rfind)
EXPECT_EQ(mappedName.rfind(""), mappedName.size());
EXPECT_EQ(mappedName.rfind(std::string("")), mappedName.size());
EXPECT_EQ(mappedName.rfind("TEST"), 11);
EXPECT_EQ(mappedName.rfind("STPO"), -1);// sentence must be fully contained in data or postfix
EXPECT_EQ(mappedName.rfind("STPO"), -1); // sentence must be fully contained in data or postfix
EXPECT_EQ(mappedName.rfind("POST"), 4);
EXPECT_EQ(mappedName.rfind("POST", 4), 4);
EXPECT_EQ(mappedName.rfind("POST", 3), -1);
@@ -853,11 +853,11 @@ TEST(MappedName, findTagInElementNameHexPositiveIndexNonrecursive)
mappedName.findTagInElementName(&tagOutput, &lenOutput, &postfix, &type, false, false);
// Assert
EXPECT_EQ(result, 36); // The location of the tag
EXPECT_EQ(tagOutput, 0x1b);// The tag
EXPECT_EQ(lenOutput, 20); // The calculated length based on the tag's length parameter
EXPECT_EQ(result, 36); // The location of the tag
EXPECT_EQ(tagOutput, 0x1b); // The tag
EXPECT_EQ(lenOutput, 20); // The calculated length based on the tag's length parameter
EXPECT_EQ(postfix, ";:H1b:10,F");
EXPECT_EQ(type, 'F');// F=Face
EXPECT_EQ(type, 'F'); // F=Face
}
TEST(MappedName, findTagInElementNameDecPositiveIndexNonrecursive)
@@ -876,11 +876,11 @@ TEST(MappedName, findTagInElementNameDecPositiveIndexNonrecursive)
mappedName.findTagInElementName(&tagOutput, &lenOutput, &postfix, &type, false, false);
// Assert
EXPECT_EQ(result, 36); // The location of the tag
EXPECT_EQ(tagOutput, 27);// The tag
EXPECT_EQ(lenOutput, 16);// The specified length
EXPECT_EQ(result, 36); // The location of the tag
EXPECT_EQ(tagOutput, 27); // The tag
EXPECT_EQ(lenOutput, 16); // The specified length
EXPECT_EQ(postfix, ";:T27:16,F");
EXPECT_EQ(type, 'F');// F=Face
EXPECT_EQ(type, 'F'); // F=Face
}
TEST(MappedName, findTagInElementNameHexNegativeIndexNonrecursive)
@@ -899,11 +899,11 @@ TEST(MappedName, findTagInElementNameHexNegativeIndexNonrecursive)
mappedName.findTagInElementName(&tagOutput, &lenOutput, &postfix, &type, false, false);
// Assert
EXPECT_EQ(result, 36); // The location of the tag
EXPECT_EQ(tagOutput, 0x1b);// The tag is returned positive, even though it was input negative
EXPECT_EQ(lenOutput, 20); // The calculated length based on the tag's length parameter
EXPECT_EQ(result, 36); // The location of the tag
EXPECT_EQ(tagOutput, 0x1b); // The tag is returned positive, even though it was input negative
EXPECT_EQ(lenOutput, 20); // The calculated length based on the tag's length parameter
EXPECT_EQ(postfix, ";:H-1b:10,F");
EXPECT_EQ(type, 'F');// F=Face
EXPECT_EQ(type, 'F'); // F=Face
}
TEST(MappedName, findTagInElementNameHexExpectedNegativeIndexNonrecursive)
@@ -922,11 +922,11 @@ TEST(MappedName, findTagInElementNameHexExpectedNegativeIndexNonrecursive)
mappedName.findTagInElementName(&tagOutput, &lenOutput, &postfix, &type, true, false);
// Assert
EXPECT_EQ(result, 36); // The location of the tag
EXPECT_EQ(tagOutput, -0x1b);// The tag is returned negative
EXPECT_EQ(lenOutput, 20); // The calculated length based on the tag's length parameter
EXPECT_EQ(result, 36); // The location of the tag
EXPECT_EQ(tagOutput, -0x1b); // The tag is returned negative
EXPECT_EQ(lenOutput, 20); // The calculated length based on the tag's length parameter
EXPECT_EQ(postfix, ";:H-1b:10,F");
EXPECT_EQ(type, 'F');// F=Face
EXPECT_EQ(type, 'F'); // F=Face
}
TEST(MappedName, findTagInElementNameRecursive)
@@ -945,11 +945,11 @@ TEST(MappedName, findTagInElementNameRecursive)
mappedName.findTagInElementName(&tagOutput, &lenOutput, &postfix, &type, false, true);
// Assert
EXPECT_EQ(result, 36); // The location of the tag
EXPECT_EQ(tagOutput, 0x1b);// The tag
EXPECT_EQ(lenOutput, 27); // Now includes the next tag, from the recursive search
EXPECT_EQ(result, 36); // The location of the tag
EXPECT_EQ(tagOutput, 0x1b); // The tag
EXPECT_EQ(lenOutput, 27); // Now includes the next tag, from the recursive search
EXPECT_EQ(postfix, ";:H1b:10,F");
EXPECT_EQ(type, 'F');// F=Face
EXPECT_EQ(type, 'F'); // F=Face
}
TEST(MappedName, hash)

View File

@@ -24,7 +24,7 @@ protected:
}
};
TEST_F(StringIDTest, stringIDManualConstructionNoFlags)// NOLINT
TEST_F(StringIDTest, stringIDManualConstructionNoFlags) // NOLINT
{
// Arrange
const long expectedValue {42};
@@ -39,7 +39,7 @@ TEST_F(StringIDTest, stringIDManualConstructionNoFlags)// NOLINT
EXPECT_FALSE(id.isBinary());
}
TEST_F(StringIDTest, stringIDManualConstructionWithFlag)// NOLINT
TEST_F(StringIDTest, stringIDManualConstructionWithFlag) // NOLINT
{
// Arrange
const long expectedValue {42};
@@ -55,7 +55,7 @@ TEST_F(StringIDTest, stringIDManualConstructionWithFlag)// NOLINT
EXPECT_TRUE(id.isBinary());
}
TEST_F(StringIDTest, stringIDDefaultConstruction)// NOLINT
TEST_F(StringIDTest, stringIDDefaultConstruction) // NOLINT
{
// Arrange & Act
auto id = App::StringID();
@@ -64,7 +64,7 @@ TEST_F(StringIDTest, stringIDDefaultConstruction)// NOLINT
EXPECT_EQ(0, id.value());
}
TEST_F(StringIDTest, value)// NOLINT
TEST_F(StringIDTest, value) // NOLINT
{
// Arrange
const long expectedValueA {0};
@@ -85,12 +85,12 @@ TEST_F(StringIDTest, value)// NOLINT
EXPECT_EQ(expectedValueC, valueC);
}
TEST_F(StringIDTest, relatedIDs)// NOLINT
TEST_F(StringIDTest, relatedIDs) // NOLINT
{
// Nothing to test -- relatedIDs are storage-only in this class
}
TEST_F(StringIDTest, isBinary)// NOLINT
TEST_F(StringIDTest, isBinary) // NOLINT
{
// Arrange
auto flaggedID = givenFlaggedStringID(App::StringID::Flag::Binary);
@@ -101,7 +101,7 @@ TEST_F(StringIDTest, isBinary)// NOLINT
EXPECT_FALSE(controlID.isBinary());
}
TEST_F(StringIDTest, isHashed)// NOLINT
TEST_F(StringIDTest, isHashed) // NOLINT
{
// Arrange
auto flaggedID = givenFlaggedStringID(App::StringID::Flag::Hashed);
@@ -112,7 +112,7 @@ TEST_F(StringIDTest, isHashed)// NOLINT
EXPECT_FALSE(controlID.isHashed());
}
TEST_F(StringIDTest, isPostfixed)// NOLINT
TEST_F(StringIDTest, isPostfixed) // NOLINT
{
// Arrange
auto flaggedID = givenFlaggedStringID(App::StringID::Flag::Postfixed);
@@ -123,7 +123,7 @@ TEST_F(StringIDTest, isPostfixed)// NOLINT
EXPECT_FALSE(controlID.isPostfixed());
}
TEST_F(StringIDTest, isPostfixEncoded)// NOLINT
TEST_F(StringIDTest, isPostfixEncoded) // NOLINT
{
// Arrange
auto flaggedID = givenFlaggedStringID(App::StringID::Flag::PostfixEncoded);
@@ -134,7 +134,7 @@ TEST_F(StringIDTest, isPostfixEncoded)// NOLINT
EXPECT_FALSE(controlID.isPostfixEncoded());
}
TEST_F(StringIDTest, isIndexed)// NOLINT
TEST_F(StringIDTest, isIndexed) // NOLINT
{
// Arrange
auto flaggedID = givenFlaggedStringID(App::StringID::Flag::Indexed);
@@ -145,7 +145,7 @@ TEST_F(StringIDTest, isIndexed)// NOLINT
EXPECT_FALSE(controlID.isIndexed());
}
TEST_F(StringIDTest, isPrefixID)// NOLINT
TEST_F(StringIDTest, isPrefixID) // NOLINT
{
// Arrange
auto flaggedID = givenFlaggedStringID(App::StringID::Flag::PrefixID);
@@ -156,7 +156,7 @@ TEST_F(StringIDTest, isPrefixID)// NOLINT
EXPECT_FALSE(controlID.isPrefixID());
}
TEST_F(StringIDTest, isPrefixIDIndex)// NOLINT
TEST_F(StringIDTest, isPrefixIDIndex) // NOLINT
{
// Arrange
auto flaggedID = givenFlaggedStringID(App::StringID::Flag::PrefixIDIndex);
@@ -167,7 +167,7 @@ TEST_F(StringIDTest, isPrefixIDIndex)// NOLINT
EXPECT_FALSE(controlID.isPrefixIDIndex());
}
TEST_F(StringIDTest, isMarked)// NOLINT
TEST_F(StringIDTest, isMarked) // NOLINT
{
// Arrange
auto flaggedID = givenFlaggedStringID(App::StringID::Flag::Marked);
@@ -178,7 +178,7 @@ TEST_F(StringIDTest, isMarked)// NOLINT
EXPECT_FALSE(controlID.isMarked());
}
TEST_F(StringIDTest, isPersistent)// NOLINT
TEST_F(StringIDTest, isPersistent) // NOLINT
{
// Arrange
auto flaggedID = givenFlaggedStringID(App::StringID::Flag::Persistent);
@@ -189,17 +189,17 @@ TEST_F(StringIDTest, isPersistent)// NOLINT
EXPECT_FALSE(controlID.isPersistent());
}
TEST_F(StringIDTest, isFromSameHasher)// NOLINT
TEST_F(StringIDTest, isFromSameHasher) // NOLINT
{
// Nothing to test except when used by StringHasher
}
TEST_F(StringIDTest, getHasher)// NOLINT
TEST_F(StringIDTest, getHasher) // NOLINT
{
// Nothing to test except when used by StringHasher
}
TEST_F(StringIDTest, data)// NOLINT
TEST_F(StringIDTest, data) // NOLINT
{
// Arrange
QByteArray expectedData {"data", 4};
@@ -212,12 +212,12 @@ TEST_F(StringIDTest, data)// NOLINT
EXPECT_EQ(expectedData, data);
}
TEST_F(StringIDTest, postfix)// NOLINT
TEST_F(StringIDTest, postfix) // NOLINT
{
// Nothing to test except when used by StringHasher
}
TEST_F(StringIDTest, getPyObject)// NOLINT
TEST_F(StringIDTest, getPyObject) // NOLINT
{
// Arrange
Py_Initialize();
@@ -232,7 +232,7 @@ TEST_F(StringIDTest, getPyObject)// NOLINT
EXPECT_TRUE(PyObject_TypeCheck(py.ptr(), &App::StringIDPy::Type));
}
TEST_F(StringIDTest, getPyObjectWithIndex)// NOLINT
TEST_F(StringIDTest, getPyObjectWithIndex) // NOLINT
{
// Arrange
Py_Initialize();
@@ -247,7 +247,7 @@ TEST_F(StringIDTest, getPyObjectWithIndex)// NOLINT
ASSERT_TRUE(PyObject_TypeCheck(py.ptr(), &App::StringIDPy::Type));
}
TEST_F(StringIDTest, toStringWithoutIndex)// NOLINT
TEST_F(StringIDTest, toStringWithoutIndex) // NOLINT
{
// Arrange
const long bigHex = 0xfcad10;
@@ -260,10 +260,10 @@ TEST_F(StringIDTest, toStringWithoutIndex)// NOLINT
// Assert
EXPECT_EQ(std::string("#1"), resultA);
EXPECT_EQ(std::string("#fcad10"), resultB);// Make sure result is in hex
EXPECT_EQ(std::string("#fcad10"), resultB); // Make sure result is in hex
}
TEST_F(StringIDTest, toStringWithIndex)// NOLINT
TEST_F(StringIDTest, toStringWithIndex) // NOLINT
{
// Arrange
const long bigHex = 0xfcad10;
@@ -278,7 +278,7 @@ TEST_F(StringIDTest, toStringWithIndex)// NOLINT
EXPECT_EQ(std::string("#1"), resultB);
}
TEST_F(StringIDTest, fromStringWithEOFAndLengthGood)// NOLINT
TEST_F(StringIDTest, fromStringWithEOFAndLengthGood) // NOLINT
{
// Arrange
const std::string testString {"#1:fcad"};
@@ -292,7 +292,7 @@ TEST_F(StringIDTest, fromStringWithEOFAndLengthGood)// NOLINT
EXPECT_EQ(result.index, 0xfcad);
}
TEST_F(StringIDTest, fromStringExtraData)// NOLINT
TEST_F(StringIDTest, fromStringExtraData) // NOLINT
{
// Arrange
const std::string testString {"#1:fcad#2:bad"};
@@ -308,7 +308,7 @@ TEST_F(StringIDTest, fromStringExtraData)// NOLINT
EXPECT_EQ(falseResult.id, 1);
}
TEST_F(StringIDTest, fromStringLengthUnspecified)// NOLINT
TEST_F(StringIDTest, fromStringLengthUnspecified) // NOLINT
{
// Arrange
const std::string testString {"#1:fcad#2:bad"};
@@ -322,7 +322,7 @@ TEST_F(StringIDTest, fromStringLengthUnspecified)// NOLINT
EXPECT_EQ(falseResult.id, 1);
}
TEST_F(StringIDTest, fromStringShorterLength)// NOLINT
TEST_F(StringIDTest, fromStringShorterLength) // NOLINT
{
// Arrange
const int dataLength {7};
@@ -337,7 +337,7 @@ TEST_F(StringIDTest, fromStringShorterLength)// NOLINT
EXPECT_EQ(falseResult.id, 1);
}
TEST_F(StringIDTest, fromStringNoHashtag)// NOLINT
TEST_F(StringIDTest, fromStringNoHashtag) // NOLINT
{
// Arrange
const std::string testString {"1:fcad"};
@@ -349,7 +349,7 @@ TEST_F(StringIDTest, fromStringNoHashtag)// NOLINT
EXPECT_EQ(result.id, -1);
}
TEST_F(StringIDTest, fromStringNotHex)// NOLINT
TEST_F(StringIDTest, fromStringNotHex) // NOLINT
{
// Arrange
const std::string testStringA {"1:freecad"};
@@ -364,7 +364,7 @@ TEST_F(StringIDTest, fromStringNotHex)// NOLINT
EXPECT_EQ(resultB.id, -1);
}
TEST_F(StringIDTest, fromStringQByteArray)// NOLINT
TEST_F(StringIDTest, fromStringQByteArray) // NOLINT
{
// Arrange
const QByteArray testString {"#1:fcad", 7};
@@ -377,10 +377,10 @@ TEST_F(StringIDTest, fromStringQByteArray)// NOLINT
EXPECT_EQ(result.index, 0xfcad);
}
TEST_F(StringIDTest, dataToTextHashed)// NOLINT
TEST_F(StringIDTest, dataToTextHashed) // NOLINT
{
// Arrange
QByteArray buffer {"120ca87015d849dbea060eaf2295fcc4ee981427", 40};// NOLINT
QByteArray buffer {"120ca87015d849dbea060eaf2295fcc4ee981427", 40}; // NOLINT
auto id = App::StringID(1, buffer, App::StringID::Flag::Hashed);
// Act
@@ -390,10 +390,10 @@ TEST_F(StringIDTest, dataToTextHashed)// NOLINT
EXPECT_EQ(result, buffer.toBase64().constData());
}
TEST_F(StringIDTest, dataToTextBinary)// NOLINT
TEST_F(StringIDTest, dataToTextBinary) // NOLINT
{
// Arrange
QByteArray buffer {"120ca87015d849dbea060eaf2295fcc4ee981427", 40};// NOLINT
QByteArray buffer {"120ca87015d849dbea060eaf2295fcc4ee981427", 40}; // NOLINT
auto id = App::StringID(1, buffer, App::StringID::Flag::Binary);
// Act
@@ -403,7 +403,7 @@ TEST_F(StringIDTest, dataToTextBinary)// NOLINT
EXPECT_EQ(result, buffer.toBase64().constData());
}
TEST_F(StringIDTest, dataToTextNoIndex)// NOLINT
TEST_F(StringIDTest, dataToTextNoIndex) // NOLINT
{
// Arrange
QByteArray data {"data", 4};
@@ -416,7 +416,7 @@ TEST_F(StringIDTest, dataToTextNoIndex)// NOLINT
EXPECT_EQ(result, "data");
}
TEST_F(StringIDTest, dataToTextWithIndex)// NOLINT
TEST_F(StringIDTest, dataToTextWithIndex) // NOLINT
{
// Arrange
QByteArray data {"data", 4};
@@ -424,18 +424,18 @@ TEST_F(StringIDTest, dataToTextWithIndex)// NOLINT
// Act
auto resultA = id.dataToText(1);
auto resultB = id.dataToText(1024);// NOLINT
auto resultB = id.dataToText(1024); // NOLINT
// Assert
EXPECT_EQ(resultA, "data1");
EXPECT_EQ(resultB, "data1024");// Not hex!
EXPECT_EQ(resultB, "data1024"); // Not hex!
}
TEST_F(StringIDTest, dataToTextWithPostfix)// NOLINT
TEST_F(StringIDTest, dataToTextWithPostfix) // NOLINT
{
// Arrange
QByteArray data {"data", 4};
QByteArray postfix {"postfix", 7};// NOLINT
QByteArray postfix {"postfix", 7}; // NOLINT
auto id = App::StringID(1, data);
id.setPostfix(postfix);
@@ -446,7 +446,7 @@ TEST_F(StringIDTest, dataToTextWithPostfix)// NOLINT
EXPECT_EQ(result, "data1postfix");
}
TEST_F(StringIDTest, dataToBytesNoIndex)// NOLINT
TEST_F(StringIDTest, dataToBytesNoIndex) // NOLINT
{
// Arrange
QByteArray data {"data", 4};
@@ -459,7 +459,7 @@ TEST_F(StringIDTest, dataToBytesNoIndex)// NOLINT
EXPECT_EQ(data, result);
}
TEST_F(StringIDTest, dataToBytesWithIndex)// NOLINT
TEST_F(StringIDTest, dataToBytesWithIndex) // NOLINT
{
// Arrange
QByteArray data {"data", 4};
@@ -473,11 +473,11 @@ TEST_F(StringIDTest, dataToBytesWithIndex)// NOLINT
EXPECT_EQ(data + QByteArray::number(index), result);
}
TEST_F(StringIDTest, dataToBytesWithPostfix)// NOLINT
TEST_F(StringIDTest, dataToBytesWithPostfix) // NOLINT
{
// Arrange
QByteArray data {"data", 4};
QByteArray postfix {"postfix", 7};// NOLINT
QByteArray postfix {"postfix", 7}; // NOLINT
auto id = App::StringID(1, data);
id.setPostfix(postfix);
@@ -488,11 +488,11 @@ TEST_F(StringIDTest, dataToBytesWithPostfix)// NOLINT
EXPECT_EQ(data + postfix, result);
}
TEST_F(StringIDTest, dataToBytesWithIndexAndPostfix)// NOLINT
TEST_F(StringIDTest, dataToBytesWithIndexAndPostfix) // NOLINT
{
// Arrange
QByteArray data {"data", 4};
QByteArray postfix {"postfix", 7};// NOLINT
QByteArray postfix {"postfix", 7}; // NOLINT
const int index {1234};
auto id = App::StringID(1, data);
id.setPostfix(postfix);
@@ -504,7 +504,7 @@ TEST_F(StringIDTest, dataToBytesWithIndexAndPostfix)// NOLINT
EXPECT_EQ(data + QByteArray::number(index) + postfix, result);
}
TEST_F(StringIDTest, mark)// NOLINT
TEST_F(StringIDTest, mark) // NOLINT
{
// Arrange
QByteArray data {"data", 4};
@@ -518,7 +518,7 @@ TEST_F(StringIDTest, mark)// NOLINT
EXPECT_TRUE(id.isMarked());
}
TEST_F(StringIDTest, setPersistent)// NOLINT
TEST_F(StringIDTest, setPersistent) // NOLINT
{
// Arrange
QByteArray data {"data", 4};
@@ -532,17 +532,17 @@ TEST_F(StringIDTest, setPersistent)// NOLINT
EXPECT_TRUE(id.isPersistent());
}
TEST_F(StringIDTest, operatorLessThan)// NOLINT
TEST_F(StringIDTest, operatorLessThan) // NOLINT
{
// Can't test without a _hasher
}
TEST_F(StringIDTest, compare)// NOLINT
TEST_F(StringIDTest, compare) // NOLINT
{
// Can't test without a _hasher
}
TEST_F(StringIDTest, IndexIDBooleanConversion)// NOLINT
TEST_F(StringIDTest, IndexIDBooleanConversion) // NOLINT
{
// Arrange
const long id {42};
@@ -555,7 +555,7 @@ TEST_F(StringIDTest, IndexIDBooleanConversion)// NOLINT
EXPECT_FALSE(indexIdFalse);
}
TEST_F(StringIDTest, IndexIDStreamInsertionOperator)// NOLINT
TEST_F(StringIDTest, IndexIDStreamInsertionOperator) // NOLINT
{
// Arrange
const long id {42};
@@ -589,7 +589,7 @@ private:
};
TEST_F(StringIDRefTest, defaultConstructor)// NOLINT
TEST_F(StringIDRefTest, defaultConstructor) // NOLINT
{
// Arrange & Act
auto idRef = App::StringIDRef();
@@ -598,7 +598,7 @@ TEST_F(StringIDRefTest, defaultConstructor)// NOLINT
EXPECT_FALSE(idRef);
}
TEST_F(StringIDRefTest, constructFromNewStringID)// NOLINT
TEST_F(StringIDRefTest, constructFromNewStringID) // NOLINT
{
// Arrange & Act
auto idRef = App::StringIDRef(createStringID());
@@ -611,7 +611,7 @@ TEST_F(StringIDRefTest, constructFromNewStringID)// NOLINT
// when its destructor is called (upon exit from this test function).
}
TEST_F(StringIDRefTest, constructFromStringIDAndIndex)// NOLINT
TEST_F(StringIDRefTest, constructFromStringIDAndIndex) // NOLINT
{
// Arrange
const int index {42};
@@ -628,7 +628,7 @@ TEST_F(StringIDRefTest, constructFromStringIDAndIndex)// NOLINT
// when its destructor is called (upon exit from this test function).
}
TEST_F(StringIDRefTest, copyConstructor)// NOLINT
TEST_F(StringIDRefTest, copyConstructor) // NOLINT
{
// Arrange
const int index {42};
@@ -644,7 +644,7 @@ TEST_F(StringIDRefTest, copyConstructor)// NOLINT
EXPECT_EQ(index, newIdRef.getIndex());
}
TEST_F(StringIDRefTest, copyConstructorWithIndex)// NOLINT
TEST_F(StringIDRefTest, copyConstructorWithIndex) // NOLINT
{
// Arrange
const int index {42};
@@ -661,7 +661,7 @@ TEST_F(StringIDRefTest, copyConstructorWithIndex)// NOLINT
EXPECT_EQ(otherIndex, newIdRef.getIndex());
}
TEST_F(StringIDRefTest, moveConstructor)// NOLINT
TEST_F(StringIDRefTest, moveConstructor) // NOLINT
{
// Arrange
auto idRef = App::StringIDRef(createStringID());
@@ -673,14 +673,14 @@ TEST_F(StringIDRefTest, moveConstructor)// NOLINT
EXPECT_EQ(1, newIdRef.getRefCount());
}
TEST_F(StringIDRefTest, destructor)// NOLINT
TEST_F(StringIDRefTest, destructor) // NOLINT
{
// Arrange
auto idRef = App::StringIDRef(createStringID());
{
auto newIdRef = App::StringIDRef(idRef);
ASSERT_EQ(2, idRef.getRefCount());// Verify the test setup
ASSERT_EQ(2, idRef.getRefCount()); // Verify the test setup
// Act
// The scope ends, causing newIdRef destructor execution
@@ -690,7 +690,7 @@ TEST_F(StringIDRefTest, destructor)// NOLINT
EXPECT_EQ(1, idRef.getRefCount());
}
TEST_F(StringIDRefTest, reset)// NOLINT
TEST_F(StringIDRefTest, reset) // NOLINT
{
// Arrange
auto idRef = App::StringIDRef(createStringID());
@@ -702,7 +702,7 @@ TEST_F(StringIDRefTest, reset)// NOLINT
EXPECT_FALSE(idRef);
}
TEST_F(StringIDRefTest, resetWithStringID)// NOLINT
TEST_F(StringIDRefTest, resetWithStringID) // NOLINT
{
// Arrange
const int index {42};
@@ -716,7 +716,7 @@ TEST_F(StringIDRefTest, resetWithStringID)// NOLINT
EXPECT_NE(index, idRef.getIndex());
}
TEST_F(StringIDRefTest, resetWithStringIDAndIndex)// NOLINT
TEST_F(StringIDRefTest, resetWithStringIDAndIndex) // NOLINT
{
// Arrange
const int indexA {42};
@@ -731,7 +731,7 @@ TEST_F(StringIDRefTest, resetWithStringIDAndIndex)// NOLINT
EXPECT_EQ(indexB, idRef.getIndex());
}
TEST_F(StringIDRefTest, swap)// NOLINT
TEST_F(StringIDRefTest, swap) // NOLINT
{
// Arrange
const int indexA {42};
@@ -747,7 +747,7 @@ TEST_F(StringIDRefTest, swap)// NOLINT
EXPECT_EQ(indexA, idRefB.getIndex());
}
TEST_F(StringIDRefTest, assignmentFromSelf)// NOLINT
TEST_F(StringIDRefTest, assignmentFromSelf) // NOLINT
{
// Arrange
auto idRef = App::StringIDRef(createStringID());
@@ -759,12 +759,12 @@ TEST_F(StringIDRefTest, assignmentFromSelf)// NOLINT
EXPECT_EQ(1, idRef.getRefCount());
}
TEST_F(StringIDRefTest, assignmentToEmptyFromStringID)// NOLINT
TEST_F(StringIDRefTest, assignmentToEmptyFromStringID) // NOLINT
{
// Arrange
Py_Initialize();
auto idRef = App::StringIDRef();
ASSERT_FALSE(idRef);// Verify setup
ASSERT_FALSE(idRef); // Verify setup
// Act
idRef = createStringID();
@@ -773,7 +773,7 @@ TEST_F(StringIDRefTest, assignmentToEmptyFromStringID)// NOLINT
EXPECT_TRUE(idRef);
}
TEST_F(StringIDRefTest, assignmentFromStringIDRef)// NOLINT
TEST_F(StringIDRefTest, assignmentFromStringIDRef) // NOLINT
{
// Arrange
auto firstIdRef = App::StringIDRef(createStringID());
@@ -789,11 +789,11 @@ TEST_F(StringIDRefTest, assignmentFromStringIDRef)// NOLINT
EXPECT_EQ(1, firstIdRefExtra.getRefCount());
}
TEST_F(StringIDRefTest, moveAssignmentFromStringIDRef)// NOLINT
TEST_F(StringIDRefTest, moveAssignmentFromStringIDRef) // NOLINT
{
auto emptyIdRef = App::StringIDRef();
auto goodIdRef = App::StringIDRef(createStringID());
ASSERT_FALSE(emptyIdRef);// Verify setup
ASSERT_FALSE(emptyIdRef); // Verify setup
// Act
emptyIdRef = std::move(goodIdRef);
@@ -803,7 +803,7 @@ TEST_F(StringIDRefTest, moveAssignmentFromStringIDRef)// NOLINT
EXPECT_EQ(1, emptyIdRef.getRefCount());
}
TEST_F(StringIDRefTest, operatorLess)// NOLINT
TEST_F(StringIDRefTest, operatorLess) // NOLINT
{
// Arrange
auto emptySIDA = App::StringIDRef();
@@ -822,7 +822,7 @@ TEST_F(StringIDRefTest, operatorLess)// NOLINT
// NOTE: Cannot test the impact of hasher without a StringHasher
}
TEST_F(StringIDRefTest, operatorEquality)// NOLINT
TEST_F(StringIDRefTest, operatorEquality) // NOLINT
{
// Arrange
auto emptySIDA = App::StringIDRef();
@@ -838,7 +838,7 @@ TEST_F(StringIDRefTest, operatorEquality)// NOLINT
EXPECT_FALSE(nonEmptyA == nonEmptyOther);
}
TEST_F(StringIDRefTest, operatorInequality)// NOLINT
TEST_F(StringIDRefTest, operatorInequality) // NOLINT
{
// Arrange
auto emptySIDA = App::StringIDRef();
@@ -854,7 +854,7 @@ TEST_F(StringIDRefTest, operatorInequality)// NOLINT
EXPECT_TRUE(nonEmptyA != nonEmptyOther);
}
TEST_F(StringIDRefTest, booleanConversion)// NOLINT
TEST_F(StringIDRefTest, booleanConversion) // NOLINT
{
// Arrange
auto emptySID = App::StringIDRef();
@@ -865,7 +865,7 @@ TEST_F(StringIDRefTest, booleanConversion)// NOLINT
EXPECT_TRUE(nonEmpty);
}
TEST_F(StringIDRefTest, getRefCount)// NOLINT
TEST_F(StringIDRefTest, getRefCount) // NOLINT
{
// Arrange
auto stringID = createStringID();
@@ -881,7 +881,7 @@ TEST_F(StringIDRefTest, getRefCount)// NOLINT
EXPECT_EQ(2, secondCount);
}
TEST_F(StringIDRefTest, toString)// NOLINT
TEST_F(StringIDRefTest, toString) // NOLINT
{
// Arrange
auto emptySID = App::StringIDRef();
@@ -897,7 +897,7 @@ TEST_F(StringIDRefTest, toString)// NOLINT
EXPECT_FALSE(nonempty.empty());
}
TEST_F(StringIDRefTest, dataToText)// NOLINT
TEST_F(StringIDRefTest, dataToText) // NOLINT
{
// Arrange
auto emptySID = App::StringIDRef();
@@ -913,7 +913,7 @@ TEST_F(StringIDRefTest, dataToText)// NOLINT
EXPECT_FALSE(nonempty.empty());
}
TEST_F(StringIDRefTest, constData)// NOLINT
TEST_F(StringIDRefTest, constData) // NOLINT
{
// Arrange
auto sid = App::StringIDRef(createStringID());
@@ -926,7 +926,7 @@ TEST_F(StringIDRefTest, constData)// NOLINT
EXPECT_STREQ(constData, "data");
}
TEST_F(StringIDRefTest, deref)// NOLINT
TEST_F(StringIDRefTest, deref) // NOLINT
{
// Arrange
auto sid = createStringID();
@@ -936,7 +936,7 @@ TEST_F(StringIDRefTest, deref)// NOLINT
EXPECT_EQ(sid, &(ref.deref()));
}
TEST_F(StringIDRefTest, value)// NOLINT
TEST_F(StringIDRefTest, value) // NOLINT
{
// Arrange
auto empty = App::StringIDRef();
@@ -951,12 +951,12 @@ TEST_F(StringIDRefTest, value)// NOLINT
EXPECT_NE(0, nonEmptyValue);
}
TEST_F(StringIDRefTest, relatedIDs)// NOLINT
TEST_F(StringIDRefTest, relatedIDs) // NOLINT
{
// Nothing to test without a StringHasher
}
TEST_F(StringIDRefTest, isBinary)// NOLINT
TEST_F(StringIDRefTest, isBinary) // NOLINT
{
// Arrange
auto nothing = App::StringIDRef();
@@ -969,7 +969,7 @@ TEST_F(StringIDRefTest, isBinary)// NOLINT
EXPECT_FALSE(nonBinary.isBinary());
}
TEST_F(StringIDRefTest, isHashed)// NOLINT
TEST_F(StringIDRefTest, isHashed) // NOLINT
{
// Arrange
auto nothing = App::StringIDRef();
@@ -982,7 +982,7 @@ TEST_F(StringIDRefTest, isHashed)// NOLINT
EXPECT_FALSE(nonHashed.isHashed());
}
TEST_F(StringIDRefTest, toBytes)// NOLINT
TEST_F(StringIDRefTest, toBytes) // NOLINT
{
// Arrange
QByteArray byteStorage;
@@ -995,7 +995,7 @@ TEST_F(StringIDRefTest, toBytes)// NOLINT
EXPECT_FALSE(byteStorage.isNull());
}
TEST_F(StringIDRefTest, getPyObject)// NOLINT
TEST_F(StringIDRefTest, getPyObject) // NOLINT
{
// Arrange
auto ref = App::StringIDRef(createStringID());
@@ -1010,7 +1010,7 @@ TEST_F(StringIDRefTest, getPyObject)// NOLINT
EXPECT_EQ(none.ptr(), Py_None);
}
TEST_F(StringIDRefTest, mark)// NOLINT
TEST_F(StringIDRefTest, mark) // NOLINT
{
// Arrange
auto ref = App::StringIDRef(createStringID());
@@ -1023,7 +1023,7 @@ TEST_F(StringIDRefTest, mark)// NOLINT
EXPECT_TRUE(ref.isMarked());
}
TEST_F(StringIDRefTest, isMarked)// NOLINT
TEST_F(StringIDRefTest, isMarked) // NOLINT
{
// Arrange
auto marked = App::StringIDRef(new App::StringID(1, nullptr, App::StringID::Flag::Marked));
@@ -1034,17 +1034,17 @@ TEST_F(StringIDRefTest, isMarked)// NOLINT
EXPECT_FALSE(notMarked.isMarked());
}
TEST_F(StringIDRefTest, isFromSameHasher)// NOLINT
TEST_F(StringIDRefTest, isFromSameHasher) // NOLINT
{
// Nothing to test, requires a StringHasher
}
TEST_F(StringIDRefTest, getHasher)// NOLINT
TEST_F(StringIDRefTest, getHasher) // NOLINT
{
// Nothing to test, requires a StringHasher
}
TEST_F(StringIDRefTest, setPersistent)// NOLINT
TEST_F(StringIDRefTest, setPersistent) // NOLINT
{
// Arrange
auto persistent = App::StringIDRef(createStringID());
@@ -1104,7 +1104,7 @@ private:
Base::Reference<App::StringHasher> _hasher;
};
TEST_F(StringHasherTest, defaultConstructor)// NOLINT
TEST_F(StringHasherTest, defaultConstructor) // NOLINT
{
// Arrange
// Done in Setup()
@@ -1116,7 +1116,7 @@ TEST_F(StringHasherTest, defaultConstructor)// NOLINT
EXPECT_EQ(0, Hasher()->size());
}
TEST_F(StringHasherTest, getMemSize)// NOLINT
TEST_F(StringHasherTest, getMemSize) // NOLINT
{
// Arrange
givenSomeHashedValues();
@@ -1130,49 +1130,49 @@ TEST_F(StringHasherTest, getMemSize)// NOLINT
EXPECT_LT(Hasher()->size(), result);
}
TEST_F(StringHasherTest, Save)// NOLINT
TEST_F(StringHasherTest, Save) // NOLINT
{
// Arrange
// Act
// Assert
}
TEST_F(StringHasherTest, Restore)// NOLINT
TEST_F(StringHasherTest, Restore) // NOLINT
{
// Arrange
// Act
// Assert
}
TEST_F(StringHasherTest, SaveDocFile)// NOLINT
TEST_F(StringHasherTest, SaveDocFile) // NOLINT
{
// Arrange
// Act
// Assert
}
TEST_F(StringHasherTest, RestoreDocFile)// NOLINT
TEST_F(StringHasherTest, RestoreDocFile) // NOLINT
{
// Arrange
// Act
// Assert
}
TEST_F(StringHasherTest, setPersistenceFileName)// NOLINT
TEST_F(StringHasherTest, setPersistenceFileName) // NOLINT
{
// Arrange
// Act
// Assert
}
TEST_F(StringHasherTest, getPersistenceFileName)// NOLINT
TEST_F(StringHasherTest, getPersistenceFileName) // NOLINT
{
// Arrange
// Act
// Assert
}
TEST_F(StringHasherTest, getIDFromQByteArrayShort)// NOLINT
TEST_F(StringHasherTest, getIDFromQByteArrayShort) // NOLINT
{
// Arrange
const std::array<char, 5> string {"data"};
@@ -1185,11 +1185,11 @@ TEST_F(StringHasherTest, getIDFromQByteArrayShort)// NOLINT
// Assert
EXPECT_STREQ(string.data(), id.constData());
EXPECT_FALSE(id.isHashed());
EXPECT_NE(qba.constData(), id.constData());// A copy was made, the pointers differ
EXPECT_NE(qba.constData(), id.constData()); // A copy was made, the pointers differ
EXPECT_EQ(2, id.getRefCount());
}
TEST_F(StringHasherTest, getIDFromQByteArrayLongHashable)// NOLINT
TEST_F(StringHasherTest, getIDFromQByteArrayLongHashable) // NOLINT
{
// Arrange
const std::array<char, 47> string {"data that is longer than our hasher threshold"};
@@ -1202,10 +1202,10 @@ TEST_F(StringHasherTest, getIDFromQByteArrayLongHashable)// NOLINT
// Assert
EXPECT_STRNE(string.data(), id.constData());
EXPECT_TRUE(id.isHashed());
EXPECT_NE(qba.constData(), id.constData());// A copy was made, the pointers differ
EXPECT_NE(qba.constData(), id.constData()); // A copy was made, the pointers differ
}
TEST_F(StringHasherTest, getIDFromQByteArrayLongUnhashable)// NOLINT
TEST_F(StringHasherTest, getIDFromQByteArrayLongUnhashable) // NOLINT
{
// Arrange
const std::array<char, 47> string {"data that is longer than our hasher threshold"};
@@ -1218,10 +1218,10 @@ TEST_F(StringHasherTest, getIDFromQByteArrayLongUnhashable)// NOLINT
// Assert
EXPECT_STREQ(string.data(), id.constData());
EXPECT_FALSE(id.isHashed());
EXPECT_NE(qba.constData(), id.constData());// A copy was made, the pointers differ
EXPECT_NE(qba.constData(), id.constData()); // A copy was made, the pointers differ
}
TEST_F(StringHasherTest, getIDFromQByteArrayNoCopy)// NOLINT
TEST_F(StringHasherTest, getIDFromQByteArrayNoCopy) // NOLINT
{
// Arrange
const std::array<char, 5> string {"data"};
@@ -1233,10 +1233,10 @@ TEST_F(StringHasherTest, getIDFromQByteArrayNoCopy)// NOLINT
// Assert
EXPECT_STREQ(string.data(), id.constData());
EXPECT_EQ(qba.constData(), id.constData());// No copy was made, the pointers are the same
EXPECT_EQ(qba.constData(), id.constData()); // No copy was made, the pointers are the same
}
TEST_F(StringHasherTest, getIDFromQByteArrayTwoDifferentStrings)// NOLINT
TEST_F(StringHasherTest, getIDFromQByteArrayTwoDifferentStrings) // NOLINT
{
// Arrange
const std::array<char, 6> stringA {"dataA"};
@@ -1252,7 +1252,7 @@ TEST_F(StringHasherTest, getIDFromQByteArrayTwoDifferentStrings)// NOLINT
EXPECT_NE(idA.dataToText(), idB.dataToText());
}
TEST_F(StringHasherTest, getIDFromQByteArrayTwoIdenticalStrings)// NOLINT
TEST_F(StringHasherTest, getIDFromQByteArrayTwoIdenticalStrings) // NOLINT
{
// Arrange
const std::array<char, 5> stringA {"data"};
@@ -1268,7 +1268,7 @@ TEST_F(StringHasherTest, getIDFromQByteArrayTwoIdenticalStrings)// NOLINT
EXPECT_EQ(idA.dataToText(), idB.dataToText());
}
TEST_F(StringHasherTest, getIDFromQByteArrayBinaryFlag)// NOLINT
TEST_F(StringHasherTest, getIDFromQByteArrayBinaryFlag) // NOLINT
{
// Arrange
const std::array<char, 5> string {"data"};
@@ -1281,7 +1281,7 @@ TEST_F(StringHasherTest, getIDFromQByteArrayBinaryFlag)// NOLINT
EXPECT_TRUE(id.isBinary());
}
TEST_F(StringHasherTest, getIDFromCString)// NOLINT
TEST_F(StringHasherTest, getIDFromCString) // NOLINT
{
// Arrange
// Act
@@ -1300,7 +1300,7 @@ TEST_F(StringHasherTest, getIDFromCString)// NOLINT
* 8. If sids.size() > 10, duplicates get removed
*/
TEST_F(StringHasherTest, getIDFromMappedNameWithoutPostfixWithoutIndex)// NOLINT
TEST_F(StringHasherTest, getIDFromMappedNameWithoutPostfixWithoutIndex) // NOLINT
{
// Arrange
const char* name {"Face"};
@@ -1315,7 +1315,7 @@ TEST_F(StringHasherTest, getIDFromMappedNameWithoutPostfixWithoutIndex)// NOLINT
EXPECT_EQ(id.dataToText(), mappedName1.toString());
}
TEST_F(StringHasherTest, getIDFromMappedNameWithoutPostfixWithIndex)// NOLINT
TEST_F(StringHasherTest, getIDFromMappedNameWithoutPostfixWithIndex) // NOLINT
{
// Arrange
const char* expectedName {"Face"};
@@ -1332,7 +1332,7 @@ TEST_F(StringHasherTest, getIDFromMappedNameWithoutPostfixWithIndex)// NOLINT
EXPECT_EQ(id.dataToText(), mappedName1.toString());
}
TEST_F(StringHasherTest, getIDFromMappedNameWithoutIndexWithPostfix)// NOLINT
TEST_F(StringHasherTest, getIDFromMappedNameWithoutIndexWithPostfix) // NOLINT
{
// Arrange
const char* name {"Face"};
@@ -1351,7 +1351,7 @@ TEST_F(StringHasherTest, getIDFromMappedNameWithoutIndexWithPostfix)// NOLINT
EXPECT_EQ(expectedPostfix, id.deref().postfix());
}
TEST_F(StringHasherTest, getIDFromMappedNameWithIndexWithPostfix)// NOLINT
TEST_F(StringHasherTest, getIDFromMappedNameWithIndexWithPostfix) // NOLINT
{
// Arrange
const char* name {"Face3"};
@@ -1369,7 +1369,7 @@ TEST_F(StringHasherTest, getIDFromMappedNameWithIndexWithPostfix)// NOLINT
EXPECT_EQ(id.dataToText(), mappedName2.toString());
}
TEST_F(StringHasherTest, getIDFromMappedNameExistingNameNoIndex)// NOLINT
TEST_F(StringHasherTest, getIDFromMappedNameExistingNameNoIndex) // NOLINT
{
// Arrange
Data::MappedName mappedName1 = givenMappedName("SomeTestName");
@@ -1384,7 +1384,7 @@ TEST_F(StringHasherTest, getIDFromMappedNameExistingNameNoIndex)// NOLINT
EXPECT_EQ(secondIDInserted.dataToText(), mappedName1.toString());
}
TEST_F(StringHasherTest, getIDFromMappedNameExistingNameWithIndex)// NOLINT
TEST_F(StringHasherTest, getIDFromMappedNameExistingNameWithIndex) // NOLINT
{
// Arrange
auto mappedNameA = givenMappedName("Test1");
@@ -1400,7 +1400,7 @@ TEST_F(StringHasherTest, getIDFromMappedNameExistingNameWithIndex)// NOLINT
EXPECT_EQ(secondIDInserted.dataToText(), mappedNameB.toString());
}
TEST_F(StringHasherTest, getIDFromMappedNameExistingNameWithIndexAndPostfix)// NOLINT
TEST_F(StringHasherTest, getIDFromMappedNameExistingNameWithIndexAndPostfix) // NOLINT
{
// Arrange
auto mappedNameA = givenMappedName("Test1", ";:M;FUS;:Hb:7,F");
@@ -1416,7 +1416,7 @@ TEST_F(StringHasherTest, getIDFromMappedNameExistingNameWithIndexAndPostfix)// N
EXPECT_EQ(secondIDInserted.dataToText(), mappedNameB.toString());
}
TEST_F(StringHasherTest, getIDFromMappedNameDuplicateWithEncodedPostfix)// NOLINT
TEST_F(StringHasherTest, getIDFromMappedNameDuplicateWithEncodedPostfix) // NOLINT
{
// Arrange
auto mappedNameA = givenMappedName("Test1", ";:M;FUS;:Hb:7,F");
@@ -1432,7 +1432,7 @@ TEST_F(StringHasherTest, getIDFromMappedNameDuplicateWithEncodedPostfix)// NOLIN
EXPECT_EQ(secondIDInserted.dataToText(), mappedNameB.toString());
}
TEST_F(StringHasherTest, getIDFromIntegerIDNoSuchID)// NOLINT
TEST_F(StringHasherTest, getIDFromIntegerIDNoSuchID) // NOLINT
{
// Arrange
// Do nothing, so the hash table is empty
@@ -1444,7 +1444,7 @@ TEST_F(StringHasherTest, getIDFromIntegerIDNoSuchID)// NOLINT
EXPECT_FALSE(result);
}
TEST_F(StringHasherTest, getIDFromIntegerIDBadID)// NOLINT
TEST_F(StringHasherTest, getIDFromIntegerIDBadID) // NOLINT
{
// Arrange
const std::string prefix {"Test1"};
@@ -1461,7 +1461,7 @@ TEST_F(StringHasherTest, getIDFromIntegerIDBadID)// NOLINT
}
TEST_F(StringHasherTest, getIDMap)// NOLINT
TEST_F(StringHasherTest, getIDMap) // NOLINT
{
// Arrange
givenSomeHashedValues();
@@ -1473,7 +1473,7 @@ TEST_F(StringHasherTest, getIDMap)// NOLINT
EXPECT_GT(map.size(), 0);
}
TEST_F(StringHasherTest, clear)// NOLINT
TEST_F(StringHasherTest, clear) // NOLINT
{
// Arrange
givenSomeHashedValues();
@@ -1485,7 +1485,7 @@ TEST_F(StringHasherTest, clear)// NOLINT
EXPECT_EQ(0, Hasher()->size());
}
TEST_F(StringHasherTest, size)// NOLINT
TEST_F(StringHasherTest, size) // NOLINT
{
// Arrange
givenSomeHashedValues();
@@ -1497,7 +1497,7 @@ TEST_F(StringHasherTest, size)// NOLINT
EXPECT_GT(result, 0);
}
TEST_F(StringHasherTest, count)// NOLINT
TEST_F(StringHasherTest, count) // NOLINT
{
// Arrange
givenSomeHashedValues();
@@ -1509,7 +1509,7 @@ TEST_F(StringHasherTest, count)// NOLINT
EXPECT_GT(result, 0);
}
TEST_F(StringHasherTest, getPyObject)// NOLINT
TEST_F(StringHasherTest, getPyObject) // NOLINT
{
// Arrange - done in setUp()
@@ -1520,7 +1520,7 @@ TEST_F(StringHasherTest, getPyObject)// NOLINT
EXPECT_TRUE(PyObject_TypeCheck(py.ptr(), &App::StringHasherPy::Type));
}
TEST_F(StringHasherTest, setGetSaveAll)// NOLINT
TEST_F(StringHasherTest, setGetSaveAll) // NOLINT
{
// Arrange - done by setUp()
@@ -1535,7 +1535,7 @@ TEST_F(StringHasherTest, setGetSaveAll)// NOLINT
EXPECT_FALSE(expectedFalse);
}
TEST_F(StringHasherTest, setGetThreshold)// NOLINT
TEST_F(StringHasherTest, setGetThreshold) // NOLINT
{
// Arrange
const int expectedThreshold {42};
@@ -1548,7 +1548,7 @@ TEST_F(StringHasherTest, setGetThreshold)// NOLINT
EXPECT_EQ(expectedThreshold, foundThreshold);
}
TEST_F(StringHasherTest, clearMarks)// NOLINT
TEST_F(StringHasherTest, clearMarks) // NOLINT
{
// Arrange
auto ref = givenSomeHashedValues();
@@ -1562,7 +1562,7 @@ TEST_F(StringHasherTest, clearMarks)// NOLINT
ASSERT_FALSE(ref.isMarked());
}
TEST_F(StringHasherTest, compact)// NOLINT
TEST_F(StringHasherTest, compact) // NOLINT
{
// Arrange
givenSomeHashedValues();

View File

@@ -30,7 +30,7 @@ TEST(Axis, TestAssign)
Base::Axis move;
axis.setBase(Base::Vector3d(0, 0, 1));
axis.setDirection(Base::Vector3d(1, 1, 1));
move = std::move(axis);// NOLINT
move = std::move(axis); // NOLINT
EXPECT_EQ(move.getBase(), Base::Vector3d(0, 0, 1));
EXPECT_EQ(move.getDirection(), Base::Vector3d(1, 1, 1));
}

View File

@@ -72,7 +72,7 @@ TEST_F(ReaderTest, beginCharStreamOpenClose)
Reader()->readElement("data");
// Act
auto& result = Reader()->beginCharStream();// Not an error, even though there is no data
auto& result = Reader()->beginCharStream(); // Not an error, even though there is no data
// Assert
EXPECT_TRUE(result.good());
@@ -86,7 +86,7 @@ TEST_F(ReaderTest, beginCharStreamAlreadyBegun)
Reader()->beginCharStream();
// Act & Assert
EXPECT_THROW(Reader()->beginCharStream(), Base::XMLParseException);// NOLINT
EXPECT_THROW(Reader()->beginCharStream(), Base::XMLParseException); // NOLINT
}
TEST_F(ReaderTest, charStreamGood)
@@ -110,7 +110,7 @@ TEST_F(ReaderTest, charStreamBad)
Reader()->readElement("data");
// Act & Assert
EXPECT_THROW(Reader()->charStream(), Base::XMLParseException);// NOLINT
EXPECT_THROW(Reader()->charStream(), Base::XMLParseException); // NOLINT
}
TEST_F(ReaderTest, endCharStreamGood)
@@ -121,7 +121,7 @@ TEST_F(ReaderTest, endCharStreamGood)
Reader()->beginCharStream();
// Act & Assert
Reader()->endCharStream();// Does not throw
Reader()->endCharStream(); // Does not throw
}
TEST_F(ReaderTest, endCharStreamBad)
@@ -132,7 +132,7 @@ TEST_F(ReaderTest, endCharStreamBad)
// Do not open the stream...
// Act & Assert
Reader()->endCharStream();// Does not throw, even with no open stream
Reader()->endCharStream(); // Does not throw, even with no open stream
}
TEST_F(ReaderTest, readDataSmallerThanBuffer)
@@ -182,10 +182,10 @@ TEST_F(ReaderTest, readDataLargerThanBufferSecondRead)
Reader()->readElement("data");
Reader()->beginCharStream();
std::array<char, bufferSize> buffer {};
Reader()->read(buffer.data(), bufferSize);// Read the first five bytes
Reader()->read(buffer.data(), bufferSize); // Read the first five bytes
// Act
auto bytesRead = Reader()->read(buffer.data(), bufferSize);// Second five bytes
auto bytesRead = Reader()->read(buffer.data(), bufferSize); // Second five bytes
// Assert
for (size_t i = 0; i < bufferSize; ++i) {
@@ -208,5 +208,5 @@ TEST_F(ReaderTest, readDataNotStarted)
auto bytesRead = Reader()->read(buffer.data(), bufferSize);
// Assert
EXPECT_EQ(-1, bytesRead);// Because we didn't call beginCharStream
EXPECT_EQ(-1, bytesRead); // Because we didn't call beginCharStream
}

View File

@@ -29,7 +29,7 @@ TEST(Unit, TestTypeString)
EXPECT_EQ(toString(Base::Unit::Acceleration), "Acceleration");
EXPECT_EQ(toString(Base::Unit::AmountOfSubstance), "AmountOfSubstance");
EXPECT_EQ(toString(Base::Unit::Angle), "Angle");
EXPECT_EQ(toString(Base::Unit::AngleOfFriction), "Angle");// same unit as Angle
EXPECT_EQ(toString(Base::Unit::AngleOfFriction), "Angle"); // same unit as Angle
EXPECT_EQ(toString(Base::Unit::Area), "Area");
EXPECT_EQ(toString(Base::Unit::CurrentDensity), "CurrentDensity");
EXPECT_EQ(toString(Base::Unit::Density), "Density");
@@ -56,21 +56,21 @@ TEST(Unit, TestTypeString)
EXPECT_EQ(toString(Base::Unit::MagneticFlux), "MagneticFlux");
EXPECT_EQ(toString(Base::Unit::MagneticFluxDensity), "MagneticFluxDensity");
EXPECT_EQ(toString(Base::Unit::Magnetization),
"MagneticFieldStrength");// same as MagneticFieldStrength
"MagneticFieldStrength"); // same as MagneticFieldStrength
EXPECT_EQ(toString(Base::Unit::Mass), "Mass");
EXPECT_EQ(toString(Base::Unit::Pressure), "Pressure");
EXPECT_EQ(toString(Base::Unit::Power), "Power");
EXPECT_EQ(toString(Base::Unit::ShearModulus), "Pressure");// same as Pressure
EXPECT_EQ(toString(Base::Unit::ShearModulus), "Pressure"); // same as Pressure
EXPECT_EQ(toString(Base::Unit::SpecificEnergy), "SpecificEnergy");
EXPECT_EQ(toString(Base::Unit::SpecificHeat), "SpecificHeat");
EXPECT_EQ(toString(Base::Unit::Stiffness), "Stiffness");
EXPECT_EQ(toString(Base::Unit::Stress), "Pressure");// same as Pressure
EXPECT_EQ(toString(Base::Unit::Stress), "Pressure"); // same as Pressure
EXPECT_EQ(toString(Base::Unit::Temperature), "Temperature");
EXPECT_EQ(toString(Base::Unit::ThermalConductivity), "ThermalConductivity");
EXPECT_EQ(toString(Base::Unit::ThermalExpansionCoefficient), "ThermalExpansionCoefficient");
EXPECT_EQ(toString(Base::Unit::ThermalTransferCoefficient), "ThermalTransferCoefficient");
EXPECT_EQ(toString(Base::Unit::TimeSpan), "TimeSpan");
EXPECT_EQ(toString(Base::Unit::UltimateTensileStrength), "Pressure");// same as Pressure
EXPECT_EQ(toString(Base::Unit::UltimateTensileStrength), "Pressure"); // same as Pressure
EXPECT_EQ(toString(Base::Unit::VacuumPermittivity), "VacuumPermittivity");
EXPECT_EQ(toString(Base::Unit::Velocity), "Velocity");
EXPECT_EQ(toString(Base::Unit::Volume), "Volume");
@@ -78,8 +78,8 @@ TEST(Unit, TestTypeString)
EXPECT_EQ(toString(Base::Unit::VolumetricThermalExpansionCoefficient),
"ThermalExpansionCoefficient");
EXPECT_EQ(toString(Base::Unit::Work), "Work");
EXPECT_EQ(toString(Base::Unit::YieldStrength), "Pressure");// same as Pressure
EXPECT_EQ(toString(Base::Unit::YoungsModulus), "Pressure");// same unit as Pressure
EXPECT_EQ(toString(Base::Unit::YieldStrength), "Pressure"); // same as Pressure
EXPECT_EQ(toString(Base::Unit::YoungsModulus), "Pressure"); // same unit as Pressure
}
TEST(Unit, strings)
{

View File

@@ -97,7 +97,7 @@ TEST_F(WriterTest, endCharStreamTwice)
_writer.endCharStream();
// Act
_writer.endCharStream();// Doesn't throw, or do anything at all
_writer.endCharStream(); // Doesn't throw, or do anything at all
// Assert
EXPECT_EQ("<![CDATA[]]>", _writer.getString());

View File

@@ -33,19 +33,19 @@ private Q_SLOTS:
void cleanup()
{}
void test_SimpleBaseUnit()// NOLINT
void test_SimpleBaseUnit() // NOLINT
{
auto result = qsb->valueFromText("1mm");
QCOMPARE(result, Base::Quantity(1, QLatin1String("mm")));
}
void test_UnitInNumerator()// NOLINT
void test_UnitInNumerator() // NOLINT
{
auto result = qsb->valueFromText("1mm/10");
QCOMPARE(result, Base::Quantity(0.1, QLatin1String("mm")));
}
void test_UnitInDenominator()// NOLINT
void test_UnitInDenominator() // NOLINT
{
auto result = qsb->valueFromText("1/10mm");
QCOMPARE(result, Base::Quantity(0.1, QLatin1String("mm")));

View File

@@ -53,7 +53,7 @@ private:
"RootPoint"};
};
TEST_F(SketchObjectTest, createSketchObject)// NOLINT
TEST_F(SketchObjectTest, createSketchObject) // NOLINT
{
// Arrange

View File

@@ -35,7 +35,7 @@ private:
std::unique_ptr<SystemTest> _system;
};
TEST_F(GCSTest, clearConstraints)// NOLINT
TEST_F(GCSTest, clearConstraints) // NOLINT
{
// Arrange
const size_t numConstraints {100};

View File

@@ -12,7 +12,7 @@ TEST(Collection, TestValidity)
EXPECT_EQ(cc.getEntry("inexistant", zipios::FileCollection::MatchPath::IGNORE), nullptr);
EXPECT_EQ(cc.getInputStream("inexistant", zipios::FileCollection::MatchPath::MATCH), nullptr);
EXPECT_EQ(cc.getInputStream("inexistant", zipios::FileCollection::MatchPath::IGNORE), nullptr);
EXPECT_EQ(cc.getName(), "-");// default name is "-"
EXPECT_EQ(cc.getName(), "-"); // default name is "-"
EXPECT_EQ(cc.size(), 0);
cc.close();
EXPECT_EQ(cc.isValid(), false);
@@ -29,7 +29,7 @@ TEST(Collection, TestCopy)
EXPECT_EQ(copy.getInputStream("inexistant", zipios::FileCollection::MatchPath::MATCH), nullptr);
EXPECT_EQ(copy.getInputStream("inexistant", zipios::FileCollection::MatchPath::IGNORE),
nullptr);
EXPECT_EQ(copy.getName(), "-");// default name is "-"
EXPECT_EQ(copy.getName(), "-"); // default name is "-"
EXPECT_EQ(copy.size(), 0);
}
@@ -45,7 +45,7 @@ TEST(Collection, TestCopyAssign)
EXPECT_EQ(copy.getInputStream("inexistant", zipios::FileCollection::MatchPath::MATCH), nullptr);
EXPECT_EQ(copy.getInputStream("inexistant", zipios::FileCollection::MatchPath::IGNORE),
nullptr);
EXPECT_EQ(copy.getName(), "-");// default name is "-"
EXPECT_EQ(copy.getName(), "-"); // default name is "-"
EXPECT_EQ(copy.size(), 0);
}
@@ -61,7 +61,7 @@ TEST(Collection, TestClone)
nullptr);
EXPECT_EQ(pointer->getInputStream("inexistant", zipios::FileCollection::MatchPath::IGNORE),
nullptr);
EXPECT_EQ(pointer->getName(), "-");// default name is "-"
EXPECT_EQ(pointer->getName(), "-"); // default name is "-"
EXPECT_EQ(pointer->size(), 0);
}