From 282ad28ebe5217bec8039e6417bc518680f910e2 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 22 Oct 2007 03:46:46 +0000 Subject: 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 --- tests/path_test.cpp | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'tests/path_test.cpp') 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 +#include #include using namespace std; @@ -7,14 +8,28 @@ using namespace Raul; int main() { + list 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::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; -- cgit v1.2.1