mirror of
https://github.com/rwengine/openrw.git
synced 2024-11-07 19:32:49 +01:00
d1e7dcdcd1
- Replace background model loader with generic background loader - Replace ModelHandle object with generic resource handle
23 lines
465 B
C++
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() |