Add unit tests for AIDL service
[ Merged from http://go/wvgerrit/150029 ] Test: m libwvdrmengine_hal_test -j128 Test: m libwvdrmengine_hal_test WV_UNITTESTS_BUILD_TARGET=hidl -j128 Test: adb push $(OUT)/data/nativetest/libwvdrmengine_hal_test /data/nativetest/. Test: adb shell LD_LIBRARY_PATH=/vendor/lib64 /data/nativetest/libwvdrmengine_hal_test Bug: 217247987 Change-Id: Ib4f22c976b8ae6c2983cb611a958ddc3a29aebdb
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
//
|
||||
// Copyright 2018 Google LLC. All Rights Reserved. This file and proprietary
|
||||
// source code may only be used and distributed under the Widevine License
|
||||
// Agreement.
|
||||
//
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include "WVCreatePluginFactories.h"
|
||||
|
||||
namespace wvdrm {
|
||||
namespace hardware {
|
||||
namespace drm {
|
||||
namespace V1_4 {
|
||||
namespace widevine {
|
||||
|
||||
using ::android::sp;
|
||||
|
||||
using namespace android;
|
||||
|
||||
TEST(CreatePluginFactoriesTest, CreatesDrmFactory) {
|
||||
sp<IDrmFactory> factory(createDrmFactory());
|
||||
|
||||
EXPECT_NE((IDrmFactory*)NULL, factory.get()) <<
|
||||
"createDrmFactory() returned null";
|
||||
}
|
||||
|
||||
TEST(CreatePluginFactoriesTest, CreatesCryptoFactory) {
|
||||
sp<ICryptoFactory> factory(createCryptoFactory());
|
||||
|
||||
EXPECT_NE((ICryptoFactory*)NULL, factory.get()) <<
|
||||
"createCryptoFactory() returned null";
|
||||
}
|
||||
|
||||
} // namespace widevine
|
||||
} // namespace V1_4
|
||||
} // namespace drm
|
||||
} // namespace hardware
|
||||
} // namespace wvdrm
|
||||
Reference in New Issue
Block a user