File: test_custom.cc

package info (click to toggle)
libsigc%2B%2B-2.0 2.10.1-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 5,180 kB
  • sloc: sh: 4,246; cpp: 3,990; xml: 313; perl: 236; makefile: 174; ansic: 44
file content (27 lines) | stat: -rw-r--r-- 743 bytes parent folder | download | duplicates (6)
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
// Write your custom tests here so you don't have to think about how to compile
// and execute your test code against the exact same library that you are
// currently hacking.

#include "testutilities.h"
#include <sstream>
#include <cstdlib>
#include <sigc++/sigc++.h>

namespace
{
std::ostringstream result_stream;

} // end anonymous namespace

int main(int argc, char* argv[])
{
  auto util = TestUtilities::get_instance();

  if (!util->check_command_args(argc, argv))
    return util->get_result_and_delete_instance() ? EXIT_SUCCESS : EXIT_FAILURE;

  result_stream << "Example result string";
  util->check_result(result_stream, "Example result string");

  return util->get_result_and_delete_instance() ? EXIT_SUCCESS : EXIT_FAILURE;
}