-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Temporarily suppress dependent name types #329
Merged
Merged
Changes from 8 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
7299368
Add test that fails
jslee02 2486fdc
Skip for dependent name types (e.g., typename T::type)
jslee02 4172b35
Merge remote-tracking branch 'origin/master' into ignore_dependent_name
jslee02 3ef565f
Print warning when skipping dependent name types
jslee02 25c9874
Merge remote-tracking branch 'origin/master' into ignore_dependent_name
jslee02 18be273
Fix module names
jslee02 5d55150
Add unit test that should pass once #328 is resolved
0661f73
Merge branch 'master' into ignore_dependent_name
jslee02 ca556af
Merge branch 'master' into ignore_dependent_name
jslee02 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
test/examples/regression/issue328_dependent_name/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
set(test_name "issue328_dependent_name") | ||
|
||
chimera_add_binding_test_pybind11(${test_name}_pybind11 | ||
SOURCES ${test_name}.h | ||
NAMESPACES chimera_test | ||
CONFIGURATION ${CMAKE_CURRENT_SOURCE_DIR}/pybind11.yaml | ||
COPY_MODULE | ||
) | ||
|
||
chimera_add_binding_test_boost_python(${test_name}_boost_python | ||
SOURCES ${test_name}.h | ||
NAMESPACES chimera_test | ||
CONFIGURATION ${CMAKE_CURRENT_SOURCE_DIR}/boost_python.yaml | ||
COPY_MODULE | ||
) | ||
|
||
chimera_add_python_test(${test_name}_python_tests ${test_name}.py) |
7 changes: 7 additions & 0 deletions
7
test/examples/regression/issue328_dependent_name/boost_python.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Arguments that will be appended in-order before command line arguments. | ||
arguments: | ||
- "-extra-arg" | ||
- "-I/usr/lib/clang/3.6/include" | ||
namespaces: | ||
"chimera_test": | ||
name: null # TODO: otherwise, import error |
25 changes: 25 additions & 0 deletions
25
test/examples/regression/issue328_dependent_name/issue328_dependent_name.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#pragma once | ||
|
||
#include <type_traits> | ||
|
||
namespace chimera_test | ||
{ | ||
|
||
template <typename T> | ||
class Vector | ||
{ | ||
public: | ||
using Scalar = T; | ||
|
||
Vector() = default; | ||
}; | ||
|
||
template <typename S> | ||
struct ScalarTrait | ||
{ | ||
typedef typename S::Scalar type; | ||
}; | ||
|
||
using VectorScalar = ScalarTrait<Vector<double>>::type; | ||
|
||
} // namespace chimera_test |
20 changes: 20 additions & 0 deletions
20
test/examples/regression/issue328_dependent_name/issue328_dependent_name.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import unittest | ||
|
||
import issue328_dependent_name_pybind11 as py11 | ||
import issue328_dependent_name_boost_python as boost | ||
|
||
|
||
class TestIssue328(unittest.TestCase): | ||
|
||
def _test_issue328(self, binding): | ||
# TODO: The next line should be uncommented once #328 is resolved. | ||
# self.assertEqual(binding.VectorScalar, float) | ||
pass | ||
|
||
def test_issue328(self): | ||
self._test_issue328(py11) | ||
self._test_issue328(boost) | ||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main() |
7 changes: 7 additions & 0 deletions
7
test/examples/regression/issue328_dependent_name/pybind11.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Arguments that will be appended in-order before command line arguments. | ||
arguments: | ||
- "-extra-arg" | ||
- "-I/usr/lib/clang/3.6/include" | ||
namespaces: | ||
"chimera_test": | ||
name: null # TODO: otherwise, import error |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In situations where we are just suppressing an issue instead of solving it, could we add an assertion that should work if we didn't have the error (like being able to access this
::type
) and then comment it out in the test?I am worried it will be hard to tell which issues we have solved and which ones we have just covered up. This makes it hard if we e.g. upgrade clang: some of this functionality might get fixed, but we won't know how to test if it is without reading many old bug reports.