Unit tests: Move last remaining tests onto using the type_graph_utils helpers

This commit is contained in:
Alastair Robertson 2023-07-04 08:56:27 -07:00 committed by Alastair Robertson
parent 00b46377a1
commit 5560624c0b
2 changed files with 2 additions and 7 deletions

View File

@ -1,14 +1,10 @@
#include <gtest/gtest.h> #include <gtest/gtest.h>
#include "oi/type_graph/AlignmentCalc.h" #include "oi/type_graph/AlignmentCalc.h"
#include "test/type_graph_utils.h"
using namespace type_graph; using namespace type_graph;
// TODO put in header:
void test(Pass pass,
std::vector<std::reference_wrapper<Type>> types,
std::string_view expected);
TEST(AlignmentCalcTest, PrimitiveMembers) { TEST(AlignmentCalcTest, PrimitiveMembers) {
auto myclass = Class{Class::Kind::Class, "MyClass", 16}; auto myclass = Class{Class::Kind::Class, "MyClass", 16};
auto myint8 = Primitive{Primitive::Kind::Int8}; auto myint8 = Primitive{Primitive::Kind::Int8};

View File

@ -4,11 +4,10 @@
#include "oi/type_graph/TopoSorter.h" #include "oi/type_graph/TopoSorter.h"
#include "oi/type_graph/Types.h" #include "oi/type_graph/Types.h"
#include "test/type_graph_utils.h"
using namespace type_graph; using namespace type_graph;
Container getVector(); // TODO put in a header
template <typename T> template <typename T>
using ref = std::reference_wrapper<T>; using ref = std::reference_wrapper<T>;