Fix JNI NoSuchMethodErrors.
No point calling PrettyMethod if you've just determined that your Method* is
NULL...
Also a few other debugging aids.
Change-Id: I8af520716215800b7ffe4aef784b9c4ec15dcb92
diff --git a/src/common_test.h b/src/common_test.h
index b56090b..bbf2e2f 100644
--- a/src/common_test.h
+++ b/src/common_test.h
@@ -16,6 +16,7 @@
#include "gtest/gtest.h"
#include "heap.h"
#include "runtime.h"
+#include "stl_util.h"
#include "stringprintf.h"
#include "thread.h"
#include "unicode/uclean.h"
@@ -296,14 +297,7 @@
// TODO: isn't gtest supposed to be able to print STL types for itself?
template <typename T>
std::ostream& operator<<(std::ostream& os, const std::vector<T>& rhs) {
- os << "[";
- for (size_t i = 0; i < rhs.size(); ++i) {
- os << rhs[i];
- if (i < rhs.size() - 1) {
- os << ", ";
- }
- }
- os << "]";
+ os << ::art::ToString(rhs);
return os;
}