samples/main-debug.cc
author Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
Tue, 13 Feb 2007 10:23:10 +0100
changeset 272 8639c0a2d309
parent 269 c79be9d4110a
child 275 0732d4283cc2
permissions -rw-r--r--
avoid warning in optimized builds

/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
#include "ns3/debug.h"

NS3_DEBUG_COMPONENT_DEFINE ("MyComponentA");

// declare other function
namespace foo {
void OneFunction (void);
}

int main (int argc, int argv)
{
  NS3_DEBUG ("nargc="<<argc);

  foo::OneFunction ();

  NS3_DEBUG ("other debug output");

  int a;
  a = 0;

  NS3_ASSERT (a == 0);
  NS3_ASSERT_MSG (a == 0, "my msg");
  NS3_ASSERT (a != 0)
  NS3_ASSERT_MSG (a != 0, "my 2 msg");
}