Validate the C++ and managed fields are ordered consistently.

Change-Id: If0d0fcc2ffcc0172bd86fd1714111857af572d6a
diff --git a/src/common_test.h b/src/common_test.h
index 1c4790b..a1b5f34 100644
--- a/src/common_test.h
+++ b/src/common_test.h
@@ -3,6 +3,7 @@
 #include "base64.h"
 #include "heap.h"
 #include "thread.h"
+#include "stringprintf.h"
 #include "class_linker.h"
 #include "dex_file.h"
 
@@ -185,6 +186,18 @@
     class_linker_ = runtime_->GetClassLinker();
   }
 
+  DexFile* GetLibCoreDex() {
+    // TODO add host support when we have DexFile::OpenJar
+    // TODO switch to jar when we have DexFile::OpenJar
+    if (!is_host_) {
+      return NULL;
+    }
+
+    std::string libcore_dex_file_name = StringPrintf("%s/out/target/common/obj/JAVA_LIBRARIES/core_intermediates/noproguard.classes.dex",
+                                                     getenv("ANDROID_BUILD_TOP"));
+    return DexFile::OpenFile(libcore_dex_file_name.c_str());
+  }
+
   bool is_host_;
   scoped_ptr<DexFile> java_lang_dex_file_;
   scoped_ptr<Runtime> runtime_;