13
0

Unbreak build. Sorry.

git-svn-id: svn://localhost/ardour2/branches/3.0@6837 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2010-04-02 15:45:01 +00:00
parent 9c5f36c328
commit 69f135517a
2 changed files with 23 additions and 10 deletions

View File

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

View File

@ -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;
};