From 282e181b58cf72b6ca770dc7ca5f91f135444502 Mon Sep 17 00:00:00 2001 From: Adam Lesinski Date: Thu, 23 Jan 2014 18:17:42 -0800 Subject: Revert "Move frameworks/base/tools/ to frameworks/tools/" This reverts commit 9f6a119c8aa276432ece4fe2118bd8a3c9b1067e. --- tools/aidl/options_test.cpp | 291 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 291 insertions(+) create mode 100644 tools/aidl/options_test.cpp (limited to 'tools/aidl/options_test.cpp') diff --git a/tools/aidl/options_test.cpp b/tools/aidl/options_test.cpp new file mode 100644 index 0000000..bd106ce --- /dev/null +++ b/tools/aidl/options_test.cpp @@ -0,0 +1,291 @@ +#include +#include "options.h" + +const bool VERBOSE = false; + +using namespace std; + +struct Answer { + const char* argv[8]; + int result; + const char* systemSearchPath[8]; + const char* localSearchPath[8]; + const char* inputFileName; + language_t nativeLanguage; + const char* outputH; + const char* outputCPP; + const char* outputJava; +}; + +bool +match_arrays(const char* const*expected, const vector &got) +{ + int count = 0; + while (expected[count] != NULL) { + count++; + } + if (got.size() != count) { + return false; + } + for (int i=0; i &got) +{ + size_t count = got.size(); + for (size_t i=0; i