summaryrefslogtreecommitdiff
path: root/tiger-compiler/src/testsuite/libtestsuite.cc
blob: 86a56615e998361323eb75662d8e31f989c58496 (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
25
26
27
28
29
30
/**
 ** \file testsuite/libtestsuite.cc
 ** \brief Functions exported by the testsuite module.
 */

#include <testsuite/libtestsuite.hh>

#include <testsuite/tests-collector.hh>
#include <testsuite/testsuite-generator.hh>

namespace testsuite
{

  std::vector<const ast::FunctionDec*>
  find_program_tests(const ast::ChunkList& program)
    {
      TestsCollector tests_collector;

      tests_collector(program);

      return tests_collector.tests_get();
    }

  ast::ChunkInterface*
  create_testsuite_runtime(const std::vector<const ast::FunctionDec*>& tests)
    {
      return generate_testsuite_runtime(tests);
    }

} // namespace testsuite