summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/stl_binary_reader_test.cc19
1 files changed, 17 insertions, 2 deletions
diff --git a/test/stl_binary_reader_test.cc b/test/stl_binary_reader_test.cc
index 57fbd1c..0d17858 100644
--- a/test/stl_binary_reader_test.cc
+++ b/test/stl_binary_reader_test.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2014 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2014-2020 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -27,7 +27,7 @@ using std::list;
using std::ifstream;
/* Test reading of a binary STL file */
-BOOST_AUTO_TEST_CASE (stl_binary_reader_test)
+BOOST_AUTO_TEST_CASE (stl_binary_reader_test1)
{
if (private_test.empty ()) {
return;
@@ -37,3 +37,18 @@ BOOST_AUTO_TEST_CASE (stl_binary_reader_test)
ifstream f (p.string().c_str ());
sub::STLBinaryReader r (f);
}
+
+/* Test reading the same file but with the FILE* interface */
+BOOST_AUTO_TEST_CASE (stl_binary_reader_test2)
+{
+ if (private_test.empty ()) {
+ return;
+ }
+
+ boost::filesystem::path p = private_test / "Vampire_Academy_24fps_Reel_6_DE_FR.stl";
+ FILE* f = fopen (p.string().c_str(), "rb");
+ BOOST_REQUIRE (f);
+ sub::STLBinaryReader r (f);
+ fclose (f);
+}
+