You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ovtTestFixtureCommon.h 1.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*********************************************************************
  2. * Software License Agreement (AGPL-3 License)
  3. *
  4. * OpenViBE SDK Test Software
  5. * Based on OpenViBE V1.1.0, Copyright (C) Inria, 2006-2015
  6. * Copyright (C) Inria, 2015-2017,V1.0
  7. *
  8. * This program is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU Affero General Public License version 3,
  10. * as published by the Free Software Foundation.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU Affero General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU Affero General Public License
  18. * along with this program.
  19. * If not, see <http://www.gnu.org/licenses/>.
  20. */
  21. #pragma once
  22. #include <string>
  23. #include <openvibe/ov_all.h>
  24. #include "ovtTestFixture.h"
  25. // \note: This file contains fixture implementation shared by many unit tests
  26. namespace OpenViBE {
  27. namespace Test {
  28. struct SKernelFixture final : TestFixture
  29. {
  30. SKernelFixture() = default;
  31. explicit SKernelFixture(const std::string& configFile) : m_configFile(configFile) { }
  32. void setConfigFile(const std::string& configFile) { m_configFile = configFile; }
  33. void setUp() override;
  34. void tearDown() override;
  35. Kernel::IKernelContext* context{ nullptr };
  36. private:
  37. std::string m_configFile;
  38. CKernelLoader m_kernelLoader;
  39. };
  40. } // namespace Test
  41. } // namespace OpenViBE