mirror of
https://github.com/LizardByte/Sunshine.git
synced 2024-11-16 23:10:13 +00:00
31 lines
658 B
C
31 lines
658 B
C
|
/**
|
||
|
* @file tests/tests_common.h
|
||
|
* @brief Common declarations.
|
||
|
*/
|
||
|
#pragma once
|
||
|
#include <gtest/gtest.h>
|
||
|
|
||
|
#include <src/globals.h>
|
||
|
#include <src/logging.h>
|
||
|
#include <src/platform/common.h>
|
||
|
|
||
|
struct PlatformTestSuite: testing::Test {
|
||
|
static void
|
||
|
SetUpTestSuite() {
|
||
|
ASSERT_FALSE(platf_deinit);
|
||
|
BOOST_LOG(tests) << "Setting up platform test suite";
|
||
|
platf_deinit = platf::init();
|
||
|
ASSERT_TRUE(platf_deinit);
|
||
|
}
|
||
|
|
||
|
static void
|
||
|
TearDownTestSuite() {
|
||
|
ASSERT_TRUE(platf_deinit);
|
||
|
platf_deinit = {};
|
||
|
BOOST_LOG(tests) << "Tore down platform test suite";
|
||
|
}
|
||
|
|
||
|
private:
|
||
|
inline static std::unique_ptr<platf::deinit_t> platf_deinit;
|
||
|
};
|