Limit use of default namespace in tests and utility programs (#71). r=bryner

- main is now the only thing you'll find in the default namespace.
   Everything else has been moved into an unnamed namespace.

http://groups.google.com/group/airbag-dev/browse_thread/thread/14130a0284a0307f


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@63 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
mmentovai
2006-11-09 17:04:56 +00:00
parent 76f052f8fb
commit 8647dde8cc
9 changed files with 78 additions and 29 deletions

View File

@@ -41,6 +41,9 @@
#include "processor/scoped_ptr.h"
namespace {
using google_airbag::linked_ptr;
using google_airbag::scoped_ptr;
using google_airbag::RangeMap;
@@ -99,7 +102,7 @@ struct RangeTestSet {
// StoreTest uses the data in a RangeTest and calls StoreRange on the
// test RangeMap. It returns true if the expected result occurred, and
// false if something else happened.
bool StoreTest(TestMap *range_map, const RangeTest *range_test) {
static bool StoreTest(TestMap *range_map, const RangeTest *range_test) {
linked_ptr<CountedObject> object(new CountedObject(range_test->id));
bool stored = range_map->StoreRange(range_test->address,
range_test->size,
@@ -123,7 +126,7 @@ bool StoreTest(TestMap *range_map, const RangeTest *range_test) {
// map entry at the specified range,) it returns true, otherwise, it returns
// false. RetrieveTest will check the values around the base address and
// the high address of a range to guard against off-by-one errors.
bool RetrieveTest(TestMap *range_map, const RangeTest *range_test) {
static bool RetrieveTest(TestMap *range_map, const RangeTest *range_test) {
for (unsigned int side = 0; side <= 1; ++side) {
// When side == 0, check the low side (base address) of each range.
// When side == 1, check the high side (base + size) of each range.
@@ -241,7 +244,7 @@ bool RetrieveTest(TestMap *range_map, const RangeTest *range_test) {
// RunTests runs a series of test sets.
bool RunTests() {
static bool RunTests() {
// These tests will be run sequentially. The first set of tests exercises
// most functions of RangeTest, and verifies all of the bounds-checking.
const RangeTest range_tests_0[] = {
@@ -402,6 +405,10 @@ bool RunTests() {
return true;
}
} // namespace
int main(int argc, char **argv) {
return RunTests() ? 0 : 1;
}