1
+ // (C) Copyright 2017, Google Inc.
2
+ // Licensed under the Apache License, Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ // http://www.apache.org/licenses/LICENSE-2.0
6
+ // Unless required by applicable law or agreed to in writing, software
7
+ // distributed under the License is distributed on an "AS IS" BASIS,
8
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9
+ // See the License for the specific language governing permissions and
10
+ // limitations under the License.
1
11
2
- #include < math.h >
3
- #include < stdio.h >
12
+ #include < cmath >
13
+ #include < cstdio >
4
14
#include < string>
5
- #include " tesseract/ccutil/indexmapbidi.h"
15
+
16
+ #include " indexmapbidi.h"
17
+
18
+ #include " include_gunit.h"
6
19
7
20
using tesseract::IndexMap;
8
21
using tesseract::IndexMapBiDi;
@@ -13,7 +26,7 @@ namespace {
13
26
14
27
class IndexMapBiDiTest : public testing ::Test {
15
28
public:
16
- string OutputNameToPath (const string& name) {
29
+ std:: string OutputNameToPath (const std:: string& name) {
17
30
return file::JoinPath (FLAGS_test_tmpdir, name);
18
31
}
19
32
// Computes primes upto kPrimeLimit, using the seive of Eratosthenes.
@@ -66,7 +79,7 @@ TEST_F(IndexMapBiDiTest, Primes) {
66
79
base_map.CopyFrom (map);
67
80
TestPrimes (base_map);
68
81
// Test file i/o too.
69
- string filename = OutputNameToPath (" primesmap" );
82
+ std:: string filename = OutputNameToPath (" primesmap" );
70
83
FILE* fp = fopen (filename.c_str (), " wb" );
71
84
CHECK (fp != nullptr );
72
85
EXPECT_TRUE (map.Serialize (fp));
@@ -101,7 +114,3 @@ TEST_F(IndexMapBiDiTest, ManyToOne) {
101
114
}
102
115
103
116
} // namespace.
104
-
105
-
106
-
107
-
0 commit comments