summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-01-20 13:07:29 +0100
committerDavid Robillard <d@drobilla.net>2018-01-21 00:31:38 +0100
commit5eb7a555de2291f4df8c75ce261c555552725beb (patch)
tree38e075a0841e64996e7abeba1a36286a6c002c5f /test
parent6a8f9d519bcce0f7b90d18af56458c4a6701a927 (diff)
downloadraul-5eb7a555de2291f4df8c75ce261c555552725beb.tar.gz
raul-5eb7a555de2291f4df8c75ce261c555552725beb.tar.bz2
raul-5eb7a555de2291f4df8c75ce261c555552725beb.zip
Remove URI class
Diffstat (limited to 'test')
-rw-r--r--test/build_test.cpp1
-rw-r--r--test/socket_test.cpp4
-rw-r--r--test/uri_test.cpp63
3 files changed, 2 insertions, 66 deletions
diff --git a/test/build_test.cpp b/test/build_test.cpp
index ea5bf2b..314862c 100644
--- a/test/build_test.cpp
+++ b/test/build_test.cpp
@@ -28,7 +28,6 @@
#include "raul/Symbol.hpp"
#include "raul/TimeSlice.hpp"
#include "raul/TimeStamp.hpp"
-#include "raul/URI.hpp"
int
main(int argc, char** argv)
diff --git a/test/socket_test.cpp b/test/socket_test.cpp
index d6a7b15..8dd4aff 100644
--- a/test/socket_test.cpp
+++ b/test/socket_test.cpp
@@ -27,8 +27,8 @@ using namespace Raul;
int
main(int argc, char** argv)
{
- Raul::URI unix_uri("unix:///tmp/raul_test_sock");
- Raul::URI tcp_uri("tcp://127.0.0.1:12345");
+ std::string unix_uri("unix:///tmp/raul_test_sock");
+ std::string tcp_uri("tcp://127.0.0.1:12345");
Raul::Socket unix_server_sock(Socket::Type::UNIX);
Raul::Socket tcp_server_sock(Socket::Type::TCP);
diff --git a/test/uri_test.cpp b/test/uri_test.cpp
deleted file mode 100644
index 5e1a648..0000000
--- a/test/uri_test.cpp
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- This file is part of Raul.
- Copyright 2007-2012 David Robillard <http://drobilla.net>
-
- Raul 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 any later version.
-
- Raul 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 Raul. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#undef NDEBUG
-
-#include <cassert>
-#include <iostream>
-
-#include "raul/URI.hpp"
-
-using namespace std;
-using namespace Raul;
-
-int
-main()
-{
-#define CHECK(cond) \
- do { if (!(cond)) { \
- cerr << "Test failed: " << (cond) << endl; \
- assert(0); \
- return 1; \
- } } while (0)
-
- CHECK(URI("http://example.org").scheme() == "http");
- CHECK(URI("svn+ssh://example.org/").scheme() == "svn+ssh");
- CHECK(URI("osc.udp://example.org/").scheme() == "osc.udp");
- CHECK(URI("weird-scheme://example.org/").scheme() == "weird-scheme");
-
- URI original(std::string("http://example.org"));
- URI copy(original);
- CHECK(original == copy);
-
- bool valid = true;
- try {
- URI uri("not/a/uri");
- } catch (const URI::BadURI&) {
- valid = false;
- }
- CHECK(!valid);
-
- valid = true;
- try {
- URI uri(std::string("/this/is/a/path"));
- } catch (const URI::BadURI&) {
- valid = false;
- }
- CHECK(!valid);
-
- return 0;
-}