tesseract 5.2.0
Loading...
Searching...
No Matches
tesseract::QuickTest Class Reference
Inheritance diagram for tesseract::QuickTest:
tesseract::EuroText tesseract::LoadLang tesseract::LoadLanguage tesseract::LoadScript tesseract::MatchGroundTruth

Protected Member Functions

void SetUp () override
 
void TearDown () override
 
void SetUp () override
 
void TearDown () override
 
void SetUp () override
 
void TearDown () override
 

Protected Attributes

time_t start_time_
 

Detailed Description

Definition at line 38 of file apiexample_test.cc.

Member Function Documentation

◆ SetUp() [1/3]

void tesseract::QuickTest::SetUp ( )
inlineoverrideprotected

Definition at line 40 of file apiexample_test.cc.

40 {
41 start_time_ = time(nullptr);
42 }

◆ SetUp() [2/3]

void tesseract::QuickTest::SetUp ( )
inlineoverrideprotected

Definition at line 28 of file loadlang_test.cc.

28 {
29 start_time_ = time(nullptr);
30 }

◆ SetUp() [3/3]

void tesseract::QuickTest::SetUp ( )
inlineoverrideprotected

Definition at line 40 of file progress_test.cc.

40 {
41 start_time_ = time(nullptr);
42 }

◆ TearDown() [1/3]

void tesseract::QuickTest::TearDown ( )
inlineoverrideprotected

Definition at line 43 of file apiexample_test.cc.

43 {
44#ifndef NDEBUG
45 // Debug builds can be very slow, so allow 4 min for OCR of a test image.
46 // apitest_example including disabled tests takes about 18 min on ARMv7.
47 const time_t MAX_SECONDS_FOR_TEST = 240;
48#else
49 // Release builds typically need less than 10 s for OCR of a test image,
50 // apitest_example including disabled tests takes about 90 s on ARMv7.
51 const time_t MAX_SECONDS_FOR_TEST = 55;
52#endif
53 const time_t end_time = time(nullptr);
54 EXPECT_TRUE(end_time - start_time_ <= MAX_SECONDS_FOR_TEST)
55 << "The test took too long - " << ::testing::PrintToString(end_time - start_time_);
56 }

◆ TearDown() [2/3]

void tesseract::QuickTest::TearDown ( )
inlineoverrideprotected

Definition at line 31 of file loadlang_test.cc.

31 {
32 const time_t end_time = time(nullptr);
33 EXPECT_TRUE(end_time - start_time_ <= 25)
34 << "The test took too long - " << ::testing::PrintToString(end_time - start_time_);
35 }

◆ TearDown() [3/3]

void tesseract::QuickTest::TearDown ( )
inlineoverrideprotected

Definition at line 43 of file progress_test.cc.

43 {
44 const time_t end_time = time(nullptr);
45 EXPECT_TRUE(end_time - start_time_ <= 25)
46 << "The test took too long - " << ::testing::PrintToString(end_time - start_time_);
47 }

Member Data Documentation

◆ start_time_

time_t tesseract::QuickTest::start_time_
protected

Definition at line 57 of file apiexample_test.cc.


The documentation for this class was generated from the following files: