Parsing <none of those> values in SAS files.

This commit is contained in:
2016-05-23 01:27:28 +02:00
parent 401c4069bd
commit d118788142
4 changed files with 34331 additions and 6 deletions

View File

@@ -14,6 +14,7 @@ class SASParserTests : public ::testing::Test
protected:
SASParserTests()
: m_blocksworldTestFile(readFile("data/blocksworld.sas")),
m_freecellTestFile(readFile("data/freecell.sas")),
m_philosophersTestFile(readFile("data/philosophers.sas"))
{
}
@@ -33,6 +34,7 @@ class SASParserTests : public ::testing::Test
}
std::stringstream m_blocksworldTestFile;
std::stringstream m_freecellTestFile;
std::stringstream m_philosophersTestFile;
};
@@ -128,6 +130,24 @@ TEST_F(SASParserTests, RemoveTrailingParentheses)
////////////////////////////////////////////////////////////////////////////////////////////////////
TEST_F(SASParserTests, ParseNoneValue)
{
try
{
const auto description = plasp::sas::Description::fromStream(m_freecellTestFile);
// TODO: compare by identity, not value
ASSERT_EQ(description.variables()[0].values()[3], plasp::sas::Value::None);
ASSERT_EQ(description.variables()[5].values()[6], plasp::sas::Value::None);
}
catch (const std::exception &e)
{
FAIL () << e.what();
}
}
////////////////////////////////////////////////////////////////////////////////////////////////////
int main(int argc, char **argv)
{
::testing::InitGoogleTest(&argc, argv);

34277
tests/data/freecell.sas Normal file

File diff suppressed because it is too large Load Diff