Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
Niflib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Grant Kim
Niflib
Commits
a364fcb2
Commit
a364fcb2
authored
12 years ago
by
Amorilia
Browse files
Options
Downloads
Patches
Plain Diff
Added BSLightingShaderProperty compile test for issue reported by skyfox.
parent
d84a61c9
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
test/CMakeLists.txt
+3
-1
3 additions, 1 deletion
test/CMakeLists.txt
test/bslightingshaderproperty_test.cpp
+30
-0
30 additions, 0 deletions
test/bslightingshaderproperty_test.cpp
with
33 additions
and
1 deletion
test/CMakeLists.txt
+
3
−
1
View file @
a364fcb2
...
...
@@ -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
}
)
...
...
This diff is collapsed.
Click to expand it.
test/bslightingshaderproperty_test.cpp
0 → 100644
+
30
−
0
View file @
a364fcb2
#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
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment