Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,10 @@ along with sofaqtquick. If not, see <http://www.gnu.org/licenses/>.

#include <SofaPython3/PythonTest.h>
#include <sofa/helper/Utils.h>
#include <SofaPython3/PythonTestExtractor.h>

using sofapython3::PythonTest ;
using sofapython3::PythonTestList ;
using sofapython3::PythonTestExtractor ;
using sofapython3::PrintTo ;
using std::string;

Expand All @@ -79,20 +80,20 @@ static int _inited_=init();
class SofaExporter : public PythonTest {};

/// static build of the test list
static struct PythonModule_SofaExporter_tests : public PythonTestList
static struct PythonModule_SofaExporter_tests : public PythonTestExtractor
{
PythonModule_SofaExporter_tests()
{
const std::string executable_directory = sofa::helper::Utils::getExecutableDirectory();
addTestDir(executable_directory+"/tests", "SofaExporter_");
addTestDirectory(executable_directory+"/tests", "SofaExporter_");
}
} python_tests;

/// run test list using the custom name function getTestName.
/// this allows to do gtest_filter=*FileName*
INSTANTIATE_TEST_CASE_P(SofaPython3,
SofaExporter,
::testing::ValuesIn(python_tests.list),
::testing::ValuesIn(python_tests.extract()),
SofaExporter::getTestName);

TEST_P(SofaExporter, all_tests) { run(GetParam()); }
Expand Down