object-introspection/test/type_graph_utils.h
2023-11-06 11:28:00 +00:00

31 lines
849 B
C++

#pragma once
#include <functional>
#include <string_view>
#include <vector>
#include "oi/type_graph/Types.h"
namespace oi::detail::type_graph {
class Pass;
class TypeGraph;
} // namespace oi::detail::type_graph
using namespace oi::detail;
void check(const type_graph::TypeGraph& typeGraph,
std::string_view expected,
std::string_view comment);
void test(type_graph::Pass pass,
std::string_view input,
std::string_view expectedAfter);
void testNoChange(type_graph::Pass pass, std::string_view input);
std::vector<std::unique_ptr<ContainerInfo>> getContainerInfos();
type_graph::Container getVector(type_graph::NodeId id = 0);
type_graph::Container getMap(type_graph::NodeId id = 0);
type_graph::Container getList(type_graph::NodeId id = 0);
type_graph::Container getPair(type_graph::NodeId id = 0);