summaryrefslogtreecommitdiff
path: root/test/core/ResourceLocatorTest.cpp
diff options
context:
space:
mode:
authorBenjamin Paassen <bpaassen@techfak.uni-bielefeld.de>2014-12-09 18:34:59 +0100
committerBenjamin Paassen <bpaassen@techfak.uni-bielefeld.de>2014-12-09 18:34:59 +0100
commit3ca274c015bc99aaa40f6337d493ea172309f294 (patch)
tree5fd9396cd882bd61ab746df9815cc5a5514df0c3 /test/core/ResourceLocatorTest.cpp
parent98c4f90d3e34bd4d536ee6c84b4d79b71cde3998 (diff)
First draft of ResourceLocator. The stream method is not working yet. Thus I did comment out the compiler commands for the new classes.
Diffstat (limited to 'test/core/ResourceLocatorTest.cpp')
-rw-r--r--test/core/ResourceLocatorTest.cpp48
1 files changed, 48 insertions, 0 deletions
diff --git a/test/core/ResourceLocatorTest.cpp b/test/core/ResourceLocatorTest.cpp
new file mode 100644
index 0000000..2e663f5
--- /dev/null
+++ b/test/core/ResourceLocatorTest.cpp
@@ -0,0 +1,48 @@
+/*
+ Ousía
+ Copyright (C) 2014, 2015 Benjamin Paaßen, Andreas Stöckel
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <gtest/gtest.h>
+
+#include <core/ResourceLocator.hpp>
+
+#include <sstream>
+
+namespace ousia {
+
+//TODO: This does not work yet!
+
+class TestResourceLocator : public ResourceLocator {
+ ResourceLocation locate(const std::string &path,
+ const std::string &relativeTo,
+ const ResourceType type) const override
+ {
+ // trivial test implementation.
+ return ResourceLocation(true, *this, type, path);
+ }
+
+ std::istream stream(const std::string &location, std::istream& input) const override {
+ //trivial test implementation.
+ input << "test";
+ }
+
+};
+
+TEST(ResourceLocator, locate)
+{
+}
+}