mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-26 15:12:40 +00:00
Added a #define for running tests without file access.
Change-Id: Ib2b7aa8a5641cf73fa0d6f2000db7fdd1aabab66 Tested: on Linux.
This commit is contained in:
@@ -28,6 +28,7 @@ using namespace MyGame::Example;
|
|||||||
#include <android/log.h>
|
#include <android/log.h>
|
||||||
#define TEST_OUTPUT_LINE(...) \
|
#define TEST_OUTPUT_LINE(...) \
|
||||||
__android_log_print(ANDROID_LOG_INFO, "FlatBuffers", __VA_ARGS__)
|
__android_log_print(ANDROID_LOG_INFO, "FlatBuffers", __VA_ARGS__)
|
||||||
|
#define FLATBUFFERS_NO_FILE_TESTS
|
||||||
#else
|
#else
|
||||||
#define TEST_OUTPUT_LINE(...) \
|
#define TEST_OUTPUT_LINE(...) \
|
||||||
{ printf(__VA_ARGS__); printf("\n"); }
|
{ printf(__VA_ARGS__); printf("\n"); }
|
||||||
@@ -663,7 +664,7 @@ int main(int /*argc*/, const char * /*argv*/[]) {
|
|||||||
|
|
||||||
MutateFlatBuffersTest(flatbuf.get(), rawbuf.length());
|
MutateFlatBuffersTest(flatbuf.get(), rawbuf.length());
|
||||||
|
|
||||||
#ifndef __ANDROID__ // requires file access
|
#ifndef FLATBUFFERS_NO_FILE_TESTS
|
||||||
ParseAndGenerateTextTest();
|
ParseAndGenerateTextTest();
|
||||||
ParseProtoTest();
|
ParseProtoTest();
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user