1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-11-07 19:32:49 +01:00
openrw/rwengine/tests/test_Loader.cpp
Daniel Evans d1e7dcdcd1 Overhaul Loader framework for Models
- Replace background model loader with generic background loader
- Replace ModelHandle object with generic resource handle
2015-04-03 03:04:50 +01:00

23 lines
465 B
C++

#include <boost/test/unit_test.hpp>
#include <data/Loader.hpp>
#include <test_globals.hpp>
class IntLoader : public Loader<int>
{
int data;
public:
IntLoader( int value ) : data( value ) { }
ResultType get() { return data; }
};
BOOST_AUTO_TEST_SUITE(LoaderTests)
BOOST_AUTO_TEST_CASE(test_product)
{
BOOST_CHECK( typeid(IntLoader::ResultType) == typeid(int) );
IntLoader loader( 42 );
BOOST_CHECK_EQUAL( loader.get(), 42 );
}
BOOST_AUTO_TEST_SUITE_END()