diff options
author | David Robillard <d@drobilla.net> | 2007-10-22 03:46:46 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-10-22 03:46:46 +0000 |
commit | 282ad28ebe5217bec8039e6417bc518680f910e2 (patch) | |
tree | 90e8573758ebb197d3faa7ecc8391f5d446471e5 /tests | |
parent | 58ceeae7457f03b60fdc5a491b36abb2aa6d9e8a (diff) | |
download | raul-282ad28ebe5217bec8039e6417bc518680f910e2.tar.gz raul-282ad28ebe5217bec8039e6417bc518680f910e2.tar.bz2 raul-282ad28ebe5217bec8039e6417bc518680f910e2.zip |
Stricter limitations for path symbols/names (C symbols, equivalent to lv2:symbol, subset of OSC addresses and URIs).
git-svn-id: http://svn.drobilla.net/lad/raul@897 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'tests')
-rw-r--r-- | tests/path_test.cpp | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/tests/path_test.cpp b/tests/path_test.cpp index c5c4415..8f33dee 100644 --- a/tests/path_test.cpp +++ b/tests/path_test.cpp @@ -1,4 +1,5 @@ #include <iostream> +#include <list> #include <raul/Path.hpp> using namespace std; @@ -7,14 +8,28 @@ using namespace Raul; int main() { + list<string> names; + names.push_back("foo+1bar(baz)"); + names.push_back("ThisCRAR"); + names.push_back("NAME"); + names.push_back("thing with a bunch of spaces"); + names.push_back("thing-with-a-bunch-of-dashes"); + names.push_back("CamelCaseABC"); + names.push_back("Signal Level [dB]"); + names.push_back("Gain dB"); + names.push_back("Dry/Wet Balance"); + names.push_back("Phaser1 - Similar to CSound's phaser1 by Sean Costello"); + + cerr << "Nameification:" << endl; + for (list<string>::iterator i = names.begin(); i != names.end(); ++i) + cerr << *i << " -> " << Path::nameify(*i) << endl; + cerr << "1's are good..." << endl << endl; cerr << (Path("/").is_parent_of(Path("/foo"))) << endl; cerr << (Path("/foo").is_parent_of(Path("/foo/bar"))) << endl; cerr << !(Path("/foo").is_parent_of(Path("/foo2"))) << endl; - cerr << Path::nameify("Signal Level [dB]") << endl; - cerr << endl << endl << "Descendants..." << endl; cerr << "/ /foo " << Path::descendant_comparator("/", "/foo") << endl; cerr << "/foo /foo/bar " << Path::descendant_comparator("/foo", "/foo/bar") << endl; |