[3.0] Modify texture bind for OES_EGL_image_external
[platform/core/uifw/dali-core.git] / automated-tests / src / dali / utc-Dali-KeyEvent.cpp
index 10b7bce..a8b39a9 100644 (file)
@@ -1,23 +1,24 @@
-//
-// Copyright (c) 2014 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Flora License, Version 1.0 (the License);
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://floralicense.org/license/
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an AS IS BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
 
 #include <iostream>
 
 #include <stdlib.h>
-#include <dali/dali.h>
+#include <dali/public-api/dali-core.h>
 #include <dali/integration-api/events/key-event-integ.h>
 
 #include <dali-test-suite-utils.h>
@@ -63,7 +64,7 @@ struct SignalData
     receivedKeyEvent.keyPressedName.clear();
     receivedKeyEvent.keyPressed.clear();
 
-    keyedActor = NULL;
+    keyedActor.Reset();
   }
 
   bool functorCalled;
@@ -198,11 +199,11 @@ int UtcDaliKeyEventANDModifer(void)
   TestApplication application; // Reset all test adapter return codes
 
   KeyEvent event("i","i", 0, SHIFT_AND_CTRL_MODIFIER, 0, KeyEvent::Down);
-  DALI_TEST_EQUALS(true, event.IsCtrlModifier() & event.IsShiftModifier(), TEST_LOCATION);
+  DALI_TEST_EQUALS(true, (bool)(event.IsCtrlModifier() & event.IsShiftModifier()), TEST_LOCATION);
 
   event.keyModifier = SHIFT_MODIFIER;
 
-  DALI_TEST_EQUALS(false, event.IsCtrlModifier() & event.IsShiftModifier(), TEST_LOCATION);
+  DALI_TEST_EQUALS(false, (bool)(event.IsCtrlModifier() & event.IsShiftModifier()), TEST_LOCATION);
   END_TEST;
 }
 
@@ -212,11 +213,11 @@ int UtcDaliKeyEventORModifer(void)
   TestApplication application; // Reset all test adapter return codes
 
   KeyEvent event("i","i", 0, SHIFT_AND_CTRL_MODIFIER, 0, KeyEvent::Down);
-  DALI_TEST_EQUALS(true, event.IsCtrlModifier() | event.IsAltModifier(), TEST_LOCATION);
+  DALI_TEST_EQUALS(true, (bool)(event.IsCtrlModifier() | event.IsAltModifier()), TEST_LOCATION);
 
   event.keyModifier = SHIFT_MODIFIER;
 
-  DALI_TEST_EQUALS(false, event.IsCtrlModifier() & event.IsAltModifier(), TEST_LOCATION);
+  DALI_TEST_EQUALS(false, (bool)(event.IsCtrlModifier() & event.IsAltModifier()), TEST_LOCATION);
   END_TEST;
 }
 
@@ -226,11 +227,11 @@ int UtcDaliKeyEventState(void)
   TestApplication application; // Reset all test adapter return codes
 
   KeyEvent event("i","i", 0, SHIFT_AND_CTRL_MODIFIER, 0, KeyEvent::Down);
-  DALI_TEST_EQUALS(true, event.IsCtrlModifier() | event.IsAltModifier(), TEST_LOCATION);
+  DALI_TEST_EQUALS(true, (bool)(event.IsCtrlModifier() | event.IsAltModifier()), TEST_LOCATION);
 
   event.keyModifier = SHIFT_MODIFIER;
 
-  DALI_TEST_EQUALS(false, event.IsCtrlModifier() & event.IsAltModifier(), TEST_LOCATION);
+  DALI_TEST_EQUALS(false, (bool)(event.IsCtrlModifier() & event.IsAltModifier()), TEST_LOCATION);
   END_TEST;
 }
 
@@ -245,7 +246,7 @@ int UtcDaliIntegrationKeyEvent(void)
     DALI_TEST_CHECK( keyEvent.keyString == std::string() );
     DALI_TEST_EQUALS( keyEvent.keyCode, -1, TEST_LOCATION );
     DALI_TEST_EQUALS( keyEvent.keyModifier, 0, TEST_LOCATION );
-    DALI_TEST_EQUALS( keyEvent.time, 0u, TEST_LOCATION );
+    DALI_TEST_EQUALS( keyEvent.time, 0lu, TEST_LOCATION );
     DALI_TEST_EQUALS( keyEvent.state, Integration::KeyEvent::Down, TEST_LOCATION);
   }