utils/run-tests.cc
author Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
Mon, 31 Mar 2008 14:56:41 -0700
changeset 2834 1aab57845b07
parent 1806 34e115600ef2
child 4218 debf1a8a96d3
permissions -rw-r--r--
remove 'All rigts reserved' keyword per tom's suggestion
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
150
663120712cd9 fix coding style
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 131
diff changeset
     1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
12
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     2
/*
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     3
 * Copyright (c) 2005 INRIA
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     4
 *
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     5
 * This program is free software; you can redistribute it and/or modify
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     6
 * it under the terms of the GNU General Public License version 2 as
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     7
 * published by the Free Software Foundation;
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     8
 *
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    12
 * GNU General Public License for more details.
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    13
 *
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    14
 * You should have received a copy of the GNU General Public License
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    15
 * along with this program; if not, write to the Free Software
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    16
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    17
 *
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    18
 * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    19
 */
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    20
14
6dd7d31c6fc3 replace yans include with ns3 include
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 12
diff changeset
    21
#include "ns3/test.h"
1526
46623ec253f4 Need to enable packet metadata early, else we trigger an assertion.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 437
diff changeset
    22
#include "ns3/packet-metadata.h"
1806
34e115600ef2 Fixed randomvariable bugs and modified unit tests so that there is no non-deterministic failure on the tests
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 1526
diff changeset
    23
#include "ns3/random-variable.h"
1526
46623ec253f4 Need to enable packet metadata early, else we trigger an assertion.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 437
diff changeset
    24
12
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    25
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    26
int main (int argc, char *argv[])
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    27
{
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    28
#ifdef RUN_SELF_TESTS
1806
34e115600ef2 Fixed randomvariable bugs and modified unit tests so that there is no non-deterministic failure on the tests
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 1526
diff changeset
    29
  ns3::RandomVariable::UseGlobalSeed(1,2,3,4,5,6);
1526
46623ec253f4 Need to enable packet metadata early, else we trigger an assertion.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 437
diff changeset
    30
  ns3::PacketMetadata::Enable ();
150
663120712cd9 fix coding style
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 131
diff changeset
    31
  ns3::TestManager::EnableVerbose ();
437
b2169abd3451 Provide correct exit value based on RunTests() success
Tom Henderson <tomh@tomh.org>
parents: 150
diff changeset
    32
  bool success = ns3::TestManager::RunTests ();
b2169abd3451 Provide correct exit value based on RunTests() success
Tom Henderson <tomh@tomh.org>
parents: 150
diff changeset
    33
  if (!success)
b2169abd3451 Provide correct exit value based on RunTests() success
Tom Henderson <tomh@tomh.org>
parents: 150
diff changeset
    34
    return 1;
12
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    35
#endif /* RUN_SELF_TESTS */
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    36
150
663120712cd9 fix coding style
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 131
diff changeset
    37
  return 0;
12
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    38
}