Skip to content

Commit

Permalink
Add tests for Issue 282 and 283
Browse files Browse the repository at this point in the history
  • Loading branch information
lamiller0 authored and Qlex42 committed Sep 20, 2022
1 parent a559fe0 commit 0b61f78
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/Alembic/AbcCoreOgawa/Tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,6 @@ file(COPY issue258.abc DESTINATION .)
file(COPY issue269.abc DESTINATION .)
file(COPY issue270.abc DESTINATION .)
file(COPY issue271.abc DESTINATION .)
file(COPY issue272.abc DESTINATION .)
file(COPY issue272.abc DESTINATION .)
file(COPY issue282.abc DESTINATION .)
file(COPY issue283.abc DESTINATION .)
29 changes: 28 additions & 1 deletion lib/Alembic/AbcCoreOgawa/Tests/fuzzTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,27 @@ void testIssue272(bool iUseMMap)
}
}

void testIssue282(bool iUseMMap)
{
Alembic::AbcCoreOgawa::ReadArchive r(1, iUseMMap);
ABCA::ArchiveReaderPtr ar = r("issue282.abc");
walkObj(ar->getTop());
}

void testIssue283(bool iUseMMap)
{
Alembic::AbcCoreOgawa::ReadArchive r(1, iUseMMap);
try
{
ABCA::ArchiveReaderPtr ar = r("issue283.abc");
}
catch(const std::exception& e)
{
std::string msg = "Invalid Alembic file.";
TESTING_ASSERT(msg == e.what());
}
}

int main ( int argc, char *argv[] )
{
testIssue254(true);
Expand Down Expand Up @@ -256,5 +277,11 @@ int main ( int argc, char *argv[] )
testIssue272(true);
testIssue272(false);

testIssue282(true);
testIssue282(false);

testIssue283(true);
testIssue283(false);

return 0;
}
}
Binary file added lib/Alembic/AbcCoreOgawa/Tests/issue282.abc
Binary file not shown.
Binary file added lib/Alembic/AbcCoreOgawa/Tests/issue283.abc
Binary file not shown.

0 comments on commit 0b61f78

Please sign in to comment.