/usr/include/cutter/cppcutter.h is in libcppcutter-dev 1.1.7-1.2ubuntu3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 | /* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* Copyright (C) 2009 Kouhei Sutou <kou@clear-code.com>
*
* This library is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef __CPPCUTTER_H__
#define __CPPCUTTER_H__
#include <cutter.h>
#include <cppcutter/cppcut-macros.h>
#include <cppcutter/cppcut-assertions.h>
#include <cppcutter/cppcut-message.h>
/**
* SECTION: cppcutter
* @title: CppCutter
* @short_description: Cutter with C++ support.
* @see_also: <link
* linkend="cutter-Assertions-with-C++-support">
* Assertions with C++ support</link>
*
* CppCutter provides C++ friendly interface of Cutter. If
* you want to write tests with C++, it's good idea that you
* consider CppCutter to be used too.
*
* It's easy to use CppCutter. You just include <cppcutter.h>
* instead of <cutter.h> and use cppcutter.pc instead of
* cutter.pc:
*
* test-xxx.cpp:
* |[
* -#include <cutter.h>
* +#include <cppcutter.h>
* ]|
*
* configure.ac:
* |[
* -AC_CHECK_CUTTER
* +AC_CHECK_CPPCUTTER
* ]|
*
* Makefile.am:
* |[
* -XXX_CFLAGS = $(CUTTER_CFLAGS)
* -XXX_LIBS = $(CUTTER_LIBS)
* +XXX_CFLAGS = $(CPPCUTTER_CFLAGS)
* +XXX_LIBS = $(CPPCUTTER_LIBS)
* ]|
*
* Test functions are defined in namespace. Naming
* convention is the same as Cutter. i.e.: 'test_...'
* function is test function, 'setup' or 'cut_setup' is
* setup function and 'teardown' or 'cut_teardown' is
* teardown function.
*
* test-calc.cpp:
* |[
* #include <cppcutter.h>
*
* namespace calc
* {
* void
* test_add (void)
* {
* cppcut_assert_equal(3, calc.add(1, 2));
* }
*
* void
* test_sub (void)
* {
* cppcut_assert_equal(5, calc.sub(9, 4));
* }
* }
* ]|
*
* You just define a function for adding a new test. You
* don't need to use magical macros.
*/
/**
* CPPCUTTER_ENABLED
*
* Defined when CppCutter is enabled.
*
* Since: 1.0.9
*/
#define CPPCUTTER_ENABLED 1
#ifndef CUTTER_DISABLE_DEPRECATED
/**
* CPPCUT_BEGIN_TEST_DECLS
*
* Use %CPPCUT_BEGIN_TEST_DECLS and %CPPCUT_END_TEST_DECLS
* pair for prototype declarations for test functions:
*
* |[
* CPPCUT_BEGIN_TEST_DECLS
* void test_add ();
* void test_remove ();
* CPPCUT_END_TEST_DECLS
* ]|
*
* Those macros just surround prototype declarations for
* test functions with 'extern "C" {...}'.
*
* Since: 1.0.9
* Deprecated: 1.1.0: Use namespace instead.
*/
#define CPPCUT_BEGIN_TEST_DECLS extern "C" {
/**
* CPPCUT_END_TEST_DECLS
*
* See %CPPCUT_BEGIN_TEST_DECLS.
*
* Since: 1.0.9
* Deprecated: 1.1.0: Use namespace instead.
*/
#define CPPCUT_END_TEST_DECLS }
#endif
/**
* cppcut_message:
* @format: the optional message format. See the printf()
* documentation.
* @...: the parameters to insert into the format string.
*
* Specifies optional assertion message with C++ friendly
* API. The optional message can be specified with printf()
* style API or "<<" stream style API.
*
* e.g.:
* |[
* cppcut_assert_equal("abc", "def",
* cppcut_message("should fail!"));
* cppcut_assert_equal("abc", "def",
* cppcut_message() << "should fail!");
* ]|
*
* Since: 1.1.0
*/
#define cppcut_message(...) \
cut::Message cppcut_message; \
cppcut_message.printf(__VA_ARGS__); \
cppcut_message
#endif /* __CPPCUTTER_H__ */
/*
vi:nowrap:ai:expandtab:sw=4
*/
|