Skip to content

Play your own Switch games on iPhone/iPad — one-click macOS app, no terminal. | 把 Switch 游戏装进 iPhone:图形界面一键构建,不用命令行。Bring your own game.

Launcher tests: the 120 fps option and its condition

v0lumehi0de2e4e47f32
diff --git a/frontend/Tests/NX2AppleTests/GermanLocalizationTests.swift b/frontend/Tests/NX2AppleTests/GermanLocalizationTests.swift
index 5867caaf..5c7aedd7 100644
--- a/frontend/Tests/NX2AppleTests/GermanLocalizationTests.swift
+++ b/frontend/Tests/NX2AppleTests/GermanLocalizationTests.swift
@@ -19,7 +19,7 @@ final class GermanLocalizationTests: IsolatedDefaultsTestCase {
"controls.fn.A", "controls.fn.B", "controls.fn.X", "controls.fn.Y", "controls.fn.L", "controls.fn.R",
"controls.fn.ZL", "controls.fn.ZR", "controls.fn.Plus", "controls.fn.Minus", "launch.mods",
"update.pill", "launch.opt.DM_OPMODE.0", "launch.opt.DM_PRESENT_UPSCALE.off",
- "launch.opt.DM_FPS_TARGET.30", "launch.opt.DM_FPS_TARGET.60", "launch.opt.DM_PRESENT_UPSCALE.metalfx", "launch.opt.DM_UPSCALER.metalfx",
+ "launch.opt.DM_FPS_TARGET.30", "launch.opt.DM_FPS_TARGET.60", "launch.opt.DM_FPS_TARGET.120", "launch.opt.DM_PRESENT_UPSCALE.metalfx", "launch.opt.DM_UPSCALER.metalfx",
"launch.opt.DM_SCREEN_ASPECT.0", // 16:9 (Switch) reads the same in every language
"switch2.badge", // the console's name
// The iOS shell's words that German writes as English does: OK, the controller, the Switch's Minus and Plus buttons, Version.
diff --git a/frontend/Tests/NX2AppleTests/LaunchOptionsTests.swift b/frontend/Tests/NX2AppleTests/LaunchOptionsTests.swift
index fa49e107..c42ca0d7 100644
--- a/frontend/Tests/NX2AppleTests/LaunchOptionsTests.swift
+++ b/frontend/Tests/NX2AppleTests/LaunchOptionsTests.swift
@@ -55,8 +55,8 @@ final class LaunchOptionsTests: IsolatedDefaultsTestCase {
// DM_PSO_MTL4's note is written without the semicolon settings.tsv has; the table follows the text rules.
if c.count > 7, !c[7].isEmpty, c[0] != "DM_PSO_MTL4" { XCTAssertEqual(L10n.string("launch.set.\(c[0]).note", .en), c[7], c[0]) }
if c[1] == "choice", c[2] != "languages" {
- for pair in c[2].split(separator: ",") {
- let v = pair.split(separator: "=", maxSplits: 1).map(String.init)
+ for pair in c[2].split(separator: ",") { // an option only some games have carries ?<condition> after its label
+ let v = pair.split(separator: "?", maxSplits: 1)[0].split(separator: "=", maxSplits: 1).map(String.init)
XCTAssertEqual(L10n.string("launch.opt.\(c[0]).\(v[0])", .en), v[1], c[0])
}
}