19 #ifndef UNITY_SCOPES_TESTING_TYPED_SCOPE_FIXTURE_H
20 #define UNITY_SCOPES_TESTING_TYPED_SCOPE_FIXTURE_H
22 #include <unity/scopes/Version.h>
24 #include <unity/scopes/testing/MockRegistry.h>
26 #include <gtest/gtest.h>
41 template<
typename Scope>
44 inline static const char* name()
49 inline static std::shared_ptr<Scope> construct()
51 return std::make_shared<Scope>();
55 template<
typename Scope>
56 class TypedScopeFixture :
public ::testing::Test
60 : scope(ScopeTraits<Scope>::construct()),
61 registry_proxy(®istry, [](unity::scopes::Registry*) {})
67 EXPECT_EQ(UNITY_SCOPES_VERSION_MAJOR,
68 scope->start(ScopeTraits<Scope>::name(), registry_proxy));
69 EXPECT_NO_THROW(scope->run());
74 EXPECT_NO_THROW(scope->stop());
78 std::shared_ptr<Scope> scope;
79 unity::scopes::testing::MockRegistry registry;
std::shared_ptr< Registry > RegistryProxy
Convenience type definition.
Definition: RegistryProxyFwd.h:34