Add clang-format (#1086)

Co-authored-by: mwilsnd <mwilsnd@gmail.com>
This commit is contained in:
Bart Louwers
2023-05-01 16:57:37 +02:00
committed by GitHub
parent 403a12bd1b
commit 71f6da2722
1018 changed files with 27876 additions and 25862 deletions

View File

@@ -49,24 +49,23 @@ TEST_P(StyleParserTest, ParseStyle) {
ASSERT_TRUE(infoDoc.IsObject());
for (const auto& property : infoDoc.GetObject()) {
const std::string name { property.name.GetString(), property.name.GetStringLength() };
const JSValue &value = property.value;
const std::string name{property.name.GetString(), property.name.GetStringLength()};
const JSValue& value = property.value;
ASSERT_EQ(true, value.IsObject());
if (value.HasMember("log")) {
const JSValue &js_log = value["log"];
const JSValue& js_log = value["log"];
ASSERT_EQ(true, js_log.IsArray());
for (auto& js_entry : js_log.GetArray()) {
ASSERT_EQ(true, js_entry.IsArray());
ASSERT_GE(4u, js_entry.Size());
const uint32_t count = js_entry[rapidjson::SizeType(0)].GetUint();
const FixtureLogObserver::LogMessage message {
const FixtureLogObserver::LogMessage message{
*Enum<EventSeverity>::toEnum(js_entry[rapidjson::SizeType(1)].GetString()),
*Enum<Event>::toEnum(js_entry[rapidjson::SizeType(2)].GetString()),
int64_t(-1),
js_entry[rapidjson::SizeType(3)].GetString()
};
js_entry[rapidjson::SizeType(3)].GetString()};
#if defined(WIN32)
Sleep(10);
@@ -76,7 +75,7 @@ TEST_P(StyleParserTest, ParseStyle) {
}
}
const auto &unchecked = observer->unchecked();
const auto& unchecked = observer->unchecked();
if (unchecked.size()) {
std::cerr << "Unchecked Log Messages (" << base << "/" << name << "): " << std::endl << unchecked;
}
@@ -109,9 +108,9 @@ static void populateNames(std::vector<std::string>& names) {
FindClose(hFind);
}
#else
DIR *dir = opendir(style_directory.c_str());
DIR* dir = opendir(style_directory.c_str());
if (dir != nullptr) {
for (dirent *dp = nullptr; (dp = readdir(dir)) != nullptr;) {
for (dirent* dp = nullptr; (dp = readdir(dir)) != nullptr;) {
const std::string name = dp->d_name;
testName(name);
}