Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
yangql
googletest
Commits
5d83ee08
Commit
5d83ee08
authored
Dec 03, 2013
by
kosak
Browse files
Fix warnings encountered with clang -Wall.
parent
37b97d1c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
4 deletions
+8
-4
include/gtest/internal/gtest-port.h
include/gtest/internal/gtest-port.h
+5
-2
test/gtest-printers_test.cc
test/gtest-printers_test.cc
+1
-0
test/gtest-unittest-api_test.cc
test/gtest-unittest-api_test.cc
+2
-2
No files found.
include/gtest/internal/gtest-port.h
View file @
5d83ee08
...
...
@@ -810,8 +810,8 @@ class Secret;
// expression is true. For example, you could use it to verify the
// size of a static array:
//
// GTEST_COMPILE_ASSERT_(ARRAYSIZE
(content_type_names) == CONTENT_NUM_TYP
ES,
//
content_type_
names_incorrect_size);
// GTEST_COMPILE_ASSERT_(
GTEST_
ARRAY
_
SIZE
_(names) == NUM_NAM
ES,
// names_incorrect_size);
//
// or to make sure a struct is smaller than a certain size:
//
...
...
@@ -879,6 +879,9 @@ struct StaticAssertTypeEqHelper;
template
<
typename
T
>
struct
StaticAssertTypeEqHelper
<
T
,
T
>
{};
// Evaluates to the number of elements in 'array'.
#define GTEST_ARRAY_SIZE_(array) (sizeof(array) / sizeof(array[0]))
#if GTEST_HAS_GLOBAL_STRING
typedef
::
string
string
;
#else
...
...
test/gtest-printers_test.cc
View file @
5d83ee08
...
...
@@ -125,6 +125,7 @@ namespace foo {
class
UnprintableInFoo
{
public:
UnprintableInFoo
()
:
z_
(
0
)
{
memcpy
(
xy_
,
"
\xEF\x12
\x0\x0
\x34\xAB
\x0\x0"
,
8
);
}
double
z
()
const
{
return
z_
;
}
private:
char
xy_
[
8
];
double
z_
;
...
...
test/gtest-unittest-api_test.cc
View file @
5d83ee08
...
...
@@ -54,7 +54,7 @@ class UnitTestHelper {
public:
// Returns the array of pointers to all test cases sorted by the test case
// name. The caller is responsible for deleting the array.
static
TestCase
const
**
const
GetSortedTestCases
()
{
static
TestCase
const
**
GetSortedTestCases
()
{
UnitTest
&
unit_test
=
*
UnitTest
::
GetInstance
();
TestCase
const
**
const
test_cases
=
new
const
TestCase
*
[
unit_test
.
total_test_case_count
()];
...
...
@@ -83,7 +83,7 @@ class UnitTestHelper {
// Returns the array of pointers to all tests in a particular test case
// sorted by the test name. The caller is responsible for deleting the
// array.
static
TestInfo
const
**
const
GetSortedTests
(
const
TestCase
*
test_case
)
{
static
TestInfo
const
**
GetSortedTests
(
const
TestCase
*
test_case
)
{
TestInfo
const
**
const
tests
=
new
const
TestInfo
*
[
test_case
->
total_test_count
()];
...
...
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