X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit%2Futc-Dali-ScrollView.cpp;h=39af3d3ac91db0b4bfd6712b5b4b7f46f1773400;hp=662502ce49dca3b66aa9fa5653a861d603853956;hb=402784aceba9171e57ffca8769ca46ef8aebcd2f;hpb=389593ad328d5a86972e32148a0ba45bad687b41 diff --git a/automated-tests/src/dali-toolkit/utc-Dali-ScrollView.cpp b/automated-tests/src/dali-toolkit/utc-Dali-ScrollView.cpp index 662502c..39af3d3 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-ScrollView.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-ScrollView.cpp @@ -207,25 +207,13 @@ struct TestSumConstraint /** * @param[in] current The current base value - * @param[in] property The property to be added to current. + * @param[in] inputs Contains the property to be added to current. * @return The new current Vector. */ - Vector3 operator()(const Vector3& current) + void operator()( Vector3& current, const PropertyInputContainer& inputs ) { - gConstraintResult = current + mOffset; - return gConstraintResult; - } - - /** - * @param[in] current The current base value - * @param[in] property The property to be added to current. - * @return The new current Vector. - */ - Vector3 operator()(const Vector3& current, - const PropertyInput& property) - { - gConstraintResult = current + property.GetVector3() + mOffset; - return gConstraintResult; + gConstraintResult = current + inputs[0]->GetVector3() + mOffset; + current = gConstraintResult; } Vector3 mOffset; @@ -814,9 +802,8 @@ int UtcDaliScrollViewConstraints(void) a.SetPosition( TEST_ACTOR_POSITION ); Wait(application); - Constraint constraint = Constraint::New( Actor::Property::POSITION, - Source(scrollView, ScrollView::Property::SCROLL_POSITION), - TestSumConstraint( TEST_CONSTRAINT_OFFSET ) ); + Constraint constraint = Constraint::New( scrollView, Actor::Property::POSITION, TestSumConstraint( TEST_CONSTRAINT_OFFSET ) ); + constraint.AddSource( Source(scrollView, ScrollView::Property::SCROLL_POSITION) ); constraint.SetRemoveAction(Constraint::Discard); scrollView.ApplyConstraintToChildren(constraint); Wait(application); @@ -862,10 +849,8 @@ int UtcDaliScrollViewBind(void) Wait(application); // apply this constraint to scrollview - Constraint constraint = Constraint::New( Actor::Property::POSITION, - Source(scrollView, ScrollView::Property::SCROLL_POSITION), - TestSumConstraint( TEST_CONSTRAINT_OFFSET ) ); - + Constraint constraint = Constraint::New( scrollView, Actor::Property::POSITION, TestSumConstraint( TEST_CONSTRAINT_OFFSET ) ); + constraint.AddSource( Source(scrollView, ScrollView::Property::SCROLL_POSITION) ); constraint.SetRemoveAction(Constraint::Discard); scrollView.ApplyConstraintToChildren(constraint);