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
ba33a887
Commit
ba33a887
authored
Oct 29, 2019
by
misterg
Committed by
vslashg
Oct 29, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Googletest export
Internal Change PiperOrigin-RevId: 277336786
parent
fff8dabb
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
75 additions
and
175 deletions
+75
-175
ast.py
googlemock/scripts/generator/cpp/ast.py
+11
-25
gmock_class.py
googlemock/scripts/generator/cpp/gmock_class.py
+10
-25
gmock_class_test.py
googlemock/scripts/generator/cpp/gmock_class_test.py
+11
-25
keywords.py
googlemock/scripts/generator/cpp/keywords.py
+11
-25
tokenize.py
googlemock/scripts/generator/cpp/tokenize.py
+11
-25
utils.py
googlemock/scripts/generator/cpp/utils.py
+11
-25
gmock_gen.py
googlemock/scripts/generator/gmock_gen.py
+10
-25
No files found.
googlemock/scripts/generator/cpp/ast.py
View file @
ba33a887
#!/usr/bin/env python
#!/usr/bin/env python
#
#
# Copyright 200
8, Google Inc.
# Copyright 200
7 Neal Norwitz
#
All rights reserved
.
#
Portions Copyright 2007 Google Inc
.
#
#
#
Redistribution and use in source and binary forms, with or without
#
Licensed under the Apache License, Version 2.0 (the "License");
#
modification, are permitted provided that the following conditions are
#
you may not use this file except in compliance with the License.
#
met:
#
You may obtain a copy of the License at
#
#
# * Redistributions of source code must retain the above copyright
# http://www.apache.org/licenses/LICENSE-2.0
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
# * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# Unless required by applicable law or agreed to in writing, software
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# distributed under the License is distributed on an "AS IS" BASIS,
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# See the License for the specific language governing permissions and
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# limitations under the License.
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""Generate an Abstract Syntax Tree (AST) for C++."""
"""Generate an Abstract Syntax Tree (AST) for C++."""
...
...
googlemock/scripts/generator/cpp/gmock_class.py
View file @
ba33a887
#!/usr/bin/env python
#!/usr/bin/env python
#
#
# Copyright 2008, Google Inc.
# Copyright 2008 Google Inc. All Rights Reserved.
# All rights reserved.
#
#
#
Redistribution and use in source and binary forms, with or without
#
Licensed under the Apache License, Version 2.0 (the "License");
#
modification, are permitted provided that the following conditions are
#
you may not use this file except in compliance with the License.
#
met:
#
You may obtain a copy of the License at
#
#
# * Redistributions of source code must retain the above copyright
# http://www.apache.org/licenses/LICENSE-2.0
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
# * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# Unless required by applicable law or agreed to in writing, software
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# distributed under the License is distributed on an "AS IS" BASIS,
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# See the License for the specific language governing permissions and
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# limitations under the License.
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""Generate Google Mock classes from base classes.
"""Generate Google Mock classes from base classes.
...
...
googlemock/scripts/generator/cpp/gmock_class_test.py
View file @
ba33a887
#!/usr/bin/env python
#!/usr/bin/env python
#
#
# Copyright 2009
, Google Inc
.
# Copyright 2009
Neal Norwitz All Rights Reserved
.
#
All rights r
eserved.
#
Portions Copyright 2009 Google Inc. All Rights R
eserved.
#
#
#
Redistribution and use in source and binary forms, with or without
#
Licensed under the Apache License, Version 2.0 (the "License");
#
modification, are permitted provided that the following conditions are
#
you may not use this file except in compliance with the License.
#
met:
#
You may obtain a copy of the License at
#
#
# * Redistributions of source code must retain the above copyright
# http://www.apache.org/licenses/LICENSE-2.0
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
# * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# Unless required by applicable law or agreed to in writing, software
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# distributed under the License is distributed on an "AS IS" BASIS,
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# See the License for the specific language governing permissions and
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# limitations under the License.
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""Tests for gmock.scripts.generator.cpp.gmock_class."""
"""Tests for gmock.scripts.generator.cpp.gmock_class."""
...
...
googlemock/scripts/generator/cpp/keywords.py
View file @
ba33a887
#!/usr/bin/env python
#!/usr/bin/env python
#
#
# Copyright 2007
, Google Inc.
# Copyright 2007
Neal Norwitz
#
All rights reserved
.
#
Portions Copyright 2007 Google Inc
.
#
#
#
Redistribution and use in source and binary forms, with or without
#
Licensed under the Apache License, Version 2.0 (the "License");
#
modification, are permitted provided that the following conditions are
#
you may not use this file except in compliance with the License.
#
met:
#
You may obtain a copy of the License at
#
#
# * Redistributions of source code must retain the above copyright
# http://www.apache.org/licenses/LICENSE-2.0
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
# * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# Unless required by applicable law or agreed to in writing, software
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# distributed under the License is distributed on an "AS IS" BASIS,
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# See the License for the specific language governing permissions and
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# limitations under the License.
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""C++ keywords and helper utilities for determining keywords."""
"""C++ keywords and helper utilities for determining keywords."""
...
...
googlemock/scripts/generator/cpp/tokenize.py
View file @
ba33a887
#!/usr/bin/env python
#!/usr/bin/env python
#
#
# Copyright 2007
, Google Inc.
# Copyright 2007
Neal Norwitz
#
All rights reserved
.
#
Portions Copyright 2007 Google Inc
.
#
#
#
Redistribution and use in source and binary forms, with or without
#
Licensed under the Apache License, Version 2.0 (the "License");
#
modification, are permitted provided that the following conditions are
#
you may not use this file except in compliance with the License.
#
met:
#
You may obtain a copy of the License at
#
#
# * Redistributions of source code must retain the above copyright
# http://www.apache.org/licenses/LICENSE-2.0
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
# * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# Unless required by applicable law or agreed to in writing, software
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# distributed under the License is distributed on an "AS IS" BASIS,
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# See the License for the specific language governing permissions and
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# limitations under the License.
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""Tokenize C++ source code."""
"""Tokenize C++ source code."""
...
...
googlemock/scripts/generator/cpp/utils.py
View file @
ba33a887
#!/usr/bin/env python
#!/usr/bin/env python
#
#
# Copyright 2007
, Google Inc.
# Copyright 2007
Neal Norwitz
#
All rights reserved
.
#
Portions Copyright 2007 Google Inc
.
#
#
#
Redistribution and use in source and binary forms, with or without
#
Licensed under the Apache License, Version 2.0 (the "License");
#
modification, are permitted provided that the following conditions are
#
you may not use this file except in compliance with the License.
#
met:
#
You may obtain a copy of the License at
#
#
# * Redistributions of source code must retain the above copyright
# http://www.apache.org/licenses/LICENSE-2.0
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
# * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# Unless required by applicable law or agreed to in writing, software
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# distributed under the License is distributed on an "AS IS" BASIS,
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# See the License for the specific language governing permissions and
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# limitations under the License.
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""Generic utilities for C++ parsing."""
"""Generic utilities for C++ parsing."""
...
...
googlemock/scripts/generator/gmock_gen.py
View file @
ba33a887
#!/usr/bin/env python
#!/usr/bin/env python
#
#
# Copyright 2008, Google Inc.
# Copyright 2008 Google Inc. All Rights Reserved.
# All rights reserved.
#
#
#
Redistribution and use in source and binary forms, with or without
#
Licensed under the Apache License, Version 2.0 (the "License");
#
modification, are permitted provided that the following conditions are
#
you may not use this file except in compliance with the License.
#
met:
#
You may obtain a copy of the License at
#
#
# * Redistributions of source code must retain the above copyright
# http://www.apache.org/licenses/LICENSE-2.0
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
# * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# Unless required by applicable law or agreed to in writing, software
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# distributed under the License is distributed on an "AS IS" BASIS,
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# See the License for the specific language governing permissions and
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# limitations under the License.
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""Driver for starting up Google Mock class generator."""
"""Driver for starting up Google Mock class generator."""
...
...
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