libept
Main Page
Namespaces
Classes
Files
File List
File Members
ept
axi
axi.test.h
Go to the documentation of this file.
1
// -*- mode: c++; tab-width: 4; indent-tabs-mode: t -*-
2
/*
3
* popcon test
4
*
5
* Copyright (C) 2007 Enrico Zini <enrico@debian.org>
6
*
7
* This program is free software; you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation; either version 2 of the License, or
10
* (at your option) any later version.
11
*
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
16
*
17
* You should have received a copy of the GNU General Public License
18
* along with this program; if not, write to the Free Software
19
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20
*/
21
22
#include <
ept/test.h
>
23
#include <
ept/axi/axi.h
>
24
#include <
ept/apt/apt.h
>
25
#include <wibble/sys/fs.h>
26
#include <set>
27
28
using namespace
std;
29
using namespace
ept;
30
31
struct
DirMaker
32
{
33
DirMaker
(
const
std::string& name)
34
{
35
wibble::sys::fs::mkdirIfMissing(name, 0755);
36
}
37
};
38
39
struct
TestAxi
:
AptTestEnvironment
40
{
41
DirMaker
md
;
42
axi::OverrideIndexDir
oid
;
43
apt::Apt
apt
;
44
45
TestAxi
()
46
: md( TEST_ENV_DIR
"xapian"
), oid( TEST_ENV_DIR
"xapian"
)
47
{
48
}
49
50
// Access an empty index
51
Test empty()
52
{
53
axi::OverrideIndexDir
oid(
"./empty"
);
54
assert_eq(
axi::timestamp
(), 0);
55
}
56
};
57
58
// vim:set ts=4 sw=4:
Generated on Sat Nov 2 2013 08:30:06 for libept by
1.8.1.2