diff --git a/cmds/idmap/inspect.cpp b/cmds/idmap/inspect.cpp index f6afc8594309a..154cb25a02a1f 100644 --- a/cmds/idmap/inspect.cpp +++ b/cmds/idmap/inspect.cpp @@ -2,6 +2,7 @@ #include #include +#include #include #include diff --git a/include/androidfw/Asset.h b/include/androidfw/Asset.h index 52c863774efb0..11709ce5f91b9 100644 --- a/include/androidfw/Asset.h +++ b/include/androidfw/Asset.h @@ -26,11 +26,12 @@ #include #include -#include #include namespace android { +class FileMap; + /* * Instances of this class provide read-only operations on a byte stream. * diff --git a/include/androidfw/ResourceTypes.h b/include/androidfw/ResourceTypes.h index 6349e86dae94e..08d6591e68868 100644 --- a/include/androidfw/ResourceTypes.h +++ b/include/androidfw/ResourceTypes.h @@ -22,7 +22,6 @@ #include #include -#include #include #include #include diff --git a/include/androidfw/TypeWrappers.h b/include/androidfw/TypeWrappers.h index 7bdf8af0ad4c7..4233b6bbee83b 100644 --- a/include/androidfw/TypeWrappers.h +++ b/include/androidfw/TypeWrappers.h @@ -18,6 +18,7 @@ #define __TYPE_WRAPPERS_H #include +#include namespace android { diff --git a/tools/aapt2/.clang-format b/tools/aapt2/.clang-format index 71c5ef2fcda08..545366a9b70b0 100644 --- a/tools/aapt2/.clang-format +++ b/tools/aapt2/.clang-format @@ -1,3 +1,2 @@ BasedOnStyle: Google -ColumnLimit: 100 diff --git a/tools/aapt2/Android.mk b/tools/aapt2/Android.mk index 284c7877d0546..197884dcf85ce 100644 --- a/tools/aapt2/Android.mk +++ b/tools/aapt2/Android.mk @@ -158,7 +158,7 @@ hostStaticLibs_windows := libz hostLdLibs_linux := -lz hostLdLibs_darwin := -lz -cFlags := -Wall -Werror -Wno-unused-parameter -UNDEBUG +cFlags := -Wall -Werror -Wno-unused-parameter cFlags_darwin := -D_DARWIN_UNLIMITED_STREAMS cFlags_windows := -Wno-maybe-uninitialized # Incorrectly marking use of Maybe.value() as error. cppFlags := -Wno-missing-field-initializers -fno-exceptions -fno-rtti diff --git a/tools/aapt2/AppInfo.h b/tools/aapt2/AppInfo.h index 2cbe117974406..1e488f70bd4d7 100644 --- a/tools/aapt2/AppInfo.h +++ b/tools/aapt2/AppInfo.h @@ -17,10 +17,10 @@ #ifndef AAPT_APP_INFO_H #define AAPT_APP_INFO_H -#include "util/Maybe.h" - #include +#include "util/Maybe.h" + namespace aapt { /** @@ -36,17 +36,17 @@ struct AppInfo { /** * The App's minimum SDK version. */ - Maybe minSdkVersion; + Maybe min_sdk_version; /** * The Version code of the app. */ - Maybe versionCode; + Maybe version_code; /** * The revision code of the app. */ - Maybe revisionCode; + Maybe revision_code; }; } // namespace aapt diff --git a/tools/aapt2/ConfigDescription.cpp b/tools/aapt2/ConfigDescription.cpp index 6598d63882001..289919a393739 100644 --- a/tools/aapt2/ConfigDescription.cpp +++ b/tools/aapt2/ConfigDescription.cpp @@ -15,22 +15,24 @@ */ #include "ConfigDescription.h" + +#include +#include + +#include "androidfw/ResourceTypes.h" + #include "Locale.h" #include "SdkConstants.h" #include "util/StringPiece.h" #include "util/Util.h" -#include -#include -#include - namespace aapt { using android::ResTable_config; static const char* kWildcardName = "any"; -const ConfigDescription& ConfigDescription::defaultConfig() { +const ConfigDescription& ConfigDescription::DefaultConfig() { static ConfigDescription config = {}; return config; } @@ -589,169 +591,169 @@ static bool parseVersion(const char* name, ResTable_config* out) { return true; } -bool ConfigDescription::parse(const StringPiece& str, ConfigDescription* out) { - std::vector parts = util::splitAndLowercase(str, '-'); +bool ConfigDescription::Parse(const StringPiece& str, ConfigDescription* out) { + std::vector parts = util::SplitAndLowercase(str, '-'); ConfigDescription config; - ssize_t partsConsumed = 0; + ssize_t parts_consumed = 0; LocaleValue locale; - const auto partsEnd = parts.end(); - auto partIter = parts.begin(); + const auto parts_end = parts.end(); + auto part_iter = parts.begin(); if (str.size() == 0) { goto success; } - if (parseMcc(partIter->c_str(), &config)) { - ++partIter; - if (partIter == partsEnd) { + if (parseMcc(part_iter->c_str(), &config)) { + ++part_iter; + if (part_iter == parts_end) { goto success; } } - if (parseMnc(partIter->c_str(), &config)) { - ++partIter; - if (partIter == partsEnd) { + if (parseMnc(part_iter->c_str(), &config)) { + ++part_iter; + if (part_iter == parts_end) { goto success; } } // Locale spans a few '-' separators, so we let it // control the index. - partsConsumed = locale.initFromParts(partIter, partsEnd); - if (partsConsumed < 0) { + parts_consumed = locale.InitFromParts(part_iter, parts_end); + if (parts_consumed < 0) { return false; } else { - locale.writeTo(&config); - partIter += partsConsumed; - if (partIter == partsEnd) { + locale.WriteTo(&config); + part_iter += parts_consumed; + if (part_iter == parts_end) { goto success; } } - if (parseLayoutDirection(partIter->c_str(), &config)) { - ++partIter; - if (partIter == partsEnd) { + if (parseLayoutDirection(part_iter->c_str(), &config)) { + ++part_iter; + if (part_iter == parts_end) { goto success; } } - if (parseSmallestScreenWidthDp(partIter->c_str(), &config)) { - ++partIter; - if (partIter == partsEnd) { + if (parseSmallestScreenWidthDp(part_iter->c_str(), &config)) { + ++part_iter; + if (part_iter == parts_end) { goto success; } } - if (parseScreenWidthDp(partIter->c_str(), &config)) { - ++partIter; - if (partIter == partsEnd) { + if (parseScreenWidthDp(part_iter->c_str(), &config)) { + ++part_iter; + if (part_iter == parts_end) { goto success; } } - if (parseScreenHeightDp(partIter->c_str(), &config)) { - ++partIter; - if (partIter == partsEnd) { + if (parseScreenHeightDp(part_iter->c_str(), &config)) { + ++part_iter; + if (part_iter == parts_end) { goto success; } } - if (parseScreenLayoutSize(partIter->c_str(), &config)) { - ++partIter; - if (partIter == partsEnd) { + if (parseScreenLayoutSize(part_iter->c_str(), &config)) { + ++part_iter; + if (part_iter == parts_end) { goto success; } } - if (parseScreenLayoutLong(partIter->c_str(), &config)) { - ++partIter; - if (partIter == partsEnd) { + if (parseScreenLayoutLong(part_iter->c_str(), &config)) { + ++part_iter; + if (part_iter == parts_end) { goto success; } } - if (parseScreenRound(partIter->c_str(), &config)) { - ++partIter; - if (partIter == partsEnd) { + if (parseScreenRound(part_iter->c_str(), &config)) { + ++part_iter; + if (part_iter == parts_end) { goto success; } } - if (parseOrientation(partIter->c_str(), &config)) { - ++partIter; - if (partIter == partsEnd) { + if (parseOrientation(part_iter->c_str(), &config)) { + ++part_iter; + if (part_iter == parts_end) { goto success; } } - if (parseUiModeType(partIter->c_str(), &config)) { - ++partIter; - if (partIter == partsEnd) { + if (parseUiModeType(part_iter->c_str(), &config)) { + ++part_iter; + if (part_iter == parts_end) { goto success; } } - if (parseUiModeNight(partIter->c_str(), &config)) { - ++partIter; - if (partIter == partsEnd) { + if (parseUiModeNight(part_iter->c_str(), &config)) { + ++part_iter; + if (part_iter == parts_end) { goto success; } } - if (parseDensity(partIter->c_str(), &config)) { - ++partIter; - if (partIter == partsEnd) { + if (parseDensity(part_iter->c_str(), &config)) { + ++part_iter; + if (part_iter == parts_end) { goto success; } } - if (parseTouchscreen(partIter->c_str(), &config)) { - ++partIter; - if (partIter == partsEnd) { + if (parseTouchscreen(part_iter->c_str(), &config)) { + ++part_iter; + if (part_iter == parts_end) { goto success; } } - if (parseKeysHidden(partIter->c_str(), &config)) { - ++partIter; - if (partIter == partsEnd) { + if (parseKeysHidden(part_iter->c_str(), &config)) { + ++part_iter; + if (part_iter == parts_end) { goto success; } } - if (parseKeyboard(partIter->c_str(), &config)) { - ++partIter; - if (partIter == partsEnd) { + if (parseKeyboard(part_iter->c_str(), &config)) { + ++part_iter; + if (part_iter == parts_end) { goto success; } } - if (parseNavHidden(partIter->c_str(), &config)) { - ++partIter; - if (partIter == partsEnd) { + if (parseNavHidden(part_iter->c_str(), &config)) { + ++part_iter; + if (part_iter == parts_end) { goto success; } } - if (parseNavigation(partIter->c_str(), &config)) { - ++partIter; - if (partIter == partsEnd) { + if (parseNavigation(part_iter->c_str(), &config)) { + ++part_iter; + if (part_iter == parts_end) { goto success; } } - if (parseScreenSize(partIter->c_str(), &config)) { - ++partIter; - if (partIter == partsEnd) { + if (parseScreenSize(part_iter->c_str(), &config)) { + ++part_iter; + if (part_iter == parts_end) { goto success; } } - if (parseVersion(partIter->c_str(), &config)) { - ++partIter; - if (partIter == partsEnd) { + if (parseVersion(part_iter->c_str(), &config)) { + ++part_iter; + if (part_iter == parts_end) { goto success; } } @@ -761,57 +763,57 @@ bool ConfigDescription::parse(const StringPiece& str, ConfigDescription* out) { success: if (out != NULL) { - applyVersionForCompatibility(&config); + ApplyVersionForCompatibility(&config); *out = config; } return true; } -void ConfigDescription::applyVersionForCompatibility( +void ConfigDescription::ApplyVersionForCompatibility( ConfigDescription* config) { - uint16_t minSdk = 0; + uint16_t min_sdk = 0; if (config->screenLayout2 & ResTable_config::MASK_SCREENROUND) { - minSdk = SDK_MARSHMALLOW; + min_sdk = SDK_MARSHMALLOW; } else if (config->density == ResTable_config::DENSITY_ANY) { - minSdk = SDK_LOLLIPOP; + min_sdk = SDK_LOLLIPOP; } else if (config->smallestScreenWidthDp != ResTable_config::SCREENWIDTH_ANY || config->screenWidthDp != ResTable_config::SCREENWIDTH_ANY || config->screenHeightDp != ResTable_config::SCREENHEIGHT_ANY) { - minSdk = SDK_HONEYCOMB_MR2; + min_sdk = SDK_HONEYCOMB_MR2; } else if ((config->uiMode & ResTable_config::MASK_UI_MODE_TYPE) != ResTable_config::UI_MODE_TYPE_ANY || (config->uiMode & ResTable_config::MASK_UI_MODE_NIGHT) != ResTable_config::UI_MODE_NIGHT_ANY) { - minSdk = SDK_FROYO; + min_sdk = SDK_FROYO; } else if ((config->screenLayout & ResTable_config::MASK_SCREENSIZE) != ResTable_config::SCREENSIZE_ANY || (config->screenLayout & ResTable_config::MASK_SCREENLONG) != ResTable_config::SCREENLONG_ANY || config->density != ResTable_config::DENSITY_DEFAULT) { - minSdk = SDK_DONUT; + min_sdk = SDK_DONUT; } - if (minSdk > config->sdkVersion) { - config->sdkVersion = minSdk; + if (min_sdk > config->sdkVersion) { + config->sdkVersion = min_sdk; } } -ConfigDescription ConfigDescription::copyWithoutSdkVersion() const { +ConfigDescription ConfigDescription::CopyWithoutSdkVersion() const { ConfigDescription copy = *this; copy.sdkVersion = 0; return copy; } -bool ConfigDescription::dominates(const ConfigDescription& o) const { - if (*this == defaultConfig() || *this == o) { +bool ConfigDescription::Dominates(const ConfigDescription& o) const { + if (*this == DefaultConfig() || *this == o) { return true; } - return matchWithDensity(o) && !o.matchWithDensity(*this) && - !isMoreSpecificThan(o) && !o.hasHigherPrecedenceThan(*this); + return MatchWithDensity(o) && !o.MatchWithDensity(*this) && + !isMoreSpecificThan(o) && !o.HasHigherPrecedenceThan(*this); } -bool ConfigDescription::hasHigherPrecedenceThan( +bool ConfigDescription::HasHigherPrecedenceThan( const ConfigDescription& o) const { // The order of the following tests defines the importance of one // configuration parameter over another. Those tests first are more @@ -866,7 +868,7 @@ bool ConfigDescription::hasHigherPrecedenceThan( return *this != o; } -bool ConfigDescription::conflictsWith(const ConfigDescription& o) const { +bool ConfigDescription::ConflictsWith(const ConfigDescription& o) const { // This method should be updated as new configuration parameters are // introduced (e.g. screenConfig2). auto pred = [](const uint32_t a, const uint32_t b) -> bool { @@ -892,8 +894,8 @@ bool ConfigDescription::conflictsWith(const ConfigDescription& o) const { !pred(keyboard, o.keyboard) || !pred(navigation, o.navigation); } -bool ConfigDescription::isCompatibleWith(const ConfigDescription& o) const { - return !conflictsWith(o) && !dominates(o) && !o.dominates(*this); +bool ConfigDescription::IsCompatibleWith(const ConfigDescription& o) const { + return !ConflictsWith(o) && !Dominates(o) && !o.Dominates(*this); } } // namespace aapt diff --git a/tools/aapt2/ConfigDescription.h b/tools/aapt2/ConfigDescription.h index bb54886739753..97d0f38a5af1e 100644 --- a/tools/aapt2/ConfigDescription.h +++ b/tools/aapt2/ConfigDescription.h @@ -17,11 +17,12 @@ #ifndef AAPT_CONFIG_DESCRIPTION_H #define AAPT_CONFIG_DESCRIPTION_H -#include "util/StringPiece.h" - -#include #include +#include "androidfw/ResourceTypes.h" + +#include "util/StringPiece.h" + namespace aapt { /* @@ -32,7 +33,7 @@ struct ConfigDescription : public android::ResTable_config { /** * Returns an immutable default config. */ - static const ConfigDescription& defaultConfig(); + static const ConfigDescription& DefaultConfig(); /* * Parse a string of the form 'fr-sw600dp-land' and fill in the @@ -41,14 +42,14 @@ struct ConfigDescription : public android::ResTable_config { * The resulting configuration has the appropriate sdkVersion defined * for backwards compatibility. */ - static bool parse(const StringPiece& str, ConfigDescription* out = nullptr); + static bool Parse(const StringPiece& str, ConfigDescription* out = nullptr); /** * If the configuration uses an axis that was added after * the original Android release, make sure the SDK version * is set accordingly. */ - static void applyVersionForCompatibility(ConfigDescription* config); + static void ApplyVersionForCompatibility(ConfigDescription* config); ConfigDescription(); ConfigDescription(const android::ResTable_config& o); // NOLINT(implicit) @@ -59,7 +60,7 @@ struct ConfigDescription : public android::ResTable_config { ConfigDescription& operator=(const ConfigDescription& o); ConfigDescription& operator=(ConfigDescription&& o); - ConfigDescription copyWithoutSdkVersion() const; + ConfigDescription CopyWithoutSdkVersion() const; /** * A configuration X dominates another configuration Y, if X has at least the @@ -70,14 +71,14 @@ struct ConfigDescription : public android::ResTable_config { * For example, the configuration 'en-w800dp' dominates 'en-rGB-w1024dp'. It * does not dominate 'fr', 'en-w720dp', or 'mcc001-en-w800dp'. */ - bool dominates(const ConfigDescription& o) const; + bool Dominates(const ConfigDescription& o) const; /** * Returns true if this configuration defines a more important configuration * parameter than o. For example, "en" has higher precedence than "v23", * whereas "en" has the same precedence as "en-v23". */ - bool hasHigherPrecedenceThan(const ConfigDescription& o) const; + bool HasHigherPrecedenceThan(const ConfigDescription& o) const; /** * A configuration conflicts with another configuration if both @@ -85,7 +86,7 @@ struct ConfigDescription : public android::ResTable_config { * incompatible configuration parameter is a non-range, non-density parameter * that is defined in both configurations as a different, non-default value. */ - bool conflictsWith(const ConfigDescription& o) const; + bool ConflictsWith(const ConfigDescription& o) const; /** * A configuration is compatible with another configuration if both @@ -93,9 +94,9 @@ struct ConfigDescription : public android::ResTable_config { * unrelated by domination. For example, land-v11 conflicts with port-v21 * but is compatible with v21 (both land-v11 and v21 would match en-land-v23). */ - bool isCompatibleWith(const ConfigDescription& o) const; + bool IsCompatibleWith(const ConfigDescription& o) const; - bool matchWithDensity(const ConfigDescription& o) const; + bool MatchWithDensity(const ConfigDescription& o) const; bool operator<(const ConfigDescription& o) const; bool operator<=(const ConfigDescription& o) const; @@ -141,7 +142,7 @@ inline ConfigDescription& ConfigDescription::operator=(ConfigDescription&& o) { return *this; } -inline bool ConfigDescription::matchWithDensity( +inline bool ConfigDescription::MatchWithDensity( const ConfigDescription& o) const { return match(o) && (density == 0 || density == o.density); } diff --git a/tools/aapt2/ConfigDescription_test.cpp b/tools/aapt2/ConfigDescription_test.cpp index 66b7d47761188..c331dc0f69098 100644 --- a/tools/aapt2/ConfigDescription_test.cpp +++ b/tools/aapt2/ConfigDescription_test.cpp @@ -15,17 +15,18 @@ */ #include "ConfigDescription.h" + +#include + #include "SdkConstants.h" #include "test/Test.h" #include "util/StringPiece.h" -#include - namespace aapt { static ::testing::AssertionResult TestParse( const StringPiece& input, ConfigDescription* config = nullptr) { - if (ConfigDescription::parse(input, config)) { + if (ConfigDescription::Parse(input, config)) { return ::testing::AssertionSuccess() << input << " was successfully parsed"; } return ::testing::AssertionFailure() << input << " could not be parsed"; diff --git a/tools/aapt2/Debug.cpp b/tools/aapt2/Debug.cpp index 965db9ebc9c85..60b01e372d7b1 100644 --- a/tools/aapt2/Debug.cpp +++ b/tools/aapt2/Debug.cpp @@ -15,10 +15,6 @@ */ #include "Debug.h" -#include "ResourceTable.h" -#include "ResourceValues.h" -#include "ValueVisitor.h" -#include "util/Util.h" #include #include @@ -28,18 +24,25 @@ #include #include +#include "android-base/logging.h" + +#include "ResourceTable.h" +#include "ResourceValues.h" +#include "ValueVisitor.h" +#include "util/Util.h" + namespace aapt { class PrintVisitor : public ValueVisitor { public: - using ValueVisitor::visit; + using ValueVisitor::Visit; - void visit(Attribute* attr) override { + void Visit(Attribute* attr) override { std::cout << "(attr) type="; - attr->printMask(&std::cout); + attr->PrintMask(&std::cout); static constexpr uint32_t kMask = android::ResTable_map::TYPE_ENUM | android::ResTable_map::TYPE_FLAGS; - if (attr->typeMask & kMask) { + if (attr->type_mask & kMask) { for (const auto& symbol : attr->symbols) { std::cout << "\n " << symbol.symbol.name.value().entry; if (symbol.symbol.id) { @@ -50,20 +53,20 @@ class PrintVisitor : public ValueVisitor { } } - void visit(Style* style) override { + void Visit(Style* style) override { std::cout << "(style)"; if (style->parent) { - const Reference& parentRef = style->parent.value(); + const Reference& parent_ref = style->parent.value(); std::cout << " parent="; - if (parentRef.name) { - if (parentRef.privateReference) { + if (parent_ref.name) { + if (parent_ref.private_reference) { std::cout << "*"; } - std::cout << parentRef.name.value() << " "; + std::cout << parent_ref.name.value() << " "; } - if (parentRef.id) { - std::cout << parentRef.id.value(); + if (parent_ref.id) { + std::cout << parent_ref.id.value(); } } @@ -85,11 +88,11 @@ class PrintVisitor : public ValueVisitor { } } - void visit(Array* array) override { array->print(&std::cout); } + void Visit(Array* array) override { array->Print(&std::cout); } - void visit(Plural* plural) override { plural->print(&std::cout); } + void Visit(Plural* plural) override { plural->Print(&std::cout); } - void visit(Styleable* styleable) override { + void Visit(Styleable* styleable) override { std::cout << "(styleable)"; for (const auto& attr : styleable->entries) { std::cout << "\n "; @@ -107,10 +110,10 @@ class PrintVisitor : public ValueVisitor { } } - void visitItem(Item* item) override { item->print(&std::cout); } + void VisitItem(Item* item) override { item->Print(&std::cout); } }; -void Debug::printTable(ResourceTable* table, +void Debug::PrintTable(ResourceTable* table, const DebugPrintTableOptions& options) { PrintVisitor visitor; @@ -128,10 +131,10 @@ void Debug::printTable(ResourceTable* table, } std::cout << " entryCount=" << type->entries.size() << std::endl; - std::vector sortedEntries; + std::vector sorted_entries; for (const auto& entry : type->entries) { auto iter = std::lower_bound( - sortedEntries.begin(), sortedEntries.end(), entry.get(), + sorted_entries.begin(), sorted_entries.end(), entry.get(), [](const ResourceEntry* a, const ResourceEntry* b) -> bool { if (a->id && b->id) { return a->id.value() < b->id.value(); @@ -141,17 +144,17 @@ void Debug::printTable(ResourceTable* table, return false; } }); - sortedEntries.insert(iter, entry.get()); + sorted_entries.insert(iter, entry.get()); } - for (const ResourceEntry* entry : sortedEntries) { + for (const ResourceEntry* entry : sorted_entries) { ResourceId id(package->id ? package->id.value() : uint8_t(0), type->id ? type->id.value() : uint8_t(0), entry->id ? entry->id.value() : uint16_t(0)); ResourceName name(package->name, type->type, entry->name); std::cout << " spec resource " << id << " " << name; - switch (entry->symbolStatus.state) { + switch (entry->symbol_status.state) { case SymbolState::kPublic: std::cout << " PUBLIC"; break; @@ -166,9 +169,9 @@ void Debug::printTable(ResourceTable* table, for (const auto& value : entry->values) { std::cout << " (" << value->config << ") "; - value->value->accept(&visitor); - if (options.showSources && !value->value->getSource().path.empty()) { - std::cout << " src=" << value->value->getSource(); + value->value->Accept(&visitor); + if (options.show_sources && !value->value->GetSource().path.empty()) { + std::cout << " src=" << value->value->GetSource(); } std::cout << std::endl; } @@ -177,35 +180,36 @@ void Debug::printTable(ResourceTable* table, } } -static size_t getNodeIndex(const std::vector& names, +static size_t GetNodeIndex(const std::vector& names, const ResourceName& name) { auto iter = std::lower_bound(names.begin(), names.end(), name); - assert(iter != names.end() && *iter == name); + CHECK(iter != names.end()); + CHECK(*iter == name); return std::distance(names.begin(), iter); } -void Debug::printStyleGraph(ResourceTable* table, - const ResourceName& targetStyle) { +void Debug::PrintStyleGraph(ResourceTable* table, + const ResourceName& target_style) { std::map> graph; - std::queue stylesToVisit; - stylesToVisit.push(targetStyle); - for (; !stylesToVisit.empty(); stylesToVisit.pop()) { - const ResourceName& styleName = stylesToVisit.front(); - std::set& parents = graph[styleName]; + std::queue styles_to_visit; + styles_to_visit.push(target_style); + for (; !styles_to_visit.empty(); styles_to_visit.pop()) { + const ResourceName& style_name = styles_to_visit.front(); + std::set& parents = graph[style_name]; if (!parents.empty()) { // We've already visited this style. continue; } - Maybe result = table->findResource(styleName); + Maybe result = table->FindResource(style_name); if (result) { ResourceEntry* entry = result.value().entry; for (const auto& value : entry->values) { - if (Style* style = valueCast"; - ASSERT_TRUE(testParse(input)); + ASSERT_TRUE(TestParse(input)); - Style* style = test::getValue"; - ASSERT_TRUE(testParse(input)); + ASSERT_TRUE(TestParse(input)); - Style* style = test::getValue