#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;
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
int UtcDaliCommandLineOptionsNoArgs(void)
{
- optind=1;
+ optind=0;
int argc( 1 );
const char* argList[1] = { "program" };
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 );
int UtcDaliCommandLineOptionsDaliShortArgs(void)
{
- optind=1;
+ optind=0;
const char* argList[] =
{
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 );
int UtcDaliCommandLineOptionsDaliLongArgsEqualsSign(void)
{
- optind=1;
+ optind=0;
const char* argList[] =
{
"--width=800",
"--height=1000",
"--dpi=3x4",
- "--no-vsync",
"--help"
};
int argc( sizeof( argList ) / sizeof( argList[0] ) );
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 );
int UtcDaliCommandLineOptionsDaliLongArgsSpaces(void)
{
- optind=1;
+ optind=0;
const char* argList[] =
{
"--width", "800",
"--height", "1000",
"--dpi", "3x4",
- "--no-vsync",
"--help"
};
int argc( sizeof( argList ) / sizeof( argList[0] ) );
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 );
int UtcDaliCommandLineOptionsNonDaliArgs(void)
{
- optind=1;
+ optind=0;
const char* argList[] =
{
int UtcDaliCommandLineOptionsMixture(void)
{
- optind = 1; // Reset opt for test
+ optind = 0; // Reset opt for test
const char* argList[] =
{
int UtcDaliCommandLineOptionsMixtureDaliOpsAtStart(void)
{
- optind=1;
+ optind=0;
const char* argList[] =
{
int UtcDaliCommandLineOptionsMixtureDaliOpsAtEnd(void)
{
- optind=1;
+ optind=0;
const char* argList[] =
{