mirror of
https://github.com/github/codeql.git
synced 2026-05-02 04:05:14 +02:00
Swift: changes required for TBD node rework
These changes are required to allow a new type-safe approach to TBD nodes, that will come in a separate commit. This introduces: * the possibility to add properties to the root `Element` * a functor taking tags to the corresponding binding trap entry * `hasProp()` methods for optional properties in QL * `getPrimaryQlClass()` method
This commit is contained in:
@@ -7,14 +7,14 @@ from swift.codegen.lib import cpp
|
||||
|
||||
|
||||
@pytest.mark.parametrize("keyword", cpp.cpp_keywords)
|
||||
def test_field_keyword_cpp_name(keyword):
|
||||
def test_field_keyword_name(keyword):
|
||||
f = cpp.Field(keyword, "int")
|
||||
assert f.cpp_name == keyword + "_"
|
||||
assert f.field_name == keyword + "_"
|
||||
|
||||
|
||||
def test_field_cpp_name():
|
||||
def test_field_name():
|
||||
f = cpp.Field("foo", "int")
|
||||
assert f.cpp_name == "foo"
|
||||
assert f.field_name == "foo"
|
||||
|
||||
|
||||
@pytest.mark.parametrize("type,expected", [
|
||||
|
||||
Reference in New Issue
Block a user