summaryrefslogtreecommitdiff
path: root/tools/mir_opt_test/test_desc.h
blob: 5e31830c2b6d87f793b8c4b449237826533f8afe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/*
 * test_desc.h
 * - Description of a MIR optimisation test
 */
#pragma once

#include <hir/crate_ptr.hpp>
#include <hir/type.hpp>
#include <hir/path.hpp>
#include <path.h>

struct MirOptTestFile
{
    ::HIR::CratePtr m_crate;

    struct Test
    {
        ::HIR::SimplePath input_function;
        ::HIR::SimplePath output_template_function;
    };
    ::std::vector<Test>  m_tests;

    static MirOptTestFile  load_from_file(const helpers::path& p);
};