samples/main-debug.cc
author Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
Fri, 20 Jul 2007 11:27:34 +0100
changeset 954 a54d59850d03
parent 324 7571b28edc22
permissions -rw-r--r--
WAF: use a separate 'waf task' for installing each public ns3 header to work around a dependency tracking bug in waf causing too many rebuilds when a single header file changes.

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

NS_DEBUG_COMPONENT_DEFINE ("MyComponentA");

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

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

  foo::OneFunction ();

  NS_DEBUG ("other debug output");

  int a;
  a = 0;

  NS_ASSERT (a == 0);
  NS_ASSERT_MSG (a == 0, "my msg");
  NS_ASSERT (a != 0);
  NS_ASSERT_MSG (a != 0, "my 2 msg");
}