File: regressionTest.cpp

package info (click to toggle)
clutils 20031216-5
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,348 kB
  • ctags: 540
  • sloc: sh: 7,191; cpp: 4,128; makefile: 192
file content (86 lines) | stat: -rw-r--r-- 2,363 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
// Copyright (c) 2000-2002 Clifton Labs, Inc.  
// All rights reserved.

// Clifton Labs MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF 
// THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
// TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
// PARTICULAR PURPOSE, OR NON-INFRINGEMENT.  Clifton Labs SHALL NOT BE LIABLE
// FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING,
// RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS
// DERIVATIVES.

// By using or copying this Software, Licensee agrees to abide by the
// intellectual property laws, and all other applicable laws of the
// U.S., and the terms of this license.

// Authors: Dale E. Martin   dmartin@cliftonlabs.com

#include <iostream>
#include "ArgumentParserTest.h"
#include "ConfigurationParserTest.h"
#include "FileManagerTest.h"
#include "PluginManagerTest.h"
using std::cerr;
using std::endl;

bool oneFailed = false;

void testFileManager(){
  int fileManagerStatus = FileManagerTest::instance()->regressionTest();
  if( fileManagerStatus != 0 ){
    cerr << "FileManager test failed." << endl;
    oneFailed = true;
  }
  else{
    cerr << "FileManager test passed." << endl;
  }
}

void testPluginManager(){
  int pluginManagerStatus = PluginManagerTest::instance()->regressionTest();
  if( pluginManagerStatus != 0 ){
    cerr << "PluginManager test failed." << endl;
    oneFailed = true;
  }
  else{
    cerr << "PluginManager test passed." << endl;
  }
}

void testConfigurationParser(){
  int configurationParserStatus = ConfigurationParserTest::instance()->regressionTest();
  if( configurationParserStatus != 0 ){
    cerr << "ConfigurationParser test failed." << endl;
    oneFailed = true;
  }
  else{
    cerr << "ConfigurationParser test passed." << endl;
  }
}

void testArgumentParser(){
  int argParserStatus = ArgumentParserTest::instance()->regressionTest();
  if( argParserStatus != 0 ){
    cerr << "ArgumentParser test failed." << endl;
    oneFailed = true;
  }
  else{
    cerr << "ArgumentParser test passed." << endl;
  }
}

int
main( int argc, char *argv[] ){
  testArgumentParser();
  testConfigurationParser();
  testFileManager();
  testPluginManager();

  if( oneFailed == true ){
    cerr << "WARNING - AT LEAST ONE TEST FAILED" << endl;
  }
  else{
    cerr << "All tests passed" << endl;
  }
}