2010-04-02 11:35:36 -04:00
|
|
|
#include "scalar_properties.h"
|
|
|
|
|
|
|
|
using namespace PBD;
|
|
|
|
|
2010-04-02 11:45:01 -04:00
|
|
|
namespace Properties {
|
|
|
|
PBD::PropertyDescriptor<int> fred;
|
|
|
|
};
|
|
|
|
|
|
|
|
ScalarPropertiesTest::ScalarPropertiesTest ()
|
|
|
|
: _fred (Properties::fred, 0)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2010-04-02 11:35:36 -04:00
|
|
|
ScalarPropertiesTest::testBasic ()
|
|
|
|
{
|
2010-04-02 11:45:01 -04:00
|
|
|
CPPUNIT_ASSERT (_fred.changed() == false);
|
2010-04-02 11:35:36 -04:00
|
|
|
|
2010-04-02 11:45:01 -04:00
|
|
|
_fred = 4;
|
|
|
|
CPPUNIT_ASSERT (_fred == 4);
|
|
|
|
CPPUNIT_ASSERT (_fred.changed() == true);
|
2010-04-02 11:35:36 -04:00
|
|
|
|
2010-04-02 11:45:01 -04:00
|
|
|
_fred = 5;
|
|
|
|
CPPUNIT_ASSERT (_fred == 5);
|
|
|
|
CPPUNIT_ASSERT (_fred.changed() == true);
|
2010-04-02 11:35:36 -04:00
|
|
|
|
|
|
|
PropertyList undo;
|
|
|
|
PropertyList redo;
|
2010-04-02 11:45:01 -04:00
|
|
|
_fred.diff (undo, redo);
|
2010-04-02 11:35:36 -04:00
|
|
|
}
|