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.
14130a0284
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@63 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
76f052f8fb
commit
8647dde8cc
9 changed files with 78 additions and 29 deletions
|
@ -27,7 +27,7 @@
|
|||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include <stdio.h>
|
||||
#include <cstdio>
|
||||
#include <string>
|
||||
#include "processor/source_line_resolver.h"
|
||||
#include "google_airbag/processor/stack_frame.h"
|
||||
|
@ -35,13 +35,6 @@
|
|||
#include "processor/scoped_ptr.h"
|
||||
#include "processor/stack_frame_info.h"
|
||||
|
||||
using std::string;
|
||||
using google_airbag::linked_ptr;
|
||||
using google_airbag::scoped_ptr;
|
||||
using google_airbag::SourceLineResolver;
|
||||
using google_airbag::StackFrame;
|
||||
using google_airbag::StackFrameInfo;
|
||||
|
||||
#define ASSERT_TRUE(cond) \
|
||||
if (!(cond)) { \
|
||||
fprintf(stderr, "FAILED: %s at %s:%d\n", #cond, __FILE__, __LINE__); \
|
||||
|
@ -52,6 +45,15 @@ using google_airbag::StackFrameInfo;
|
|||
|
||||
#define ASSERT_EQ(e1, e2) ASSERT_TRUE((e1) == (e2))
|
||||
|
||||
namespace {
|
||||
|
||||
using std::string;
|
||||
using google_airbag::linked_ptr;
|
||||
using google_airbag::scoped_ptr;
|
||||
using google_airbag::SourceLineResolver;
|
||||
using google_airbag::StackFrame;
|
||||
using google_airbag::StackFrameInfo;
|
||||
|
||||
static bool VerifyEmpty(const StackFrame &frame) {
|
||||
ASSERT_TRUE(frame.function_name.empty());
|
||||
ASSERT_TRUE(frame.source_file_name.empty());
|
||||
|
@ -146,6 +148,8 @@ static bool RunTests() {
|
|||
return true;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
if (!RunTests()) {
|
||||
return 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue