Add Mock OEMCrypto Stub
I added a Mock OEMCrypto implementation with stubs only. I corrected the "extern C" location in OEMCrypto.h. (Thanks, Jerry!) I added some Android.mk files that allows us to compile and run a few simple unit tests. Unit Test 1: The library compiles. (passes) Unit Test 2: The test program links and runs. (passes) Change-Id: Ib4c9554553de49645b5841b0bae889728cbfc8b1
This commit is contained in:
28
libwvdrmengine/oemcrypto/test/TestOEMCrypto.cpp
Normal file
28
libwvdrmengine/oemcrypto/test/TestOEMCrypto.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright (C) 2011 Google, Inc. All Rights Reserved
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <termio.h>
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <dlfcn.h>
|
||||
#define LOG_TAG "WV.TestOEMCrypto"
|
||||
#include <utils/Log.h>
|
||||
|
||||
#include "OEMCrypto.h" // Unit Test 1: The header file must compile.
|
||||
#include "MockOEMCrypto.h"
|
||||
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
ALOGD("--- Running Test OEMCrypto.\n"); // Unit Test 2: The code links.
|
||||
initializeMockOEMCrypto();
|
||||
|
||||
ALOGD("--- Finished Running OEMCrypto.\n"); // Unit Test 2: The code links.
|
||||
return(0);
|
||||
}
|
||||
Reference in New Issue
Block a user