blob: fe2e5ce29eff760dd091d0bcabdebdba13e6d04d [file] [log] [blame]
Adam Lesinskif90f2f8d2014-06-06 14:27:00 -07001#ifndef __TEST_HELPERS_H
2#define __TEST_HELPERS_H
3
4#include <ostream>
5
Adam Lesinski31245b42014-08-22 19:10:56 -07006#include <androidfw/ResourceTypes.h>
Adam Lesinskif90f2f8d2014-06-06 14:27:00 -07007#include <utils/String8.h>
8#include <utils/String16.h>
9
10static inline ::std::ostream& operator<<(::std::ostream& out, const android::String8& str) {
11 return out << str.string();
12}
13
14static inline ::std::ostream& operator<<(::std::ostream& out, const android::String16& str) {
15 return out << android::String8(str).string();
16}
17
Adam Lesinski31245b42014-08-22 19:10:56 -070018namespace android {
19
20static inline bool operator==(const android::ResTable_config& a, const android::ResTable_config& b) {
21 return memcmp(&a, &b, sizeof(a)) == 0;
22}
23
24static inline ::std::ostream& operator<<(::std::ostream& out, const android::ResTable_config& c) {
25 return out << c.toString().string();
26}
27
28} // namespace android
29
Adam Lesinskif90f2f8d2014-06-06 14:27:00 -070030#endif // __TEST_HELPERS_H