Partial unit tests for rollback_index

BUG=chromium-os:17564
TEST=make && make runtests

Change-Id: I8ea6bcc15f277e10c5b8539f2ea19ad90be34889
Reviewed-on: http://gerrit.chromium.org/gerrit/6770
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
Tested-by: Randall Spangler <rspangler@chromium.org>
diff --git a/tests/test_common.h b/tests/test_common.h
index 532e7b2..47ffa2a 100644
--- a/tests/test_common.h
+++ b/tests/test_common.h
@@ -17,11 +17,17 @@
  * Also update the global gTestSuccess flag if test fails. */
 int TEST_NEQ(int result, int not_expected_result, char* testname);
 
-/* Return 1 if result is equal to expected_result, else return 0.
- * Also update the global gTestSuccess flag if test fails. */
+/* Return 1 if result pointer is equal to expected_result pointer,
+ * else return 0.  Does not check pointer contents, only the pointer
+ * itself.  Also update the global gTestSuccess flag if test fails. */
 int TEST_PTR_EQ(const void* result, const void* expected_result,
                 char* testname);
 
+/* Return 1 if result string is equal to expected_result string,
+ * else return 0.  Also update the global gTestSuccess flag if test fails. */
+int TEST_STR_EQ(const char* result, const char* expected_result,
+                char* testname);
+
 /* ANSI Color coding sequences.
  *
  * Don't use \e as MSC does not recognize it as a valid escape sequence.