LihonT 2 Luna beta: source release
Mod for TikTok 47.1.3 (arm64) in Material 3 style: bottom bar, profile menu, TikTok settings and comments; downloads without the watermark; switches for ads, live streams and the Shop tab; badges of other mods next to names and the niche mod badge (members service); app icons; mod settings screen. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
35
tests/test_runtime_compiles.py
Normal file
35
tests/test_runtime_compiles.py
Normal file
@@ -0,0 +1,35 @@
|
||||
"""The whole LihonT runtime (settings screen, hooks, region, flags) compiles against Android.
|
||||
|
||||
Nothing here is executed: screens need a device. This catches a broken edit in the UI code
|
||||
before a 350 MB build does.
|
||||
"""
|
||||
|
||||
from pathlib import Path
|
||||
import shutil
|
||||
import subprocess
|
||||
import tempfile
|
||||
import unittest
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
|
||||
|
||||
class RuntimeCompileTest(unittest.TestCase):
|
||||
def test_runtime_sources_compile_against_android_jar(self):
|
||||
javac = shutil.which("javac")
|
||||
android_jar = ROOT / "tools" / "android.jar"
|
||||
if not javac:
|
||||
raise RuntimeError("This test requires a JDK with javac")
|
||||
self.assertTrue(android_jar.is_file(), "tools/android.jar must be available")
|
||||
sources = sorted(str(path) for path in (ROOT / "src" / "lihont" / "two").rglob("*.java"))
|
||||
self.assertTrue(sources)
|
||||
with tempfile.TemporaryDirectory(prefix="lihont-runtime-compile-") as out:
|
||||
result = subprocess.run(
|
||||
[javac, "--release", "17", "-nowarn", "-Xlint:-options", "-encoding", "UTF-8",
|
||||
"-cp", str(android_jar), "-d", out] + sources,
|
||||
capture_output=True, text=True, encoding="utf-8", timeout=120,
|
||||
)
|
||||
self.assertEqual(result.returncode, 0, result.stdout + result.stderr)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in New Issue
Block a user