Skip to content

[lldb] Remove unused code in TestSwiftGenericEnums (NFC) #8122

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

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,6 @@ def get_variable(self, name):
var.SetPreferSyntheticValue(True)
return var

# using Ints as keys should practically guarantee that key and index match
# that makes the test case logic much much easier
def check_dictionary_entry(self, var, index, key_summary, value_summary):
self.assertTrue(var.GetChildAtIndex(index).IsValid(), "invalid item")
self.assertTrue(var.GetChildAtIndex(index).GetChildMemberWithName(
"key").IsValid(), "invalid key child")
self.assertTrue(var.GetChildAtIndex(index).GetChildMemberWithName(
"value").IsValid(), "invalid key child")
self.assertTrue(var.GetChildAtIndex(index).GetChildMemberWithName(
"key").GetSummary() == key_summary, "invalid key summary")
self.assertTrue(var.GetChildAtIndex(index).GetChildMemberWithName(
"value").GetSummary() == value_summary, "invalid value summary")

@swiftTest
def test_swift_generic_enum_types(self):
"""Test that we handle reasonably generically-typed enums"""
Expand All @@ -52,14 +39,6 @@ def test_swift_generic_enum_types(self):
self.assertGreater(bkpt2.GetNumLocations(), 0, VALID_BREAKPOINT)


# This is the function to remove the custom formats in order to have a
# clean slate for the next test case.
def cleanup():
self.runCmd("type summary delete main.StringWrapper", check=False)

# Execute the cleanup function during test case tear down.
self.addTearDownHook(cleanup)

enumvar = self.get_variable("myOptionalU").GetStaticValue()
self.assertTrue(enumvar.GetValue() is None,
"static type has a value when it shouldn't")
Expand Down