unittest: Fix build on Android.

This commit is contained in:
Unknown W. Brackets 2020-08-27 20:01:37 -07:00
parent 9b27cbd450
commit 3b0f7e109d

View file

@ -24,12 +24,14 @@
// TODO: Make a test of nice unittest asserts and count successes etc.
// Or just integrate with an existing testing framework.
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <string>
#include <sstream>
#if defined(ANDROID)
#include <jni.h>
#endif
#include "base/NativeApp.h"
#include "input/input_state.h"
@ -62,6 +64,16 @@ bool System_GetPropertyBool(SystemProperty prop) {
return false;
}
#if defined(ANDROID)
JNIEnv *getEnv() {
return nullptr;
}
jclass findClass(const char *name) {
return nullptr;
}
#endif
#ifndef M_PI_2
#define M_PI_2 1.57079632679489661923
#endif