/** ** \file testsuite/libtestsuite.hh ** \brief Declare functions and variables exported by testsuite module. */ #pragma once #include namespace testsuite { /** * Find all the tests functions of a program and return references to each of * them. * * A function is considered a test function if it has the following * properties :\n * - It is located at the first level of a program file\n * - Its name starts with test_* * * @param program the program to analyse * @return a vector containing a reference to each test function */ std::vector find_program_tests(const ast::ChunkList& program); /** * Create a testsuite runtime, which runs each function referenced in the * vector. * * The return tree may then be appended to the main program AST list to be * compiled along with the rest of this latter. * * @param tests the tests to run * @return an AST tree describing the resulting testsuite runtime */ ast::ChunkInterface* create_testsuite_runtime(const std::vector& tests); } // namespace testsuite