~ubuntu-branches/ubuntu/lucid/ecasound2.2/lucid

« back to all changes in this revision

Viewing changes to libecasound/libecasound_tester.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Junichi Uekawa
  • Date: 2009-11-02 18:22:35 UTC
  • mfrom: (5.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20091102182235-4ngh7699dmkgonyu
Tags: 2.7.0-1
* New upstream release.
* Depend on libreadline-dev instead of libreadline5-dev by request of
  Mattias Klose. It's now libreadline6-dev. (closes: #553748)
* Update menu file to use section Applications/ instead of Apps/.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
// ------------------------------------------------------------------------
2
2
// libecasound_tester.cpp: Runs all tests registered to ECA_TEST_REPOSITORY
3
 
// Copyright (C) 2002-2003 Kai Vehmanen
 
3
// Copyright (C) 2002-2003,2009 Kai Vehmanen
4
4
//
5
5
// This program is free software; you can redistribute it and/or modify
6
6
// it under the terms of the GNU General Public License as published by
53
53
  }
54
54
#endif
55
55
 
 
56
  cout << "-------------------------------------------------------------------------" << endl;
 
57
  cout << "libecasound_tester start:" << endl;
 
58
  cout << "-------------------------------------------------------------------------" << endl;
 
59
 
56
60
  if (argc > 1)
57
61
    /* note: run one test case */
58
62
    repo.run(std::string(argv[1]));
60
64
    /* note: run all test cases */
61
65
    repo.run();
62
66
 
63
 
  cerr << "-------------------------------------------------------------------------" << endl;
64
 
  cerr << "libecasound_tester summary:" << endl;
65
 
  cerr << "-------------------------------------------------------------------------" << endl;
66
 
  cerr << endl;
 
67
  cout << "-------------------------------------------------------------------------" << endl;
 
68
  cout << "libecasound_tester summary:" << endl;
 
69
  cout << "-------------------------------------------------------------------------" << endl;
 
70
  cout << endl;
67
71
 
68
72
  if (repo.success() != true) {
69
 
    cerr << repo.failures().size() << " failed test cases ";
70
 
    cerr << "in ECA_TEST_REPOSITORY:" << endl << endl;
 
73
    cout << repo.failures().size() << " failed test cases ";
 
74
    cout << "in ECA_TEST_REPOSITORY:" << endl << endl;
71
75
 
72
76
    const list<string>& failures = repo.failures();
73
77
    list<string>::const_iterator q = failures.begin();
74
78
    int n = 1;
75
79
    while(q != failures.end()) {
76
 
      cerr << n++ << ". " << *q << endl;
 
80
      cout << n++ << ". " << *q << endl;
77
81
      ++q;
78
82
    }
79
83
    
80
84
    return -1;
81
85
  }
82
86
  else {
83
 
    cerr << "All tests succesful." << endl;
 
87
    cout << "All tests succesful." << endl;
84
88
  }
85
89
 
86
 
  cerr << endl;
87
 
  cerr << "-------------------------------------------------------------------------";
88
 
  cerr << endl << endl;
 
90
  cout << endl;
 
91
  cout << "-------------------------------------------------------------------------";
 
92
  cout << endl << endl;
89
93
 
90
94
  return 0;
91
95
}