Q-W1 pt2: core/shell/app relocation + sub-namespaces; one concrete ui::Rect (LTRB fork retired); slot_map split from bank_book; BankIndex→BankModel; 59/59 green
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
// Standalone tests for reasampler::capture_paths — no REAPER, no framework.
|
||||
// The capture shell is DAW-bound and only verifiable in REAPER; this covers the
|
||||
// one genuinely pure piece: the bank-folder / unique-name / project-relative
|
||||
// path arithmetic that feeds BankIndex::add's relative-only invariant.
|
||||
// path arithmetic that feeds BankModel::add's relative-only invariant.
|
||||
|
||||
#include "../src/capture_paths.h"
|
||||
#include "../src/core/capture/capture_paths.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstdio>
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <vector>
|
||||
|
||||
using namespace reasampler;
|
||||
using namespace reasampler::capture;
|
||||
|
||||
static int g_fail = 0;
|
||||
#define CHECK(cond) do { if(!(cond)) { \
|
||||
@@ -74,7 +75,7 @@ static void testDeriveRelativePathIsProjectRelative() {
|
||||
BankPaths p = deriveBankPaths("C:\\Users\\d\\proj", "master mix", "1753080000");
|
||||
// Relative path is under the fixed bank subfolder, forward-slashed, .wav.
|
||||
CHECK(p.relativePath == "reasampler_bank/master_mix_1753080000.wav");
|
||||
// It must NOT be absolute by any of BankIndex::add's rejection rules:
|
||||
// It must NOT be absolute by any of BankModel::add's rejection rules:
|
||||
// no leading '/', no drive letter, no backslash, no UNC prefix.
|
||||
CHECK(p.relativePath.find(':') == std::string::npos);
|
||||
CHECK(p.relativePath.find('\\') == std::string::npos);
|
||||
|
||||
Reference in New Issue
Block a user