Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
googletest
Project
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
googletest
Commits
9f894c2b
Commit
9f894c2b
authored
Sep 18, 2009
by
zhanyong.wan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Makes gtest compile cleanly with MSVC's warning 4511 & 4512 (copy ctor /
assignment operator cannot be generated) enabled.
parent
f43e4ff3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
35 additions
and
8 deletions
+35
-8
gtest-death-test.h
include/gtest/gtest-death-test.h
+3
-0
gtest-param-util-generated.h
include/gtest/internal/gtest-param-util-generated.h
+0
-0
gtest-param-util-generated.h.pump
include/gtest/internal/gtest-param-util-generated.h.pump
+18
-3
gtest-param-util.h
include/gtest/internal/gtest-param-util.h
+10
-1
SConstruct.common
scons/SConstruct.common
+2
-4
gtest_unittest.cc
test/gtest_unittest.cc
+2
-0
No files found.
include/gtest/gtest-death-test.h
View file @
9f894c2b
...
@@ -181,6 +181,9 @@ class ExitedWithCode {
...
@@ -181,6 +181,9 @@ class ExitedWithCode {
explicit
ExitedWithCode
(
int
exit_code
);
explicit
ExitedWithCode
(
int
exit_code
);
bool
operator
()(
int
exit_status
)
const
;
bool
operator
()(
int
exit_status
)
const
;
private
:
private
:
// No implementation - assignment is unsupported.
void
operator
=
(
const
ExitedWithCode
&
other
);
const
int
exit_code_
;
const
int
exit_code_
;
};
};
...
...
include/gtest/internal/gtest-param-util-generated.h
View file @
9f894c2b
This diff is collapsed.
Click to expand it.
include/gtest/internal/gtest-param-util-generated.h.pump
View file @
9f894c2b
...
@@ -64,6 +64,9 @@ class ValueArray1 {
...
@@ -64,6 +64,9 @@ class ValueArray1 {
operator
ParamGenerator
<
T
>
()
const
{
return
ValuesIn
(
&
v1_
,
&
v1_
+
1
);
}
operator
ParamGenerator
<
T
>
()
const
{
return
ValuesIn
(
&
v1_
,
&
v1_
+
1
);
}
private
:
private
:
// No implementation - assignment is unsupported.
void
operator
=
(
const
ValueArray1
&
other
);
const
T1
v1_
;
const
T1
v1_
;
};
};
...
@@ -83,6 +86,9 @@ class ValueArray$i {
...
@@ -83,6 +86,9 @@ class ValueArray$i {
}
}
private
:
private
:
// No implementation - assignment is unsupported.
void
operator
=
(
const
ValueArray
$
i
&
other
);
$
for
j
[[
$
for
j
[[
const
T
$
j
v
$
(
j
)
_
;
const
T
$
j
v
$
(
j
)
_
;
...
@@ -201,6 +207,9 @@ $for j || [[
...
@@ -201,6 +207,9 @@ $for j || [[
]];
]];
}
}
// No implementation - assignment is unsupported.
void
operator
=
(
const
Iterator
&
other
);
const
ParamGeneratorInterface
<
ParamType
>*
const
base_
;
const
ParamGeneratorInterface
<
ParamType
>*
const
base_
;
// begin[i]_ and end[i]_ define the i-th range that Iterator traverses.
// begin[i]_ and end[i]_ define the i-th range that Iterator traverses.
// current[i]_ is the actual traversing iterator.
// current[i]_ is the actual traversing iterator.
...
@@ -212,14 +221,17 @@ $for j [[
...
@@ -212,14 +221,17 @@ $for j [[
]]
]]
ParamType
current_value_
;
ParamType
current_value_
;
};
};
// class CartesianProductGenerator$i::Iterator
// No implementation - assignment is unsupported.
void
operator
=
(
const
CartesianProductGenerator
$
i
&
other
);
$
for
j
[[
$
for
j
[[
const
ParamGenerator
<
T
$
j
>
g
$
(
j
)
_
;
const
ParamGenerator
<
T
$
j
>
g
$
(
j
)
_
;
]]
]]
};
};
// class CartesianProductGenerator$i
]]
]]
...
@@ -250,12 +262,15 @@ $for j,[[
...
@@ -250,12 +262,15 @@ $for j,[[
}
}
private
:
private
:
// No implementation - assignment is unsupported.
void
operator
=
(
const
CartesianProductHolder
$
i
&
other
);
$
for
j
[[
$
for
j
[[
const
Generator
$
j
g
$
(
j
)
_
;
const
Generator
$
j
g
$
(
j
)
_
;
]]
]]
};
};
// class CartesianProductHolder$i
]]
]]
...
...
include/gtest/internal/gtest-param-util.h
View file @
9f894c2b
...
@@ -248,6 +248,9 @@ class RangeGenerator : public ParamGeneratorInterface<T> {
...
@@ -248,6 +248,9 @@ class RangeGenerator : public ParamGeneratorInterface<T> {
:
base_
(
other
.
base_
),
value_
(
other
.
value_
),
index_
(
other
.
index_
),
:
base_
(
other
.
base_
),
value_
(
other
.
value_
),
index_
(
other
.
index_
),
step_
(
other
.
step_
)
{}
step_
(
other
.
step_
)
{}
// No implementation - assignment is unsupported.
void
operator
=
(
const
Iterator
&
other
);
const
ParamGeneratorInterface
<
T
>*
const
base_
;
const
ParamGeneratorInterface
<
T
>*
const
base_
;
T
value_
;
T
value_
;
int
index_
;
int
index_
;
...
@@ -263,6 +266,9 @@ class RangeGenerator : public ParamGeneratorInterface<T> {
...
@@ -263,6 +266,9 @@ class RangeGenerator : public ParamGeneratorInterface<T> {
return
end_index
;
return
end_index
;
}
}
// No implementation - assignment is unsupported.
void
operator
=
(
const
RangeGenerator
&
other
);
const
T
begin_
;
const
T
begin_
;
const
T
end_
;
const
T
end_
;
const
IncrementT
step_
;
const
IncrementT
step_
;
...
@@ -349,7 +355,10 @@ class ValuesInIteratorRangeGenerator : public ParamGeneratorInterface<T> {
...
@@ -349,7 +355,10 @@ class ValuesInIteratorRangeGenerator : public ParamGeneratorInterface<T> {
// Use of scoped_ptr helps manage cached value's lifetime,
// Use of scoped_ptr helps manage cached value's lifetime,
// which is bound by the lifespan of the iterator itself.
// which is bound by the lifespan of the iterator itself.
mutable
scoped_ptr
<
const
T
>
value_
;
mutable
scoped_ptr
<
const
T
>
value_
;
};
};
// class ValuesInIteratorRangeGenerator::Iterator
// No implementation - assignment is unsupported.
void
operator
=
(
const
ValuesInIteratorRangeGenerator
&
other
);
const
ContainerType
container_
;
const
ContainerType
container_
;
};
// class ValuesInIteratorRangeGenerator
};
// class ValuesInIteratorRangeGenerator
...
...
scons/SConstruct.common
View file @
9f894c2b
...
@@ -104,9 +104,6 @@ class SConstructHelper:
...
@@ -104,9 +104,6 @@ class SConstructHelper:
# GTEST_IS_NULL_LITERAL_() triggers it and I cannot find
# GTEST_IS_NULL_LITERAL_() triggers it and I cannot find
# a fix.
# a fix.
'/wd4511', '/wd4512',
# copy ctor / assignment operator cannot be generated.
'-WX', # Treat warning as errors
'-WX', # Treat warning as errors
#'-GR-', # Disable runtime type information
#'-GR-', # Disable runtime type information
'-RTCs', # Enable stack-frame run-time error checks
'-RTCs', # Enable stack-frame run-time error checks
...
@@ -114,7 +111,8 @@ class SConstructHelper:
...
@@ -114,7 +111,8 @@ class SConstructHelper:
#'-EHs', # enable C++ EH (no SEH exceptions)
#'-EHs', # enable C++ EH (no SEH exceptions)
'-nologo', # Suppress logo line
'-nologo', # Suppress logo line
'-J', # All chars unsigned
'-J', # All chars unsigned
#'-Wp64', # Detect 64-bit portability issues
#'-Wp64', # Detect 64-bit portability issues. This
# flag has been deprecated by VS 2008.
'-Zi', # Produce debug information in PDB files.
'-Zi', # Produce debug information in PDB files.
],
],
CCPDBFLAGS='',
CCPDBFLAGS='',
...
...
test/gtest_unittest.cc
View file @
9f894c2b
...
@@ -6312,6 +6312,8 @@ class SequenceTestingListener : public EmptyTestEventListener {
...
@@ -6312,6 +6312,8 @@ class SequenceTestingListener : public EmptyTestEventListener {
Vector
<
String
>*
vector_
;
Vector
<
String
>*
vector_
;
const
char
*
const
id_
;
const
char
*
const
id_
;
GTEST_DISALLOW_COPY_AND_ASSIGN_
(
SequenceTestingListener
);
};
};
TEST
(
EventListenerTest
,
AppendKeepsOrder
)
{
TEST
(
EventListenerTest
,
AppendKeepsOrder
)
{
...
...
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