This file is indexed.

/usr/share/doc/cxxtest/examples/TMyClass.h is in cxxtest 4.3-1.

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
// TMyClass.h

template<class T>
class TMyClass
{
public:

    T value;

    TMyClass(const T& value_) : value(value_) {}

    // CxxTest requires a copy constructor
    TMyClass(const TMyClass<T>& other) : value(other.value) {}

    // This is required if you want to use TS_ASSERT_EQUALS
    bool operator==(const TMyClass<T>& other) const { return value == other.value; }

    // If you want to use TS_ASSERT_LESS_THAN
    bool operator<(const TMyClass<T>& other) const { return value < other.value; }
};

#ifdef CXXTEST_RUNNING
// This declaration is only activated when building a CxxTest test suite
#include <cxxtest/ValueTraits.h>
#include <typeinfo>
#include <sstream>

namespace CxxTest
{
template <class T>
class ValueTraits< TMyClass<T> >
{
public:
    std::ostringstream _s;

    ValueTraits(const TMyClass<T>& t) { _s << typeid(t).name() << "( " << t.value << " )"; }

    ValueTraits(const ValueTraits< TMyClass<T> >& value) { _s << value._s.rdbuf(); }

    const char *asString() const { return _s.str().c_str(); }
};
};
#endif // CXXTEST_RUNNING