File tree Expand file tree Collapse file tree 5 files changed +39
-0
lines changed Expand file tree Collapse file tree 5 files changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -82,3 +82,6 @@ kernel*.bin
82
82
/* .exe
83
83
/* .lnk
84
84
/win *
85
+
86
+ # GoogleTest
87
+ googletest
Original file line number Diff line number Diff line change
1
+ [submodule "googletest "]
2
+ path = googletest
3
+ url = https://github.com/google/googletest.git
Original file line number Diff line number Diff line change @@ -252,6 +252,12 @@ target_link_libraries (tesseract libtesseract)
252
252
253
253
########################################
254
254
255
+ if (EXISTS ${PROJECT_SOURCE_DIR} /googletest/CMakeLists.txt )
256
+ add_subdirectory (googletest )
257
+ add_executable (tesseract_tests tests/tesseracttests.cpp )
258
+ target_link_libraries (tesseract_tests gtest_main )
259
+ endif ()
260
+
255
261
if (BUILD_TRAINING_TOOLS )
256
262
add_subdirectory (training )
257
263
endif ()
Original file line number Diff line number Diff line change
1
+ // /////////////////////////////////////////////////////////////////////
2
+ // File: tesseracttests.cpp
3
+ // Description: Tests for Tesseract.
4
+ // Author: Stefan Weil
5
+ //
6
+ // Licensed under the Apache License, Version 2.0 (the "License");
7
+ // you may not use this file except in compliance with the License.
8
+ // You may obtain a copy of the License at
9
+ // http://www.apache.org/licenses/LICENSE-2.0
10
+ // Unless required by applicable law or agreed to in writing, software
11
+ // distributed under the License is distributed on an "AS IS" BASIS,
12
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ // See the License for the specific language governing permissions and
14
+ // limitations under the License.
15
+ // /////////////////////////////////////////////////////////////////////
16
+
17
+ #include " gtest/gtest.h"
18
+
19
+ TEST (TesseractTest, FirstDummyTestForTesseract) {
20
+ ASSERT_TRUE (1 );
21
+ }
22
+
23
+ int main (int argc, char **argv) {
24
+ ::testing::InitGoogleTest (&argc, argv);
25
+ return RUN_ALL_TESTS ();
26
+ }
You can’t perform that action at this time.
0 commit comments