Lucene++ - a full-featured, c++ search engine
API Documentation


Loading...
Searching...
No Matches
TestPoint.h
Go to the documentation of this file.
1
2// Copyright (c) 2009-2014 Alan Wright. All rights reserved.
3// Distributable under the terms of either the Apache License (Version 2.0)
4// or the GNU Lesser General Public License.
6
7#ifndef TESTPOINT_H
8#define TESTPOINT_H
9
10#include "Lucene.h"
11
12namespace Lucene {
13
15class LPPAPI TestPoint {
16public:
17 virtual ~TestPoint();
18
19protected:
20 static MapStringInt testMethods;
21 static bool enable;
22
23public:
24 static void enableTestPoints();
25 static void clear();
26 static void setTestPoint(const String& object, const String& method, bool point);
27 static bool getTestPoint(const String& object, const String& method);
28 static bool getTestPoint(const String& method);
29};
30
31class LPPAPI TestScope {
32public:
33 TestScope(const String& object, const String& method);
34 virtual ~TestScope();
35
36protected:
37 String object;
38 String method;
39};
40
41}
42
43#endif
Used for unit testing as a substitute for stack trace.
Definition TestPoint.h:15
static void clear()
static bool enable
Definition TestPoint.h:21
static bool getTestPoint(const String &method)
virtual ~TestPoint()
static void setTestPoint(const String &object, const String &method, bool point)
static void enableTestPoints()
static MapStringInt testMethods
Definition TestPoint.h:20
static bool getTestPoint(const String &object, const String &method)
Definition TestPoint.h:31
String method
Definition TestPoint.h:38
String object
Definition TestPoint.h:37
virtual ~TestScope()
TestScope(const String &object, const String &method)
Definition AbstractAllTermDocs.h:12

clucene.sourceforge.net