Skip to content
Snippets Groups Projects
Commit a364fcb2 authored by Amorilia's avatar Amorilia
Browse files

Added BSLightingShaderProperty compile test for issue reported by skyfox.

parent d84a61c9
No related branches found
No related tags found
No related merge requests found
......@@ -12,7 +12,9 @@ foreach(TEST
skin_test
missing_link_stack_test
trishape_test
numuvsets_test)
numuvsets_test
bslightingshaderproperty_test
)
add_executable(${TEST} ${TEST}.cpp)
target_link_libraries(${TEST} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} niflib)
add_test(niflib::${TEST} ${TEST})
......
#define BOOST_TEST_DYN_LINK
#define BOOST_TEST_MAIN
#include <boost/test/unit_test.hpp>
#include <sstream> // stringstream
#include "niflib.h"
#include "obj/NiTriShape.h"
#include "obj/BSLightingShaderProperty.h"
using namespace Niflib;
using namespace std;
BOOST_AUTO_TEST_SUITE(write_test_suite)
BOOST_AUTO_TEST_CASE(write_incomplete_tree_test)
{
stringstream ss;
// create a simple nif tree with BSLightingShaderProperty
NiTriShapeRef shape = new NiTriShape;
BSLightingShaderPropertyRef prop = new BSLightingShaderProperty;
shape->setBSProperty(0, prop);
BOOST_CHECK_NO_THROW(WriteNifTree(ss, shape));
ss.seekg(0);
NiObjectRef root;
BOOST_CHECK_NO_THROW(root = ReadNifTree(ss));
}
BOOST_AUTO_TEST_SUITE_END()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment