BufferImage Usage Removal
[platform/core/uifw/dali-adaptor.git] / automated-tests / src / dali-adaptor-internal / utc-Dali-CommandLineOptions.cpp
index d0e6339..f9a9404 100644 (file)
@@ -20,7 +20,7 @@
 #include <stdlib.h>
 #include <getopt.h>
 #include <dali/dali.h>
-#include <command-line-options.h>
+#include <dali/internal/system/common/command-line-options.h>
 #include <dali-test-suite-utils.h>
 
 using namespace Dali;
@@ -31,7 +31,7 @@ using namespace Dali::Internal::Adaptor;
 void command_line_options_startup(void)
 {
   test_return_value = TET_UNDEF;
-  optind = 1; // Reset opt for test
+  optind = 0; // Reset opt for test
 }
 
 // Called only once after last test is run
@@ -40,15 +40,9 @@ void command_line_options_cleanup(void)
   test_return_value = TET_PASS;
 }
 
-namespace
-{
-int gOriginalOptIndValue(0);
-}
-
-
 int UtcDaliCommandLineOptionsNoArgs(void)
 {
-  optind=1;
+  optind=0;
 
   int argc( 1 );
   const char* argList[1] = { "program" };
@@ -59,7 +53,6 @@ int UtcDaliCommandLineOptionsNoArgs(void)
   DALI_TEST_EQUALS( argc, 1, TEST_LOCATION );
 
   // Check values
-  DALI_TEST_EQUALS( options.noVSyncOnRender, 0, TEST_LOCATION );
   DALI_TEST_EQUALS( options.stageWidth, 0, TEST_LOCATION );
   DALI_TEST_EQUALS( options.stageHeight, 0, TEST_LOCATION );
   DALI_TEST_EQUALS( options.stageDPI, "", TEST_LOCATION );
@@ -69,7 +62,7 @@ int UtcDaliCommandLineOptionsNoArgs(void)
 
 int UtcDaliCommandLineOptionsDaliShortArgs(void)
 {
-  optind=1;
+  optind=0;
 
   const char* argList[] =
   {
@@ -87,7 +80,6 @@ int UtcDaliCommandLineOptionsDaliShortArgs(void)
   DALI_TEST_EQUALS( argc, 1, TEST_LOCATION );
 
   // Check values
-  DALI_TEST_EQUALS( options.noVSyncOnRender, 0, TEST_LOCATION );
   DALI_TEST_EQUALS( options.stageWidth, 800, TEST_LOCATION );
   DALI_TEST_EQUALS( options.stageHeight, 1000, TEST_LOCATION );
   DALI_TEST_EQUALS( options.stageDPI, "4x5", TEST_LOCATION );
@@ -97,7 +89,7 @@ int UtcDaliCommandLineOptionsDaliShortArgs(void)
 
 int UtcDaliCommandLineOptionsDaliLongArgsEqualsSign(void)
 {
-  optind=1;
+  optind=0;
 
   const char* argList[] =
   {
@@ -105,7 +97,6 @@ int UtcDaliCommandLineOptionsDaliLongArgsEqualsSign(void)
       "--width=800",
       "--height=1000",
       "--dpi=3x4",
-      "--no-vsync",
       "--help"
   };
   int argc( sizeof( argList ) / sizeof( argList[0] ) );
@@ -117,7 +108,6 @@ int UtcDaliCommandLineOptionsDaliLongArgsEqualsSign(void)
   DALI_TEST_EQUALS( argc, 1, TEST_LOCATION );
 
   // Check values
-  DALI_TEST_EQUALS( options.noVSyncOnRender, 1, TEST_LOCATION );
   DALI_TEST_EQUALS( options.stageWidth, 800, TEST_LOCATION );
   DALI_TEST_EQUALS( options.stageHeight, 1000, TEST_LOCATION );
   DALI_TEST_EQUALS( options.stageDPI, "3x4", TEST_LOCATION );
@@ -127,7 +117,7 @@ int UtcDaliCommandLineOptionsDaliLongArgsEqualsSign(void)
 
 int UtcDaliCommandLineOptionsDaliLongArgsSpaces(void)
 {
-  optind=1;
+  optind=0;
 
   const char* argList[] =
   {
@@ -135,7 +125,6 @@ int UtcDaliCommandLineOptionsDaliLongArgsSpaces(void)
       "--width", "800",
       "--height", "1000",
       "--dpi", "3x4",
-      "--no-vsync",
       "--help"
   };
   int argc( sizeof( argList ) / sizeof( argList[0] ) );
@@ -147,7 +136,6 @@ int UtcDaliCommandLineOptionsDaliLongArgsSpaces(void)
   DALI_TEST_EQUALS( argc, 1, TEST_LOCATION );
 
   // Check values
-  DALI_TEST_EQUALS( options.noVSyncOnRender, 1, TEST_LOCATION );
   DALI_TEST_EQUALS( options.stageWidth, 800, TEST_LOCATION );
   DALI_TEST_EQUALS( options.stageHeight, 1000, TEST_LOCATION );
   DALI_TEST_EQUALS( options.stageDPI, "3x4", TEST_LOCATION );
@@ -157,7 +145,7 @@ int UtcDaliCommandLineOptionsDaliLongArgsSpaces(void)
 
 int UtcDaliCommandLineOptionsNonDaliArgs(void)
 {
-  optind=1;
+  optind=0;
 
   const char* argList[] =
   {
@@ -184,9 +172,9 @@ int UtcDaliCommandLineOptionsNonDaliArgs(void)
 
 int UtcDaliCommandLineOptionsMixture(void)
 {
-  optind = 1; // Reset opt for test
+  optind = 0; // Reset opt for test
 
-  char* argList[] =
+  const char* argList[] =
   {
     "program",
     "--width=800",
@@ -196,7 +184,7 @@ int UtcDaliCommandLineOptionsMixture(void)
     "-r",
   };
   int argc( sizeof( argList ) / sizeof( argList[0] ) );
-  char** argv = argList;
+  char** argv = const_cast<char**>( argList );
 
   CommandLineOptions options( &argc, &argv );
 
@@ -215,9 +203,9 @@ int UtcDaliCommandLineOptionsMixture(void)
 
 int UtcDaliCommandLineOptionsMixtureDaliOpsAtStart(void)
 {
-  optind=1;
+  optind=0;
 
-  char* argList[] =
+  const char* argList[] =
   {
       "program",
       "--width=800",
@@ -227,7 +215,7 @@ int UtcDaliCommandLineOptionsMixtureDaliOpsAtStart(void)
       "-y", "600",
   };
   int argc( sizeof( argList ) / sizeof( argList[0] ) );
-  char** argv = argList;
+  char** argv = const_cast<char**>( argList );
 
   CommandLineOptions options( &argc, &argv );
 
@@ -246,9 +234,9 @@ int UtcDaliCommandLineOptionsMixtureDaliOpsAtStart(void)
 
 int UtcDaliCommandLineOptionsMixtureDaliOpsAtEnd(void)
 {
-  optind=1;
+  optind=0;
 
-  char* argList[] =
+  const char* argList[] =
   {
       "program",
       "hello-world",
@@ -258,7 +246,7 @@ int UtcDaliCommandLineOptionsMixtureDaliOpsAtEnd(void)
       "--height", "1000",
   };
   int argc( sizeof( argList ) / sizeof( argList[0] ) );
-  char** argv = argList;
+  char** argv = const_cast<char**>( argList );
 
   CommandLineOptions options( &argc, &argv );