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

Added SetSkinFlag test.

parent e7b118df
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,8 @@ include_directories(${Boost_INCLUDE_DIRS})
foreach(TEST
write_test
skinpart_test)
skinpart_test
ninode_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
// evil hack to allow testing of private and protected data
#define private public
#define protected public
#include "niflib.h"
#include "obj/NiNode.h"
using namespace Niflib;
using namespace std;
BOOST_AUTO_TEST_SUITE(ninode_test_suite)
// this test only compiles against a static niflib build
/*
BOOST_AUTO_TEST_CASE(ninode_setskinflag_test)
{
NiNodeRef node = new NiNode;
node->SetSkinFlag(false);
BOOST_CHECK_EQUAL(node->flags, 8);
node->SetSkinFlag(false);
BOOST_CHECK_EQUAL(node->flags, 8);
node->SetSkinFlag(true);
BOOST_CHECK_EQUAL(node->flags, 0);
node->SetSkinFlag(true);
BOOST_CHECK_EQUAL(node->flags, 0);
}
*/
// mock test to stop boost from complaining
BOOST_AUTO_TEST_CASE(ninode_test)
{
}
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