File tree 2 files changed +23
-4
lines changed
2 files changed +23
-4
lines changed Original file line number Diff line number Diff line change @@ -92,6 +92,7 @@ check_PROGRAMS = \
92
92
nthitem_test \
93
93
osd_test \
94
94
progress_test \
95
+ qrsequence_test \
95
96
rect_test \
96
97
stats_test \
97
98
tablefind_test \
@@ -119,6 +120,9 @@ applybox_test_LDADD = $(GTEST_LIBS) $(TESS_LIBS) $(LEPTONICA_LIBS)
119
120
baseapi_test_SOURCES = baseapi_test.cc
120
121
baseapi_test_LDADD = $(ABSEIL_LIBS ) $(GTEST_LIBS ) $(TESS_LIBS )
121
122
123
+ baseapi_thread_test_SOURCES = baseapi_thread_test.cc
124
+ baseapi_thread_test_LDADD = $(ABSEIL_LIBS ) $(GTEST_LIBS ) $(TESS_LIBS )
125
+
122
126
bitvector_test_SOURCES = bitvector_test.cc
123
127
bitvector_test_LDADD = $(GTEST_LIBS ) $(TESS_LIBS )
124
128
@@ -165,6 +169,9 @@ progress_test_SOURCES = progress_test.cc
165
169
progress_test_LDFLAGS = $(OPENCL_LDFLAGS ) $(LEPTONICA_LIBS )
166
170
progress_test_LDADD = $(GTEST_LIBS ) $(GMOCK_LIBS ) $(TESS_LIBS ) $(LEPTONICA_LIBS )
167
171
172
+ qrsequence_test_SOURCES = qrsequence_test.cc
173
+ qrsequence_test_LDADD = $(ABSEIL_LIBS ) $(GTEST_LIBS ) $(TESS_LIBS )
174
+
168
175
rect_test_SOURCES = rect_test.cc
169
176
rect_test_LDADD = $(GTEST_LIBS ) $(TESS_LIBS )
170
177
Original file line number Diff line number Diff line change 1
- //
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.
2
11
3
- #include " tesseract/ccutil/qrsequence.h"
4
12
5
13
#include < algorithm>
6
14
#include < vector>
7
15
16
+ #include " cycletimer.h"
17
+ #include " include_gunit.h"
18
+ #include " log.h"
19
+ #include " qrsequence.h"
20
+
8
21
namespace {
9
22
10
23
class TestableQRSequenceGenerator : public QRSequenceGenerator {
@@ -33,8 +46,7 @@ TEST_P(QRSequenceGeneratorTest, GeneratesValidSequence) {
33
46
CycleTimer timer;
34
47
timer.Restart ();
35
48
for (int i = 0 ; i < kRangeSize ; ++i) vals[i] = generator.GetVal ();
36
- LOG (INFO) << kRangeSize << " -length sequence took " << timer.Get () * 1e3
37
- << " ms" ;
49
+ LOG (INFO) << kRangeSize << " -length sequence took " << timer.GetInMs () << " ms" ;
38
50
// Sort the numbers to verify that we've covered the range without repetition.
39
51
std::sort (vals.begin (), vals.end ());
40
52
for (int i = 0 ; i < kRangeSize ; ++i) {
You can’t perform that action at this time.
0 commit comments