mirror of
https://github.com/JakeHillion/object-introspection.git
synced 2024-11-09 21:24:14 +00:00
DrgnParser: Options should default to false
We only want to do the extra work if it's explicitly requested. chaseRawPointers is already explicitly requested whenever it's needed and readEnumValues currently isn't needed at all.
This commit is contained in:
parent
78b1a6c840
commit
a509354624
@ -30,8 +30,8 @@ struct ContainerInfo;
|
|||||||
namespace oi::detail::type_graph {
|
namespace oi::detail::type_graph {
|
||||||
|
|
||||||
struct DrgnParserOptions {
|
struct DrgnParserOptions {
|
||||||
bool chaseRawPointers = true;
|
bool chaseRawPointers = false;
|
||||||
bool readEnumValues = true;
|
bool readEnumValues = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -72,6 +72,16 @@ void DrgnParserTest::test(std::string_view function,
|
|||||||
EXPECT_EQ(expected, actual);
|
EXPECT_EQ(expected, actual);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DrgnParserTest::test(std::string_view function,
|
||||||
|
std::string_view expected) {
|
||||||
|
// Enable options in unit tests so we get more coverage
|
||||||
|
DrgnParserOptions options = {
|
||||||
|
.chaseRawPointers = true,
|
||||||
|
.readEnumValues = true,
|
||||||
|
};
|
||||||
|
test(function, expected, options);
|
||||||
|
}
|
||||||
|
|
||||||
void DrgnParserTest::testContains(std::string_view function,
|
void DrgnParserTest::testContains(std::string_view function,
|
||||||
std::string_view expected,
|
std::string_view expected,
|
||||||
DrgnParserOptions options) {
|
DrgnParserOptions options) {
|
||||||
|
@ -32,7 +32,8 @@ class DrgnParserTest : public ::testing::Test {
|
|||||||
type_graph::DrgnParserOptions options);
|
type_graph::DrgnParserOptions options);
|
||||||
void test(std::string_view function,
|
void test(std::string_view function,
|
||||||
std::string_view expected,
|
std::string_view expected,
|
||||||
type_graph::DrgnParserOptions options = {});
|
type_graph::DrgnParserOptions options);
|
||||||
|
void test(std::string_view function, std::string_view expected);
|
||||||
void testContains(std::string_view function,
|
void testContains(std::string_view function,
|
||||||
std::string_view expected,
|
std::string_view expected,
|
||||||
type_graph::DrgnParserOptions options = {});
|
type_graph::DrgnParserOptions options = {});
|
||||||
|
Loading…
Reference in New Issue
Block a user