aboutsummaryrefslogtreecommitdiff
path: root/src/client/mac/handler/breakpad_nlist_test.h
diff options
context:
space:
mode:
authornealsid <nealsid@4c0a9323-5329-0410-9bdc-e9ce6186880e>2008-04-15 23:09:30 +0000
committernealsid <nealsid@4c0a9323-5329-0410-9bdc-e9ce6186880e>2008-04-15 23:09:30 +0000
commit5da03791a71a6c5b3b1ef15ec8882bffa21ceb39 (patch)
treeffa72c195966ca02c48c9fd7d6857baac602531a /src/client/mac/handler/breakpad_nlist_test.h
parentIssue 254: The problem is that nlist() is compiled out of libc in (diff)
downloadbreakpad-5da03791a71a6c5b3b1ef15ec8882bffa21ceb39.tar.xz
As part of resolving issue 256 I'd like to check in some unit
tests(ok, just one) for the private copy of nlist that I checked in last week, plus lay some of the ground work for collecting code coverage numbers. Both of these are accomplished by leveraging the built-in facilities of Xcode & Developer Tools(namely, CPlusTest and gcov integration; however, eventually I will also add a way to get lcov results from the gcov results). I also: - renamed breakpad_nlist_64.c to breakpad_nlist_64.cc to be more consistent(even though it's not C++ code it still only gets called by C++ code so I don't have to deal with extern "C" constructs). - I created a new target (minidump_tests) that has a "Coverage" configuration with the appropriate GCC flags turned on. It is only compiled in 64-bit configurations and has 10.5 as a minimum deployment target as well as uses the 10.5 SDK. git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@260 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/mac/handler/breakpad_nlist_test.h')
-rw-r--r--src/client/mac/handler/breakpad_nlist_test.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/client/mac/handler/breakpad_nlist_test.h b/src/client/mac/handler/breakpad_nlist_test.h
new file mode 100644
index 00000000..c778a9b3
--- /dev/null
+++ b/src/client/mac/handler/breakpad_nlist_test.h
@@ -0,0 +1,43 @@
+/*
+ * BreakpadNlistTest.h
+ * minidump_test
+ *
+ * Created by Neal Sidhwaney on 4/13/08.
+ * Copyright 2008 Google Inc. All rights reserved.
+ *
+ */
+
+#include <CPlusTest/CPlusTest.h>
+
+/*
+__Z41__static_initialization_and_destruction_0ii
+__Z41__static_initialization_and_destruction_0ii
+__Z41__static_initialization_and_destruction_0ii
+___tcf_0
+___tcf_0
+___tcf_0
+___tcf_1
+_read_encoded_value_with_base
+_read_sleb128
+_read_uleb128
+
+*/
+
+class BreakpadNlistTest : public TestCase {
+private:
+
+ // nm dumps multiple addresses for the same symbol in
+ // /usr/lib/dyld. So we track those so we don't report failures
+ // in mismatches between what our nlist returns and what nm has
+ // for the duplicate symbols.
+ bool IsSymbolMoreThanOnceInDyld(const char *symbolName);
+
+public:
+ BreakpadNlistTest(TestInvocation* invocation);
+ virtual ~BreakpadNlistTest();
+
+
+ /* This test case runs nm on /usr/lib/dyld and then compares the
+ output of every symbol to what our nlist implementation returns */
+ void CompareToNM();
+};