Skip to content

Commit 6751d2a

Browse files
authored
[lldb] Remove unused code in TestSwiftGenericEnums (NFC) (#8122)
1 parent 9c18718 commit 6751d2a

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

lldb/test/API/lang/swift/variables/generic_enums/TestSwiftGenericEnums.py

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,6 @@ def get_variable(self, name):
2727
var.SetPreferSyntheticValue(True)
2828
return var
2929

30-
# using Ints as keys should practically guarantee that key and index match
31-
# that makes the test case logic much much easier
32-
def check_dictionary_entry(self, var, index, key_summary, value_summary):
33-
self.assertTrue(var.GetChildAtIndex(index).IsValid(), "invalid item")
34-
self.assertTrue(var.GetChildAtIndex(index).GetChildMemberWithName(
35-
"key").IsValid(), "invalid key child")
36-
self.assertTrue(var.GetChildAtIndex(index).GetChildMemberWithName(
37-
"value").IsValid(), "invalid key child")
38-
self.assertTrue(var.GetChildAtIndex(index).GetChildMemberWithName(
39-
"key").GetSummary() == key_summary, "invalid key summary")
40-
self.assertTrue(var.GetChildAtIndex(index).GetChildMemberWithName(
41-
"value").GetSummary() == value_summary, "invalid value summary")
42-
4330
@swiftTest
4431
def test_swift_generic_enum_types(self):
4532
"""Test that we handle reasonably generically-typed enums"""
@@ -52,14 +39,6 @@ def test_swift_generic_enum_types(self):
5239
self.assertGreater(bkpt2.GetNumLocations(), 0, VALID_BREAKPOINT)
5340

5441

55-
# This is the function to remove the custom formats in order to have a
56-
# clean slate for the next test case.
57-
def cleanup():
58-
self.runCmd("type summary delete main.StringWrapper", check=False)
59-
60-
# Execute the cleanup function during test case tear down.
61-
self.addTearDownHook(cleanup)
62-
6342
enumvar = self.get_variable("myOptionalU").GetStaticValue()
6443
self.assertTrue(enumvar.GetValue() is None,
6544
"static type has a value when it shouldn't")

0 commit comments

Comments
 (0)