Files
unison/samples/main-debug.cc

28 lines
489 B
C++
Raw Normal View History

2007-02-07 08:49:54 +01:00
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
#include "ns3/debug.h"
2007-02-16 09:00:22 +01:00
#include "ns3/assert.h"
2007-02-07 08:49:54 +01:00
2007-02-13 18:20:24 +01:00
NS_DEBUG_COMPONENT_DEFINE ("MyComponentA");
2007-02-07 08:49:54 +01:00
// declare other function
namespace foo {
void OneFunction (void);
}
int main (int argc, int argv)
{
2007-02-13 18:20:24 +01:00
NS_DEBUG ("nargc="<<argc);
2007-02-07 08:49:54 +01:00
foo::OneFunction ();
2007-02-13 18:20:24 +01:00
NS_DEBUG ("other debug output");
2007-02-13 09:45:32 +01:00
2007-02-13 10:23:10 +01:00
int a;
a = 0;
2007-02-13 09:45:32 +01:00
2007-02-13 18:20:24 +01:00
NS_ASSERT (a == 0);
NS_ASSERT_MSG (a == 0, "my msg");
NS_ASSERT (a != 0)
NS_ASSERT_MSG (a != 0, "my 2 msg");
2007-02-07 08:49:54 +01:00
}