From ddb1d5ffe4bf6d6799662811d9383478ff3d36cc Mon Sep 17 00:00:00 2001 From: Wouter van Oortmerssen Date: Thu, 21 May 2015 13:53:41 -0700 Subject: [PATCH] Added a #define for running tests without file access. Change-Id: Ib2b7aa8a5641cf73fa0d6f2000db7fdd1aabab66 Tested: on Linux. --- tests/test.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test.cpp b/tests/test.cpp index ebd4370ec..dc80e7156 100644 --- a/tests/test.cpp +++ b/tests/test.cpp @@ -28,6 +28,7 @@ using namespace MyGame::Example; #include #define TEST_OUTPUT_LINE(...) \ __android_log_print(ANDROID_LOG_INFO, "FlatBuffers", __VA_ARGS__) + #define FLATBUFFERS_NO_FILE_TESTS #else #define TEST_OUTPUT_LINE(...) \ { printf(__VA_ARGS__); printf("\n"); } @@ -663,7 +664,7 @@ int main(int /*argc*/, const char * /*argv*/[]) { MutateFlatBuffersTest(flatbuf.get(), rawbuf.length()); - #ifndef __ANDROID__ // requires file access + #ifndef FLATBUFFERS_NO_FILE_TESTS ParseAndGenerateTextTest(); ParseProtoTest(); #endif