1
0
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:
Daniel Evans 2016-04-14 23:33:49 +01:00
parent 3af1c37f5e
commit 66aed023b2
2 changed files with 0 additions and 43 deletions

View File

@ -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();
};

View File

@ -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()