Enable unit tests to build with MSVC
Change-Id: Ie80597221bee494679ae2ba50cca22dea2609cba
This commit is contained in:
parent
6a5e6e0549
commit
c202100fe4
2
libs.mk
2
libs.mk
@ -425,6 +425,7 @@ gtest.vcproj: $(SRC_PATH_BARE)/third_party/googletest/src/src/gtest-all.cc
|
||||
--proj-guid=EC00E1EC-AF68-4D92-A255-181690D1C9B1 \
|
||||
--ver=$(CONFIG_VS_VERSION) \
|
||||
--src-path-bare="$(SRC_PATH_BARE)" \
|
||||
-D_VARIADIC_MAX=10 \
|
||||
--out=gtest.vcproj $(SRC_PATH_BARE)/third_party/googletest/src/src/gtest-all.cc \
|
||||
-I. -I"$(SRC_PATH_BARE)/third_party/googletest/src/include" -I"$(SRC_PATH_BARE)/third_party/googletest/src"
|
||||
|
||||
@ -436,6 +437,7 @@ test_libvpx.vcproj: $(LIBVPX_TEST_SRCS)
|
||||
--exe \
|
||||
--target=$(TOOLCHAIN) \
|
||||
--name=test_libvpx \
|
||||
-D_VARIADIC_MAX=10 \
|
||||
--proj-guid=CD837F5F-52D8-4314-A370-895D614166A7 \
|
||||
--ver=$(CONFIG_VS_VERSION) \
|
||||
$(if $(CONFIG_STATIC_MSVCRT),--static-crt) \
|
||||
|
@ -25,6 +25,15 @@ using libvpx_test::ACMRandom;
|
||||
|
||||
namespace {
|
||||
|
||||
#ifdef _MSC_VER
|
||||
static int round(double x) {
|
||||
if(x < 0)
|
||||
return (int)ceil(x - 0.5);
|
||||
else
|
||||
return (int)floor(x + 0.5);
|
||||
}
|
||||
#endif
|
||||
|
||||
void reference_dct_1d(double input[8], double output[8]) {
|
||||
const double kPi = 3.141592653589793238462643383279502884;
|
||||
const double kInvSqrt2 = 0.707106781186547524400844362104;
|
||||
|
Loading…
x
Reference in New Issue
Block a user