Streak widget from 1x1 to 4x4 with an animated flame (orange while lit, grey when not), a streak keeper that writes the chosen message once a day to the chosen chats (off until switched on), avatar shapes, widgets and the keeper kept per account, Material 3 tonal surfaces instead of black (AMOLED keeps pure black), launcher previews of our own, and the mod runtime in a dex of its own. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
30 lines
1.1 KiB
Python
30 lines
1.1 KiB
Python
"""The runtime gets a dex of its own: the one after the last of TikTok's, never over a gap."""
|
|
|
|
import unittest
|
|
|
|
from lihont.upgrade import next_dex_name
|
|
|
|
|
|
class NextDexNameTest(unittest.TestCase):
|
|
def test_the_next_dex_follows_the_last_one(self):
|
|
names = ["classes.dex"] + ["classes%d.dex" % n for n in range(2, 54)] + ["AndroidManifest.xml", "res/a.png"]
|
|
self.assertEqual("classes54.dex", next_dex_name(names))
|
|
|
|
def test_the_second_dex_follows_a_single_one(self):
|
|
self.assertEqual("classes2.dex", next_dex_name(["classes.dex", "assets/x.dex.json"]))
|
|
|
|
def test_a_gap_in_the_row_is_refused(self):
|
|
with self.assertRaises(ValueError):
|
|
next_dex_name(["classes.dex", "classes2.dex", "classes4.dex"])
|
|
|
|
def test_no_dex_at_all_is_refused(self):
|
|
with self.assertRaises(ValueError):
|
|
next_dex_name(["AndroidManifest.xml"])
|
|
|
|
def test_other_files_that_look_alike_do_not_count(self):
|
|
self.assertEqual("classes3.dex", next_dex_name(["classes.dex", "classes2.dex", "classes9.dex.bak", "lib/classes7.dex"]))
|
|
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main()
|