mirror of
https://github.com/rwengine/openrw.git
synced 2024-11-07 11:22:45 +01:00
Remove Loader.hpp since it wasn't used for anything
This commit is contained in:
parent
3af1c37f5e
commit
66aed023b2
@ -1,20 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <WorkContext.hpp>
|
||||
|
||||
/**
|
||||
* Generic base class for loader implementations
|
||||
*/
|
||||
template<class T> class Loader
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* Type of the resource produced by the loader
|
||||
*/
|
||||
typedef T ResultType;
|
||||
|
||||
/**
|
||||
* Method that should be used to export the loaded data
|
||||
*/
|
||||
ResultType get();
|
||||
};
|
@ -1,23 +0,0 @@
|
||||
#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()
|
Loading…
Reference in New Issue
Block a user