]> git.donarmstrong.com Git - lilypond.git/commitdiff
add flower/test-string.cc release/2.11.35-1
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 20 Nov 2007 01:12:52 +0000 (23:12 -0200)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 20 Nov 2007 01:12:52 +0000 (23:12 -0200)
flower/test-string.cc [new file with mode: 0644]

diff --git a/flower/test-string.cc b/flower/test-string.cc
new file mode 100644 (file)
index 0000000..509aea0
--- /dev/null
@@ -0,0 +1,24 @@
+#define STD_VECTOR 1
+
+#define HAVE_BOOST_LAMBDA 1
+#include "std-vector.hh"
+
+#include <iostream>
+
+#include "yaffut.hh"
+
+#if !STD_VECTOR
+#define vector flower_vector
+#endif
+
+using namespace std;
+
+
+FUNC (string_split_join)
+{
+  string orig = "a/bbbb/cc//d";
+  vector<string> splits = string_split (orig, '/');
+  string loop = string_join (splits, "/");
+  EQUAL(orig, loop);
+  EQUAL(splits.size (), size_t (5));
+}