Skip to content

Commit cc90812

Browse files
authored
Merge pull request #255 from donpellegrino/254-set-dumpDictionary-test-input
254 set dump dictionary test input
2 parents 9a708d2 + 3c21b8d commit cc90812

2 files changed

Lines changed: 11 additions & 25 deletions

File tree

libcds/src/static/textindex/suftest3.test.cpp

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,8 @@
3535

3636
#include <stdlib.h>
3737
#include <stdio.h>
38-
#if 1
39-
#include <sys/timeb.h>
40-
#else
4138
#include <sys/time.h>
4239
#include <sys/resource.h>
43-
#endif
4440
#include <comparray4.h>
4541
#include <limits.h>
4642
#include <stdbool.h>
@@ -58,20 +54,7 @@
5854

5955
namespace cds_static
6056
{
61-
62-
#if 1
63-
typedef struct timeb mytimestruct;
64-
void mygettime(mytimestruct *t) {
65-
ftime(t);
66-
}
67-
double mylaptime(mytimestruct *before,mytimestruct *after) {
68-
double t;
69-
t = after->time - before->time;
70-
t += (double)(after->millitm - before->millitm)/1000;
71-
return t;
72-
}
73-
#else
74-
typedef mytimestruct struct rusage;
57+
typedef struct rusage mytimestruct;
7558
void mygettime(mytimestruct *t) {
7659
getrusage(RUSAGE_SELF,t);
7760
}
@@ -82,7 +65,6 @@ namespace cds_static
8265
- before->ru_utime.tv_usec)/1000000;
8366
return t;
8467
}
85-
#endif
8668

8769
/* Three function to variables to manage parameters */
8870
static bool is_delimeter(char *delimiters, char c) {

libhdt/tests/dumpDictionary.cpp

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,16 @@ int main(int argc, char *argv[]) {
7171
}
7272
}
7373

74-
if (argc < 2) {
75-
cout << "ERROR: You must supply an input HDT File" << endl << endl;
76-
help();
77-
return 1;
78-
}
79-
inputFile = argv[optind];
74+
// if (argc < 2) {
75+
// cout << "ERROR: You must supply an input HDT File" << endl << endl;
76+
// help();
77+
// return 1;
78+
// }
79+
// inputFile = argv[optind];
80+
81+
// Input is explicitly set to the revision controlled .hdt for
82+
// automated test execution.
83+
inputFile = "../data/literals.hdt";
8084

8185
// Load HDT file
8286
HDT *hdt = HDTManager::mapIndexedHDT(inputFile.c_str());

0 commit comments

Comments
 (0)