mirror of
https://github.com/JakeHillion/object-introspection.git
synced 2024-11-09 21:24:14 +00:00
2c5fb5d845
Leave it to the new mutator pass IdentifyContainers to replace Class nodes with Container nodes where appropriate. This will allow us to run passes over the type graph before identifying containers, and therefore before we have lost information about the internal details of the container (e.g. alignment of member variables).
46 lines
1.5 KiB
C++
46 lines
1.5 KiB
C++
#pragma once
|
|
|
|
#include <gmock/gmock.h>
|
|
|
|
#include "oi/type_graph/DrgnParser.h"
|
|
|
|
namespace oi::detail {
|
|
class SymbolService;
|
|
}
|
|
namespace oi::detail::type_graph {
|
|
class TypeGraph;
|
|
}
|
|
struct drgn_type;
|
|
|
|
using namespace oi::detail;
|
|
|
|
class DrgnParserTest : public ::testing::Test {
|
|
protected:
|
|
static void SetUpTestSuite();
|
|
static void TearDownTestSuite();
|
|
|
|
static type_graph::DrgnParser getDrgnParser(
|
|
type_graph::TypeGraph& typeGraph, type_graph::DrgnParserOptions options);
|
|
drgn_type* getDrgnRoot(std::string_view function);
|
|
|
|
virtual std::string run(std::string_view function,
|
|
type_graph::DrgnParserOptions options);
|
|
void test(std::string_view function,
|
|
std::string_view expected,
|
|
type_graph::DrgnParserOptions options);
|
|
void test(std::string_view function, std::string_view expected);
|
|
void testGlob(std::string_view function,
|
|
std::string_view expected,
|
|
type_graph::DrgnParserOptions options = {});
|
|
void testMultiCompiler(std::string_view function,
|
|
std::string_view expectedClang,
|
|
std::string_view expectedGcc,
|
|
type_graph::DrgnParserOptions options = {});
|
|
void testMultiCompilerGlob(std::string_view function,
|
|
std::string_view expectedClang,
|
|
std::string_view expectedGcc,
|
|
type_graph::DrgnParserOptions options = {});
|
|
|
|
static SymbolService* symbols_;
|
|
};
|