mirror of
https://github.com/davidgiven/fluxengine.git
synced 2025-10-31 11:17:01 -07:00
Hopefully add support for giving the reader a set of required sectors, so if
one is missing then we can tell and the track can be reread.
This commit is contained in:
@@ -13,6 +13,28 @@ static void test_split(void)
|
||||
== std::vector<std::string>{"", "2", ""}));
|
||||
assert((DataSpec::split("2", ",")
|
||||
== std::vector<std::string>{"2"}));
|
||||
assert((DataSpec::split("", ",")
|
||||
== std::vector<std::string>()));
|
||||
}
|
||||
|
||||
static void test_parserange(void)
|
||||
{
|
||||
assert(DataSpec::parseRange("")
|
||||
== std::set<unsigned>());
|
||||
assert(DataSpec::parseRange("1")
|
||||
== std::set<unsigned>({1}));
|
||||
assert(DataSpec::parseRange("1,3,5")
|
||||
== std::set<unsigned>({1, 3, 5}));
|
||||
assert(DataSpec::parseRange("1,1,1")
|
||||
== std::set<unsigned>({1}));
|
||||
assert(DataSpec::parseRange("2-3")
|
||||
== std::set<unsigned>({2, 3}));
|
||||
assert(DataSpec::parseRange("2+3")
|
||||
== std::set<unsigned>({2, 3, 4}));
|
||||
assert(DataSpec::parseRange("2+3x2")
|
||||
== std::set<unsigned>({2, 4}));
|
||||
assert(DataSpec::parseRange("9,2+3x2")
|
||||
== std::set<unsigned>({2, 4, 9}));
|
||||
}
|
||||
|
||||
static void test_parsemod(void)
|
||||
@@ -104,6 +126,7 @@ static void test_imagespec(void)
|
||||
int main(int argc, const char* argv[])
|
||||
{
|
||||
test_split();
|
||||
test_parserange();
|
||||
test_parsemod();
|
||||
test_fluxspec();
|
||||
test_imagespec();
|
||||
|
||||
Reference in New Issue
Block a user