Breakpad Linux dumper: Add unit tests for google_breakpad::Module.

Adjust Module's interface a bit to facilitate testing:
- Make AssignSourceIds something a client can call --- it's perfectly
  well-defined, so this is an okay change.
- Add GetFunctions, GetFiles and FindExistingfile member functions,
  which the test harness will use to get results to examine.

a=jimblandy, r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@466 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
jimblandy 2009-12-23 21:46:00 +00:00
parent 6ed5383245
commit 52cb2c6f42
4 changed files with 350 additions and 12 deletions

View file

@ -52,7 +52,8 @@ SRC = ../../..
# dependencies using $(CXX). Value accumulated throughout the file.
CPP_EXECUTABLES =
# Source files whose coverage we are interested in. Value accumulated
# Add the names of source files whose coverage you'd like 'make
# coverage' to report on to this variable. Value accumulated
# throughout the file.
COVERAGE_SOURCES =
@ -79,6 +80,7 @@ dump_stabs.o: dump_stabs.cc
dump_symbols.o: dump_symbols.cc
file_id.o: file_id.cc
module.o: module.cc
COVERAGE_SOURCES += module.cc
stabs_reader.o: stabs_reader.cc
COVERAGE_SOURCES += stabs_reader.cc
@ -132,6 +134,22 @@ clean::
rm -f file_id_unittest
### Unit tests for google_breakpad::Module.
check: check-module_unittest
check-module_unittest: module_unittest
module_unittest: \
gtest-all.o \
gtest_main.o \
module.o \
module_unittest.o \
$(empty)
CPP_EXECUTABLES += module_unittest
module_unittest.o: module_unittest.cc
module_unittest.o: override CPPFLAGS += $(GTEST_CPPFLAGS) $(GMOCK_CPPFLAGS)
clean::
rm -f module_unittest
### Generic compilation rules.
# Link C++ executables using the C++ compiler; see CPP_EXECUTABLES above.