summaryrefslogtreecommitdiff
path: root/libs/pbd/test
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-04-02 15:45:01 +0000
committerCarl Hetherington <carl@carlh.net>2010-04-02 15:45:01 +0000
commit69f135517a06ce5f3cccf87c08a5c6b9792b630d (patch)
tree09e4c7b7fe37f6e258800f15aef1c9a8cce753b8 /libs/pbd/test
parent9c5f36c328cc8f2d48f7e528e19e8a6e740cb85e (diff)
Unbreak build. Sorry.
git-svn-id: svn://localhost/ardour2/branches/3.0@6837 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/pbd/test')
-rw-r--r--libs/pbd/test/scalar_properties.cc27
-rw-r--r--libs/pbd/test/scalar_properties.h6
2 files changed, 23 insertions, 10 deletions
diff --git a/libs/pbd/test/scalar_properties.cc b/libs/pbd/test/scalar_properties.cc
index f85b1081a4..05d97a7ad1 100644
--- a/libs/pbd/test/scalar_properties.cc
+++ b/libs/pbd/test/scalar_properties.cc
@@ -2,19 +2,30 @@
using namespace PBD;
+namespace Properties {
+ PBD::PropertyDescriptor<int> fred;
+};
+
+ScalarPropertiesTest::ScalarPropertiesTest ()
+ : _fred (Properties::fred, 0)
+{
+
+}
+
+void
ScalarPropertiesTest::testBasic ()
{
- CPPUNIT_ASSERT (_property.changed() == false);
+ CPPUNIT_ASSERT (_fred.changed() == false);
- _property = 4;
- CPPUNIT_ASSERT (_property == 4);
- CPPUNIT_ASSERT (_property.changed() == true);
+ _fred = 4;
+ CPPUNIT_ASSERT (_fred == 4);
+ CPPUNIT_ASSERT (_fred.changed() == true);
- _property = 5;
- CPPUNIT_ASSERT (_property == 5);
- CPPUNIT_ASSERT (_property.changed() == true);
+ _fred = 5;
+ CPPUNIT_ASSERT (_fred == 5);
+ CPPUNIT_ASSERT (_fred.changed() == true);
PropertyList undo;
PropertyList redo;
- _property.diff (undo, redo);
+ _fred.diff (undo, redo);
}
diff --git a/libs/pbd/test/scalar_properties.h b/libs/pbd/test/scalar_properties.h
index a3719fbe13..04291e66e9 100644
--- a/libs/pbd/test/scalar_properties.h
+++ b/libs/pbd/test/scalar_properties.h
@@ -1,15 +1,17 @@
#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
#include "pbd/properties.h"
class ScalarPropertiesTest : public CppUnit::TestFixture
{
-public:
CPPUNIT_TEST_SUITE (ScalarPropertiesTest);
CPPUNIT_TEST (testBasic);
CPPUNIT_TEST_SUITE_END ();
+public:
+ ScalarPropertiesTest ();
void testBasic ();
private:
- PBD::Property<int> _property;
+ PBD::Property<int> _fred;
};