Path: blob/master/thirdparty/embree/common/sys/regression.cpp
9912 views
// Copyright 2009-2021 Intel Corporation1// SPDX-License-Identifier: Apache-2.023#include "regression.h"45namespace embree6{7/* registerRegressionTest is invoked from static initializers, thus8* we cannot have the regression_tests variable as global static9* variable due to issues with static variable initialization10* order. */11std::vector<RegressionTest*>& get_regression_tests()12{13static std::vector<RegressionTest*> regression_tests;14return regression_tests;15}1617void registerRegressionTest(RegressionTest* test)18{19get_regression_tests().push_back(test);20}2122RegressionTest* getRegressionTest(size_t index)23{24if (index >= get_regression_tests().size())25return nullptr;2627return get_regression_tests()[index];28}29}303132