Test for <control> opcode cleanup
This commit is contained in:
parent
a29b72feb2
commit
66d4a0d175
1 changed files with 14 additions and 0 deletions
|
|
@ -223,4 +223,18 @@ TEST_CASE("[Opcode] Normalization")
|
||||||
REQUIRE(sfz::Opcode(input, "").cleanUp(sfz::kOpcodeScopeRegion).opcode == expected);
|
REQUIRE(sfz::Opcode(input, "").cleanUp(sfz::kOpcodeScopeRegion).opcode == expected);
|
||||||
REQUIRE(sfz::Opcode(input, "").cleanUp(sfz::kOpcodeScopeGeneric).opcode == input);
|
REQUIRE(sfz::Opcode(input, "").cleanUp(sfz::kOpcodeScopeGeneric).opcode == input);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///
|
||||||
|
|
||||||
|
static const std::pair<absl::string_view, absl::string_view> controlSpecific[] = {
|
||||||
|
// ARIA aliases
|
||||||
|
{"set_realcc1", "set_hdcc1"},
|
||||||
|
};
|
||||||
|
|
||||||
|
for (auto pair : controlSpecific) {
|
||||||
|
absl::string_view input = pair.first;
|
||||||
|
absl::string_view expected = pair.second;
|
||||||
|
REQUIRE(sfz::Opcode(input, "").cleanUp(sfz::kOpcodeScopeControl).opcode == expected);
|
||||||
|
REQUIRE(sfz::Opcode(input, "").cleanUp(sfz::kOpcodeScopeGeneric).opcode == input);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue