Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
e65eb4e0
Commit
e65eb4e0
authored
Oct 02, 2013
by
Roman Donchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated Google Test to 1.7.0.
parent
178f0272
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
3 deletions
+45
-3
ts_gtest.h
modules/ts/include/opencv2/ts/ts_gtest.h
+45
-3
ts_gtest.cpp
modules/ts/src/ts_gtest.cpp
+0
-0
No files found.
modules/ts/include/opencv2/ts/ts_gtest.h
View file @
e65eb4e0
...
@@ -3116,6 +3116,7 @@ const char* StringFromGTestEnv(const char* flag, const char* default_val);
...
@@ -3116,6 +3116,7 @@ const char* StringFromGTestEnv(const char* flag, const char* default_val);
#endif
#endif
#include <ctype.h>
#include <ctype.h>
#include <float.h>
#include <string.h>
#include <string.h>
#include <iomanip>
#include <iomanip>
#include <limits>
#include <limits>
...
@@ -7315,6 +7316,9 @@ class FloatingPoint {
...
@@ -7315,6 +7316,9 @@ class FloatingPoint {
return
ReinterpretBits
(
kExponentBitMask
);
return
ReinterpretBits
(
kExponentBitMask
);
}
}
// Returns the maximum representable finite floating-point number.
static
RawType
Max
();
// Non-static methods
// Non-static methods
// Returns the bits that represents this number.
// Returns the bits that represents this number.
...
@@ -7395,6 +7399,13 @@ class FloatingPoint {
...
@@ -7395,6 +7399,13 @@ class FloatingPoint {
FloatingPointUnion
u_
;
FloatingPointUnion
u_
;
};
};
// We cannot use std::numeric_limits<T>::max() as it clashes with the max()
// macro defined by <windows.h>.
template
<>
inline
float
FloatingPoint
<
float
>::
Max
()
{
return
FLT_MAX
;
}
template
<>
inline
double
FloatingPoint
<
double
>::
Max
()
{
return
DBL_MAX
;
}
// Typedefs the instances of the FloatingPoint template class that we
// Typedefs the instances of the FloatingPoint template class that we
// care to use.
// care to use.
typedef
FloatingPoint
<
float
>
Float
;
typedef
FloatingPoint
<
float
>
Float
;
...
@@ -18112,9 +18123,9 @@ class GTEST_API_ TestInfo {
...
@@ -18112,9 +18123,9 @@ class GTEST_API_ TestInfo {
return
NULL
;
return
NULL
;
}
}
// Returns true if this test should run, that is if the test is not
disabled
// Returns true if this test should run, that is if the test is not
//
(or it is disabled but the also_run_disabled_tests flag has been specified)
//
disabled (or it is disabled but the also_run_disabled_tests flag has
// and its full name matches the user-specified filter.
//
been specified)
and its full name matches the user-specified filter.
//
//
// Google Test allows the user to filter the tests by their full names.
// Google Test allows the user to filter the tests by their full names.
// The full name of a test Bar in test case Foo is defined as
// The full name of a test Bar in test case Foo is defined as
...
@@ -18130,6 +18141,14 @@ class GTEST_API_ TestInfo {
...
@@ -18130,6 +18141,14 @@ class GTEST_API_ TestInfo {
// contains the character 'A' or starts with "Foo.".
// contains the character 'A' or starts with "Foo.".
bool
should_run
()
const
{
return
should_run_
;
}
bool
should_run
()
const
{
return
should_run_
;
}
// Returns true iff this test will appear in the XML report.
bool
is_reportable
()
const
{
// For now, the XML report includes all tests matching the filter.
// In the future, we may trim tests that are excluded because of
// sharding.
return
matches_filter_
;
}
// Returns the result of the test.
// Returns the result of the test.
const
TestResult
*
result
()
const
{
return
&
result_
;
}
const
TestResult
*
result
()
const
{
return
&
result_
;
}
...
@@ -18242,9 +18261,15 @@ class GTEST_API_ TestCase {
...
@@ -18242,9 +18261,15 @@ class GTEST_API_ TestCase {
// Gets the number of failed tests in this test case.
// Gets the number of failed tests in this test case.
int
failed_test_count
()
const
;
int
failed_test_count
()
const
;
// Gets the number of disabled tests that will be reported in the XML report.
int
reportable_disabled_test_count
()
const
;
// Gets the number of disabled tests in this test case.
// Gets the number of disabled tests in this test case.
int
disabled_test_count
()
const
;
int
disabled_test_count
()
const
;
// Gets the number of tests to be printed in the XML report.
int
reportable_test_count
()
const
;
// Get the number of tests in this test case that should run.
// Get the number of tests in this test case that should run.
int
test_to_run_count
()
const
;
int
test_to_run_count
()
const
;
...
@@ -18320,11 +18345,22 @@ class GTEST_API_ TestCase {
...
@@ -18320,11 +18345,22 @@ class GTEST_API_ TestCase {
return
test_info
->
should_run
()
&&
test_info
->
result
()
->
Failed
();
return
test_info
->
should_run
()
&&
test_info
->
result
()
->
Failed
();
}
}
// Returns true iff the test is disabled and will be reported in the XML
// report.
static
bool
TestReportableDisabled
(
const
TestInfo
*
test_info
)
{
return
test_info
->
is_reportable
()
&&
test_info
->
is_disabled_
;
}
// Returns true iff test is disabled.
// Returns true iff test is disabled.
static
bool
TestDisabled
(
const
TestInfo
*
test_info
)
{
static
bool
TestDisabled
(
const
TestInfo
*
test_info
)
{
return
test_info
->
is_disabled_
;
return
test_info
->
is_disabled_
;
}
}
// Returns true iff this test will appear in the XML report.
static
bool
TestReportable
(
const
TestInfo
*
test_info
)
{
return
test_info
->
is_reportable
();
}
// Returns true if the given test should run.
// Returns true if the given test should run.
static
bool
ShouldRunTest
(
const
TestInfo
*
test_info
)
{
static
bool
ShouldRunTest
(
const
TestInfo
*
test_info
)
{
return
test_info
->
should_run
();
return
test_info
->
should_run
();
...
@@ -18617,9 +18653,15 @@ class GTEST_API_ UnitTest {
...
@@ -18617,9 +18653,15 @@ class GTEST_API_ UnitTest {
// Gets the number of failed tests.
// Gets the number of failed tests.
int
failed_test_count
()
const
;
int
failed_test_count
()
const
;
// Gets the number of disabled tests that will be reported in the XML report.
int
reportable_disabled_test_count
()
const
;
// Gets the number of disabled tests.
// Gets the number of disabled tests.
int
disabled_test_count
()
const
;
int
disabled_test_count
()
const
;
// Gets the number of tests to be printed in the XML report.
int
reportable_test_count
()
const
;
// Gets the number of all tests.
// Gets the number of all tests.
int
total_test_count
()
const
;
int
total_test_count
()
const
;
...
...
modules/ts/src/ts_gtest.cpp
View file @
e65eb4e0
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment