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);
}
#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;
};