| 1234567891011121314151617181920212223242526272829303132333435 |
- // Round 190am: the list behind Settings > LYNX extras (core/LynxExtras.h).
- #include "core/LynxExtras.h"
- #include "core/Preferences.h"
- TEST (extras190am_extras_list)
- {
- using namespace lynx;
- std::set<std::string_view> ids, keys;
- int count = 0;
- for (const auto& item : extras::items)
- {
- ++count;
- CHECK (! item.id.empty() && ! item.section.empty() && ! item.title.empty() && ! item.note.empty());
- CHECK (ids.insert (item.id).second); // one line per extra
- CHECK (keys.insert (item.settingsKey).second); // one preference per line: nothing is stored twice
- // "file:key" of the preference the feature already has
- const auto colon = item.settingsKey.find (':');
- CHECK (colon != std::string_view::npos && colon > 0 && colon + 1 < item.settingsKey.size());
- CHECK (item.settingsKey.substr (0, colon) == "ui-options.txt" || item.settingsKey.substr (0, colon) == "midi-settings.txt"
- || item.settingsKey.substr (0, colon) == "theme.lynxtheme"); // (round 190qw: the Soft look lives in the theme)
- CHECK (item.note.back() == '.'); // one line of explanation, a sentence
- // ... that names the switch's own place (rollup 0.1.32 step 3: round 190qi's lists have no other switch, and say so)
- CHECK (item.note.find ("Also ") != std::string_view::npos || item.note.find ("Its only switch is here.") != std::string_view::npos);
- }
- CHECK (count == 61); // (rollup 0.1.32 step 3: theme.tracksFromAccent, plugins.recent, plugins.oneRow, browser.midiPreview, browser.tabCompletes listed; round 190qw: theme.softLook; round 190qu: simple.dropStrip; rollup 0.1.32 step 2: mixer.peakValues, mixer.correlation, audioEditor.wheelScrolls, toolbar.grouped listed; round 190qk: general.stretchedClipsLoop, listed; round 190qr: editing.zoomAtSongPosition, playlist.gainHandleFollowsView, export.doneSound, export.doneWindow; round 190qo: file.alwaysCollect, export.noDialog; round 190qm: playlist.darkenMutedTracks, PR #268, on by default; round 190qj: playlist.dimUnselectedTracks, PR #267, on by default; round 190pm: simple.touchMode; round 190pf: playlist.chordLane, pianoRoll.chordHighlight; round 190pe: playlist.trackVersions; round 190pa: playlist.rangeEdits; round 190oq: editing.muteKeyToggles, general.startPage; round 190op: playlist.trackStates; round 190on: pianoRoll.stackedLanes; round 190ol: playlist.sectionsLane; round 190oo: playlist.shadeFadedAudio, project.clipLaunchStrips, simple.projectName, playlist.clipLanesFolded, controlBar.liveScale; round 190nq: playlist.rulerSeeksAnyTool; round 190ng: general.escCloses; round 190lo: polyEdit.prepareOnOpen; round 190kx: simple.loopDetect; round 190gz: project.linkTracks; round 190ht: playlist.trackInserts; round 190io: mixer.stripInserts; round 190iu: wheel zones, temporary tools, MIDI drop, Track-only; round 190jq: header width, pointer click, clip lanes; round 190jz: transport.wToStart)
- for (const auto* id : { "mixer.loudness", "mixer.usedOnly", "mixer.keepLostLinks", "mixer.followPlaylist", "playlist.automationLanes",
- "pianoRoll.songBarsRuler", "general.hoverValues", "playlist.trackInserts", "mixer.stripInserts", "playlist.dimUnselectedTracks" })
- CHECK (ids.count (id) == 1);
- // the one kept in the MIDI settings is off in a fresh profile and round-trips under the key the list names
- prefs::MidiPrefs midi;
- CHECK (! midi.gamepad);
- midi.gamepad = true;
- CHECK (midi.toText().find ("gamepad=1") != std::string::npos && prefs::MidiPrefs::fromText (midi.toText()).gamepad);
- }
|