~ubuntu-branches/ubuntu/raring/clucene-core/raring-proposed

« back to all changes in this revision

Viewing changes to src/test/search/spans/TestSpans.h

  • Committer: Package Import Robot
  • Author(s): Fathi Boudra
  • Date: 2012-08-11 09:33:38 UTC
  • mfrom: (1.1.5)
  • Revision ID: package-import@ubuntu.com-20120811093338-fgrx41ftqew3qt6a
Tags: 2.3.3.4-1
* New upstream release (Closes: #661703).
* Convert package to multiarch.
* Drop obsolete patches:
  - 01_add_missing_include_bug505667.diff
  - 02_posixness_fix_bug530308.diff
* Add patches:
  - Fixing_ZLIB_configuration_in_shared_CMakeLists.patch
  - Fix-pkgconfig-file-by-adding-clucene-shared-library.patch
  - Install-contribs-lib.patch
  - multiarch.patch
* Update debian/compat: bump to 8.
* Update debian/control:
  - update build dependencies (add cmake, libboost-dev and libz-dev).
  - bump Standards-Version to 3.9.3.
  - rename packages due to ABI bump: libclucene0ldbl -> libclucene-core1.
  - add libclucene-contribs1 package.
* Update debian/rules:
  - rewrite to use CMake.
  - add multiarch support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*------------------------------------------------------------------------------
 
2
* Copyright (C) 2003-2006 Ben van Klinken and the CLucene Team
 
3
*
 
4
* Distributable under the terms of either the Apache License (Version 2.0) or
 
5
* the GNU Lesser General Public License, as specified in the COPYING file.
 
6
------------------------------------------------------------------------------*/
 
7
#ifndef _lucene_search_spans_TestSpans
 
8
#define _lucene_search_spans_TestSpans
 
9
 
 
10
#include "test.h"
 
11
 
 
12
#include "CLucene/search/spans/SpanTermQuery.h"
 
13
CL_NS_USE2(search,spans)
 
14
 
 
15
class TestSpans 
 
16
{
 
17
private:
 
18
    CL_NS(search)::IndexSearcher *  searcher;
 
19
    CL_NS(store)::RAMDirectory *    directory;
 
20
 
 
21
    static const TCHAR *            docFields[];
 
22
 
 
23
public:
 
24
    static const TCHAR *            field;
 
25
    CuTest *                        tc;
 
26
 
 
27
 
 
28
public:
 
29
    TestSpans( CuTest* tc );
 
30
    virtual ~TestSpans();
 
31
 
 
32
    void setUp();
 
33
    SpanTermQuery * makeSpanTermQuery( const TCHAR* text );
 
34
 
 
35
    void orderedSlopTest3( int32_t slop, int32_t * expectedDocs, size_t expectedDocsCount );
 
36
    void orderedSlopTest3Equal( int32_t slop, int32_t * expectedDocs, size_t expectedDocsCount );
 
37
    void orderedSlopTest1Equal( int32_t slop, int32_t * expectedDocs, size_t expectedDocsCount );
 
38
 
 
39
    void testSpanNearOrdered();
 
40
    void testSpanNearOrderedEqual();
 
41
    void testSpanNearOrderedEqual1();
 
42
 
 
43
    void testSpanNearOrderedOverlap();
 
44
 
 
45
    void testSpanOrEmpty();
 
46
    void testSpanOrSingle();
 
47
    void testSpanOrDouble();
 
48
    void testSpanOrDoubleSkip();
 
49
    void testSpanOrUnused();
 
50
    void testSpanOrTripleSameDoc();
 
51
 
 
52
private:
 
53
    void checkHits( Query * query, int32_t * results, size_t resultsCount );
 
54
    void orderedSlopTest3SQ( SpanQuery * q1, SpanQuery * q2, SpanQuery * q3, int32_t slop, int32_t * expectedDocs, size_t expectedDocCount );
 
55
 
 
56
    void orSpans( const TCHAR ** terms, size_t termsCount, Spans *& spans, Query *& query );
 
57
    void tstNextSpans( Spans * spans, int32_t doc, int32_t start, int32_t end );
 
58
};
 
59
#endif
 
60