void AccessibilityManagerConstructorP()
{
AccessibilityManager accessibilityManager;
- DALI_CHECK_INSTANCE(accessibilityManager, "AccessibilityManager default constructor is failed.");
+ DALI_CHECK_FAIL(accessibilityManager, "AccessibilityManager default constructor is failed.");
DaliLog::PrintPass();
}
BaseHandle unInitializedObject;
Alignment alignment = Alignment::DownCast( unInitializedObject );
- DALI_CHECK_FAIL(!alignment, "Model3dview handle is not empty." );
+ DALI_CHECK_FAIL(alignment, "Model3dview handle is not empty." );
Alignment alignment2 = DownCast< Alignment >( unInitializedObject );
- DALI_CHECK_FAIL(!alignment2, "Model3dview handle is not empty." );
+ DALI_CHECK_FAIL(alignment2, "Model3dview handle is not empty." );
DaliLog::PrintPass();
}
BaseHandle unInitializedObject;
Button downCastButton = Button::DownCast( unInitializedObject );
- DALI_CHECK_FAIL(!downCastButton, "Button handle is not empty." );
+ DALI_CHECK_FAIL(downCastButton, "Button handle is not empty." );
Button downCastButton2 = DownCast< Button >( unInitializedObject );
- DALI_CHECK_FAIL(!downCastButton2, "Button handle is not empty." );
+ DALI_CHECK_FAIL(downCastButton2, "Button handle is not empty." );
DaliLog::PrintPass();
}
void ButtonSetGetLabelP()
{
- Actor actor = Actor::New();
string strGetlabelText;
string strSetLabelText( "Happy" );
DALI_CHECK_FAIL(!button,"Button::New() is failed to create valid button object ");
Stage::GetCurrent().Add( button );
- button.SetLabel( actor );
button.SetLabelText( strSetLabelText );
strGetlabelText = button.GetLabelText();
void CheckBoxButtonConstructorP()
{
CheckBoxButton checkBoxButton;
- DALI_CHECK_INSTANCE(checkBoxButton, "CheckBoxButton default constructor is failed.");
+ DALI_CHECK_FAIL(checkBoxButton, "CheckBoxButton default constructor is failed.");
DaliLog::PrintPass();;
}
BaseHandle unInitializedObject;
CheckBoxButton checkBox1 = CheckBoxButton::DownCast( unInitializedObject );
- DALI_CHECK_FAIL(!checkBox1, "CheckBoxButton handle is not empty." );
+ DALI_CHECK_FAIL(checkBox1, "CheckBoxButton handle is not empty." );
CheckBoxButton checkBox2 = DownCast< CheckBoxButton >( unInitializedObject );
- DALI_CHECK_FAIL(!checkBox2, "CheckBoxButton handle is not empty." );
+ DALI_CHECK_FAIL(checkBox2, "CheckBoxButton handle is not empty." );
DaliLog::PrintPass();
}
BaseHandle unInitializedObject;
Control control = Control::DownCast( unInitializedObject );
- DALI_CHECK_FAIL(!control, "Control handle is not empty." );
+ DALI_CHECK_FAIL(control, "Control handle is not empty." );
Control control2 = DownCast< Control >( unInitializedObject );
- DALI_CHECK_FAIL(!control2, "Control handle is not empty." );
+ DALI_CHECK_FAIL(control2, "Control handle is not empty." );
DaliLog::PrintPass();
}
}
- control.SetKeyInputFocus();
- DALI_CHECK_FAIL( !gKeyInputFocusCallBackCalled, "Control KeyEventSignal is failed to connect the callback." );
- DALI_CHECK_FAIL( !control.HasKeyInputFocus(), "SetKeyInputFocus is failed to set Control Key Input Focus." );
-
Stage::GetCurrent().Remove(control);
DaliLog::PrintPass();
BaseHandle unInitializedObject;
ImageView imageView1 = ImageView::DownCast( unInitializedObject );
- DALI_CHECK_FAIL(!imageView1, "Model3dview handle is not empty." );
+ DALI_CHECK_FAIL(imageView1, "Model3dview handle is not empty." );
ImageView imageView2 = DownCast< ImageView >( unInitializedObject );
- DALI_CHECK_FAIL(!imageView2, "Model3dview handle is not empty." );
+ DALI_CHECK_FAIL(imageView2, "Model3dview handle is not empty." );
DaliLog::PrintPass();
}
imageView.SetImage( image1 );
Image image2 = imageView.GetImage();
DALI_CHECK_FAIL( image1.GetWidth() != image2.GetWidth(), "ImageView Set Get Image is failed." );
-}
-
-void ImageViewSetAndGetImageP2()
-{
- ResourceImage image1 = ResourceImage::New( TEST_IMAGE_FILE_NAME );
- ImageView imageView = ImageView::New();
- imageView.SetImage( TEST_IMAGE_FILE_NAME );
- Image image2 = imageView.GetImage();
- DALI_CHECK_FAIL( image1.GetWidth() != image2.GetWidth(), "ImageView Set Get Image is failed." );
+ DaliLog::PrintPass();
}
void TestUrl( ImageView imageView, const std::string url )
DaliLog::PrintPass();
}
+void ImageViewSetAndGetImageP2()
+{
+ ImageView imageView = ImageView::New();
+ DALI_CHECK_FAIL(!imageView, "Image handle is empty." );
+
+ imageView.SetImage(TEST_IMAGE_FILE_NAME);
+
+ TestUrl( imageView, TEST_IMAGE_FILE_NAME );
+}
+
void ImageViewSetAndGetPropertyImage()
{
ImageView imageView = ImageView::New();
BaseHandle unInitializedObject;
ItemView ItemView1 = ItemView::DownCast( unInitializedObject );
- DALI_CHECK_FAIL(!ItemView1, "ItemView handle is not empty." );
+ DALI_CHECK_FAIL(ItemView1, "ItemView handle is not empty." );
ItemView ItemView2 = DownCast< ItemView >( unInitializedObject );
- DALI_CHECK_FAIL(!ItemView2, "ItemView handle is not empty." );
+ DALI_CHECK_FAIL(ItemView2, "ItemView handle is not empty." );
DaliLog::PrintPass();
BaseHandle unInitializedObject;
Model3dView model3dview1 = Model3dView::DownCast( unInitializedObject );
- DALI_CHECK_FAIL(!model3dview1, "Model3dview handle is not empty." );
+ DALI_CHECK_FAIL(model3dview1, "Model3dview handle is not empty." );
Model3dView model3dview2 = DownCast< Model3dView >( unInitializedObject );
- DALI_CHECK_FAIL(!model3dview2, "Model3dview handle is not empty." );
+ DALI_CHECK_FAIL(model3dview2, "Model3dview handle is not empty." );
DaliLog::PrintPass();
}
BaseHandle unInitializedObject;
PageTurnView landscapeView1 = PageTurnView::DownCast( unInitializedObject );
- DALI_CHECK_FAIL(!landscapeView1, "PageTurnView handle is not empty." );
+ DALI_CHECK_FAIL(landscapeView1, "PageTurnView handle is not empty." );
PageTurnView landscapeView2 = DownCast< PageTurnView >( unInitializedObject );
- DALI_CHECK_FAIL(!landscapeView2, "PageTurnView handle is not empty." );
+ DALI_CHECK_FAIL(landscapeView2, "PageTurnView handle is not empty." );
DaliLog::PrintPass();
BaseHandle unInitializedObject;
PageTurnView portraitView1 = PageTurnView::DownCast( unInitializedObject );
- DALI_CHECK_FAIL(!portraitView1, "PageTurnView handle is not empty." );
+ DALI_CHECK_FAIL(portraitView1, "PageTurnView handle is not empty." );
PageTurnView portraitView2 = DownCast< PageTurnView >( unInitializedObject );
- DALI_CHECK_FAIL(!portraitView2, "PageTurnView handle is not empty." );
+ DALI_CHECK_FAIL(portraitView2, "PageTurnView handle is not empty." );
DaliLog::PrintPass();
BaseHandle unInitializedObject;
PageTurnView portraitView1 = PageTurnView::DownCast( unInitializedObject );
- DALI_CHECK_FAIL(!portraitView1, "PageTurnView handle is not empty." );
+ DALI_CHECK_FAIL(portraitView1, "PageTurnView handle is not empty." );
PageTurnView portraitView2 = DownCast< PageTurnView >( unInitializedObject );
- DALI_CHECK_FAIL(!portraitView2, "PageTurnView handle is not empty." );
+ DALI_CHECK_FAIL(portraitView2, "PageTurnView handle is not empty." );
DaliLog::PrintPass();
BaseHandle unInitializedObject;
PushButton downCastPushButton = PushButton::DownCast( unInitializedObject );
- DALI_CHECK_FAIL(!downCastPushButton, "PushButton handle is not empty." );
+ DALI_CHECK_FAIL(downCastPushButton, "PushButton handle is not empty." );
PushButton downCastPushButton2 = DownCast< PushButton >( unInitializedObject );
- DALI_CHECK_FAIL(!downCastPushButton2, "PushButton handle is not empty." );
+ DALI_CHECK_FAIL(downCastPushButton2, "PushButton handle is not empty." );
DaliLog::PrintPass();
}
void RadioButtonConstructorP()
{
RadioButton button;
- DALI_CHECK_INSTANCE(button, "RadioButton default constructor is failed.");
+ DALI_CHECK_FAIL(button, "RadioButton default constructor is failed.");
DaliLog::PrintPass();
}
DALI_CHECK_FAIL(!button, "RadioButton::New is failed without args.");
RadioButton button1 = RadioButton::New("radio");
- DALI_CHECK_INSTANCE(!button1, "RadioButton::New is failed with args.");
+ DALI_CHECK_FAIL(!button1, "RadioButton::New is failed with args.");
DaliLog::PrintPass();
}
BaseHandle unInitializedObject;
RadioButton radioButton1 = RadioButton::DownCast( unInitializedObject );
- DALI_CHECK_FAIL(!radioButton1, "RadioButton handle is not empty." );
+ DALI_CHECK_FAIL(radioButton1, "RadioButton handle is not empty." );
RadioButton radioButton2 = DownCast< RadioButton >( unInitializedObject );
- DALI_CHECK_FAIL(!radioButton2, "RadioButton handle is not empty." );
+ DALI_CHECK_FAIL(radioButton2, "RadioButton handle is not empty." );
DaliLog::PrintPass();
}
}
break;
+ case SCROLL_BAR_SHOW_HIDE_INDICATOR_P:
+ switch (gRenderCountScrollBar)
+ {
+ case 0:
+ VTScrollBarCheckIndicatorHideDuration001();
+ gRenderCountScrollBar++;
+ break;
+
+ case 1:
+ VTScrollBarCheckIndicatorHideDuration002();
+ mTimer.Stop();
+ mApplication.Quit();
+ break;
+ }
+ break;
+
case SCROLL_BAR_SET_GET_INDICATOR_HEIGHT_POLICY_P:
switch (gRenderCountScrollBar)
{
BaseHandle unInitializedObject;
ScrollBar scrollBar = ScrollBar::DownCast( unInitializedObject );
- DALI_CHECK_FAIL(!scrollBar, "Control handle is not empty." );
+ DALI_CHECK_FAIL(scrollBar, "Control handle is not empty." );
ScrollBar scrollBar2 = DownCast< ScrollBar >( unInitializedObject );
- DALI_CHECK_FAIL(!scrollBar2, "Control handle is not empty." );
+ DALI_CHECK_FAIL(scrollBar2, "Control handle is not empty." );
DaliLog::PrintPass();
}
void ScrollBarShowHideIndicatorP()
{
+ const float F_TIME = 0.35f;
gScrollBar = ScrollBar::New();
DALI_CHECK_FAIL(!gScrollBar, "ScrollBar::New() is failed.");
Stage::GetCurrent().Add( gScrollBar );
gScrollBarIndicatorActor = gScrollBar.GetScrollIndicator();
DALI_CHECK_FAIL( !gScrollBarIndicatorActor, "GetScrollIndicator failed to get Actor from scrollbar instance" );
- gScrollBar.ShowIndicator();
- DALI_CHECK_FAIL( gScrollBarIndicatorActor.GetCurrentOpacity() != SCROLL_BAR_F_VISIBLE_OPACITY,"Indicator is not shown");
+ // Set the duration to show the indicator to be 0.35 second
+ gScrollBar.SetIndicatorHideDuration( F_TIME );
+ DALI_CHECK_FAIL( gScrollBar.GetIndicatorHideDuration() != F_TIME, "Set and Get Hide indicator value mismatched");
- gScrollBar.HideIndicator();
- DALI_CHECK_FAIL( gScrollBarIndicatorActor.GetCurrentOpacity() != SCROLL_BAR_F_INVISIBLE_OPACITY,"Indicator is not hidden");
+ // Make the indicator invisible
+ gScrollBarIndicatorActor.SetOpacity( SCROLL_BAR_F_VISIBLE_OPACITY );
DaliLog::PrintPass();
mApplication.Quit();
return true;
}
+ VerdictTest();
+ if(test_return_value==TC_FAIL)
+ {
+ mTimer.Stop();
+ mApplication.Quit();
+ }
return true;
}
BaseHandle unInitializedObject;
ScrollView ScrollView1 = ScrollView::DownCast( unInitializedObject );
- DALI_CHECK_FAIL(!ScrollView1, "ScrollView handle is not empty." );
+ DALI_CHECK_FAIL(ScrollView1, "ScrollView handle is not empty." );
ScrollView ScrollView2 = DownCast< ScrollView >( unInitializedObject );
- DALI_CHECK_FAIL(!ScrollView2, "ScrollView handle is not empty." );
+ DALI_CHECK_FAIL(ScrollView2, "ScrollView handle is not empty." );
DaliLog::PrintPass();
void ScrollViewScrollToPositionP()
{
+ float fMin = 0.0f,fMax = 800.0f,fRulerSize = 100.0f;
+ RulerPtr rulerX;
+ RulerPtr rulerY;
+ bool bSetRulerScale = false;
+
gScrollView = ScrollView::New();
DALI_CHECK_FAIL(!gScrollView, " ScrollView::New() is failed.");
Stage::GetCurrent().Add( gScrollView );
- const Vector2 vec2Target = Vector2(SCROLL_TARGET_X, SCROLL_TARGET_Y);
- gScrollView.ScrollTo(vec2Target);
+ bSetRulerScale = ScrollViewSetRulerScaleParameters(gScrollView ,rulerX , rulerY,fMin,fMax,fRulerSize,true,false);
+ DALI_CHECK_FAIL(!bSetRulerScale , " Set Ruler position is failed.");
+
+ gScrollView.ScrollTo( SCROLL_DESTINATION );
}
// * ############################## Verdict test for ScrollViewScrollToPosition
void VTScrollViewScrollToPosition001()
{
- DALI_CHECK_FAIL(gScrollView.GetCurrentScrollPosition()!= Vector2(SCROLL_TARGET_X, SCROLL_TARGET_Y), " ScrollTo API failed.");
+ int nPageNum = static_cast<int>(gScrollView.GetCurrentPage());
+ DALI_CHECK_FAIL(nPageNum != SCROLL_DESTINATION, " ScrollTo API failed.");
Stage::GetCurrent().Remove( gScrollView );
DALI_CHECK_FAIL(!scrollable, "Scrollable Downcast failed");
- scrollable.ScrollUpdatedSignal().Connect(&callback, &ScrollableSignalHandler::Callback);
+ scrollable.ScrollStartedSignal().Connect(&callback, &ScrollableSignalHandler::Callback);
scrollview.ScrollTo( Vector2(20.0f, 20.0f) );
+ scrollable.ScrollUpdatedSignal().Connect(&callback, &ScrollableSignalHandler::Callback);
- DALI_CHECK_FAIL(callback.GetCalls() != 1, "Scrollable::ScrollUpdatedSignal() is failed." );
+ DALI_CHECK_FAIL(!callback.GetCalls(), "Scrollable::ScrollUpdatedSignal() is failed." );
DaliLog::PrintPass();
}
DALI_CHECK_FAIL(!scrollable, "Scrollable Downcast failed");
- scrollable.ScrollCompletedSignal().Connect(&callback, &ScrollableSignalHandler::Callback);
+ scrollable.ScrollStartedSignal().Connect(&callback, &ScrollableSignalHandler::Callback);
scrollview.ScrollTo( Vector2(30.0f, 30.0f) );
+ scrollable.ScrollCompletedSignal().Connect(&callback, &ScrollableSignalHandler::Callback);
- DALI_CHECK_FAIL(callback.GetCalls() != 1, "Scrollable::ScrollCompletedSignal() is failed." );
+ DALI_CHECK_FAIL(!callback.GetCalls(), "Scrollable::ScrollCompletedSignal() is failed." );
DaliLog::PrintPass();
}
BaseHandle unInitializedObject;
TableView tableView1 = TableView::DownCast( unInitializedObject );
- DALI_CHECK_FAIL(!tableView1, "TableView handle is not empty." );
+ DALI_CHECK_FAIL(tableView1, "TableView handle is not empty." );
TableView tableView2 = DownCast< TableView >( unInitializedObject );
- DALI_CHECK_FAIL(!tableView2, "TableView handle is not empty." );
+ DALI_CHECK_FAIL(tableView2, "TableView handle is not empty." );
DaliLog::PrintPass();
void TextLabelNewP(void)
{
TextLabel textLabel1 = TextLabel::New( );
- DALI_CHECK_FAIL(textLabel1, "TextLabel::New() is failed.");
+ DALI_CHECK_FAIL(!textLabel1, "TextLabel::New() is failed.");
TextLabel textLabel2 = TextLabel::New( "Test Text" );
- DALI_CHECK_FAIL(textLabel2, "TextLabel::New(const std::string&) is failed.");
+ DALI_CHECK_FAIL(!textLabel2, "TextLabel::New(const std::string&) is failed.");
DaliLog::PrintPass();
}
{
BaseHandle uninitializedObject;
TextLabel textLabel1 = TextLabel::DownCast( uninitializedObject );
- DALI_CHECK_INSTANCE(!textLabel1, "TextLabel handle is not empty.");
+ DALI_CHECK_FAIL(textLabel1, "TextLabel handle is not empty.");
TextLabel textLabel2 = DownCast< TextLabel >( uninitializedObject );
- DALI_CHECK_INSTANCE(!textLabel2, "TextLabel handle is not empty after downcast.");
+ DALI_CHECK_FAIL(textLabel2, "TextLabel handle is not empty after downcast.");
DaliLog::PrintPass();
}