Skip to content

Commit

Permalink
Simplify test preparation code
Browse files Browse the repository at this point in the history
  • Loading branch information
sorbits committed Oct 17, 2014
1 parent 207c642 commit 578a679
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions Frameworks/version/tests/t_version.cc
Expand Up @@ -27,20 +27,11 @@ void test_null_string ()

void test_exhaustive ()
{
std::string const numbers[] = { "1", "1.01", "1.1.1", "1.1.2", "1.2", "1.2.1", "1.10", "2", "2.1", "2.1.1", "2.2" };
std::vector<std::string> versions;

for(auto number : numbers)
for(std::string number : { "1", "1.01", "1.1.1", "1.1.2", "1.2", "1.2.1", "1.10", "2", "2.1", "2.1.1", "2.2" })
{
versions.push_back(number + "-alpha");
versions.push_back(number + "-alpha.1");
versions.push_back(number + "-alpha.2");
versions.push_back(number + "-alpha.3+debug");
versions.push_back(number + "-beta");
versions.push_back(number + "-beta.1");
versions.push_back(number + "-beta.2");
versions.push_back(number + "-rc.1");
versions.push_back(number);
for(std::string suffix : { "-alpha", "-alpha.1", "-alpha.2", "-alpha.3+debug", "-beta", "-beta.1", "-beta.2", "-rc.1", "" })
versions.push_back(number + suffix);
}

for(size_t i = 0; i < versions.size(); ++i)
Expand Down

0 comments on commit 578a679

Please sign in to comment.