Skip to content

Commit e917b82

Browse files
authored
[lldb] Remove unused code in TestSwiftGenericEnums (NFC) (#8122) (#8216)
(cherry-picked from commit 6751d2a)
1 parent f3ffba2 commit e917b82

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
@@ -30,19 +30,6 @@ def get_variable(self, name):
3030
var.SetPreferSyntheticValue(True)
3131
return var
3232

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

5744

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

0 commit comments

Comments
 (0)