diff options
author | Carl Hetherington <carl@carlh.net> | 2012-06-16 17:20:10 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2012-06-16 17:20:10 +0000 |
commit | 5ac22e9095d5f851b5238029e3f813bc86fe2280 (patch) | |
tree | 51460c63aa9ace692dedceb01494f2a92d4bc364 /libs/ardour/test/test_util.cc | |
parent | 9429401f11ffa0ee1729dbdc5e14e87cf06e2dc1 (diff) |
Add new SharedStatefulProperty which manages a shared_ptr to
some Stateful object, and a subclass to use this for
AutomationList. SharedStatefulProperty will manage undo / redo
using full copies of the XML state, like MementoCommand,
but does it within the Property undo system.
git-svn-id: svn://localhost/ardour2/branches/3.0@12740 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/test/test_util.cc')
-rw-r--r-- | libs/ardour/test/test_util.cc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/libs/ardour/test/test_util.cc b/libs/ardour/test/test_util.cc new file mode 100644 index 0000000000..f1237f72df --- /dev/null +++ b/libs/ardour/test/test_util.cc @@ -0,0 +1,20 @@ +#include <fstream> +#include <sstream> +#include "pbd/xml++.h" +#include <cppunit/extensions/HelperMacros.h> + +using namespace std; + +void +check_xml (XMLNode* node, string ref_file) +{ + system ("rm -f libs/ardour/test/test.xml"); + ofstream f ("libs/ardour/test/test.xml"); + node->dump (f); + f.close (); + + stringstream cmd; + cmd << "diff -u libs/ardour/test/test.xml " << ref_file; + CPPUNIT_ASSERT_EQUAL (0, system (cmd.str().c_str ())); +} + |