Skip to content

Commit

Permalink
Merge pull request #23 from acrlakshman/test_updates
Browse files Browse the repository at this point in the history
Updated tests
  • Loading branch information
9prady9 committed Jul 6, 2015
2 parents 876a1c9 + d50f5b7 commit 9045b6c
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions test/stl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,21 @@ TEST(STL, READ_ASCII)
objs.clear();
}

TEST(STL, WRITE_ASCII)
TEST(STL, WRITE_BINARY)
{
/* Reference STLData object */
vector< STLData<float> > referenceObjs;
initializeReferenceSTLObj(referenceObjs);

vector< STLData<float> > objs;
stl::read<float>(objs, TEST_DIR "/cube_ascii.stl");
stl::write(TEST_DIR "/cube_ascii2ascii.stl", meshio::STL_ASCII, objs);
stl::write(TEST_DIR "/cube_ascii2binary.stl", meshio::STL_BINARY, objs);

objs.clear();
}

TEST(STL, WRITE_ASCII)
{
vector< STLData<float> > objs;
stl::read<float>(objs, TEST_DIR "/cube_binary.stl");
stl::write(TEST_DIR "/cube_binary2ascii.stl", meshio::STL_ASCII, objs);

referenceObjs.clear();
objs.clear();
}

Expand All @@ -69,4 +73,4 @@ TEST(STL, CROSS_CHECK)
stl::read<float>(asciiReadObjs, TEST_DIR "/cube_ascii.stl");

EXPECT_TRUE(binReadObjs[0] == asciiReadObjs[0]);
}
}

0 comments on commit 9045b6c

Please sign in to comment.