lldb reports weird objc-description for char* type. workaround for this in ProtobufFrontend. testValues fix.

This commit is contained in:
andrey.zaytsev
2012-08-08 04:21:15 +04:00
parent a0e1f4ff3d
commit 8a310b5831
@@ -487,6 +487,16 @@ public abstract class UsefulTestCase extends TestCase {
return ts[0];
}
public static <T> void assertOneOf(T value, T... values) {
boolean found = false;
for (T v : values) {
if (value == v || (value != null && value.equals(v))) {
found = true;
}
}
Assert.assertTrue("" + value + " should be equal to one of " + Arrays.toString(values), found);
}
public static void printThreadDump() {
PerformanceWatcher.dumpThreadsToConsole("Thread dump:");
}