Loading renderscript/1.0/vts/functional/VtsHalRenderscriptV1_0TargetTest.cpp +4 −10 Original line number Diff line number Diff line Loading @@ -18,7 +18,8 @@ // The main test class for RENDERSCRIPT HIDL HAL. void RenderscriptHidlTest::SetUp() { device = ::testing::VtsHalHidlTargetTestBase::getService<IDevice>(); device = ::testing::VtsHalHidlTargetTestBase::getService<IDevice>( RenderscriptHidlEnvironment::Instance()->getServiceName<IDevice>()); ASSERT_NE(nullptr, device.get()); uint32_t version = 0; Loading @@ -34,17 +35,10 @@ void RenderscriptHidlTest::TearDown() { } } // A class for test environment setup (kept since this file is a template). class RenderscriptHidlEnvironment : public ::testing::Environment { public: virtual void SetUp() {} virtual void TearDown() {} }; int main(int argc, char** argv) { ::testing::AddGlobalTestEnvironment(new RenderscriptHidlEnvironment); ::testing::AddGlobalTestEnvironment(RenderscriptHidlEnvironment::Instance()); ::testing::InitGoogleTest(&argc, argv); RenderscriptHidlEnvironment::Instance()->init(&argc, argv); int status = RUN_ALL_TESTS(); LOG(INFO) << "Test result = " << status; return status; Loading renderscript/1.0/vts/functional/VtsHalRenderscriptV1_0TargetTest.h +13 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ #include <android/hardware/renderscript/1.0/types.h> #include <VtsHalHidlTargetTestBase.h> #include <VtsHalHidlTargetTestEnvBase.h> #include <gtest/gtest.h> using ::android::hardware::renderscript::V1_0::Allocation; Loading Loading @@ -99,4 +100,16 @@ private: sp<IDevice> device; }; // Test environment for RENDERSCRIPT HIDL HAL. class RenderscriptHidlEnvironment : public ::testing::VtsHalHidlTargetTestEnvBase { public: // get the test environment singleton static RenderscriptHidlEnvironment* Instance() { static RenderscriptHidlEnvironment* instance = new RenderscriptHidlEnvironment; return instance; } virtual void registerTestServices() override { registerTestService<IDevice>(); } }; #endif // VTS_HAL_RENDERSCRIPT_V1_0_TARGET_TESTS_H Loading
renderscript/1.0/vts/functional/VtsHalRenderscriptV1_0TargetTest.cpp +4 −10 Original line number Diff line number Diff line Loading @@ -18,7 +18,8 @@ // The main test class for RENDERSCRIPT HIDL HAL. void RenderscriptHidlTest::SetUp() { device = ::testing::VtsHalHidlTargetTestBase::getService<IDevice>(); device = ::testing::VtsHalHidlTargetTestBase::getService<IDevice>( RenderscriptHidlEnvironment::Instance()->getServiceName<IDevice>()); ASSERT_NE(nullptr, device.get()); uint32_t version = 0; Loading @@ -34,17 +35,10 @@ void RenderscriptHidlTest::TearDown() { } } // A class for test environment setup (kept since this file is a template). class RenderscriptHidlEnvironment : public ::testing::Environment { public: virtual void SetUp() {} virtual void TearDown() {} }; int main(int argc, char** argv) { ::testing::AddGlobalTestEnvironment(new RenderscriptHidlEnvironment); ::testing::AddGlobalTestEnvironment(RenderscriptHidlEnvironment::Instance()); ::testing::InitGoogleTest(&argc, argv); RenderscriptHidlEnvironment::Instance()->init(&argc, argv); int status = RUN_ALL_TESTS(); LOG(INFO) << "Test result = " << status; return status; Loading
renderscript/1.0/vts/functional/VtsHalRenderscriptV1_0TargetTest.h +13 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ #include <android/hardware/renderscript/1.0/types.h> #include <VtsHalHidlTargetTestBase.h> #include <VtsHalHidlTargetTestEnvBase.h> #include <gtest/gtest.h> using ::android::hardware::renderscript::V1_0::Allocation; Loading Loading @@ -99,4 +100,16 @@ private: sp<IDevice> device; }; // Test environment for RENDERSCRIPT HIDL HAL. class RenderscriptHidlEnvironment : public ::testing::VtsHalHidlTargetTestEnvBase { public: // get the test environment singleton static RenderscriptHidlEnvironment* Instance() { static RenderscriptHidlEnvironment* instance = new RenderscriptHidlEnvironment; return instance; } virtual void registerTestServices() override { registerTestService<IDevice>(); } }; #endif // VTS_HAL_RENDERSCRIPT_V1_0_TARGET_TESTS_H