delete TC codes, test app codes
authorJunghwan Song <jump.song@samsung.com>
Fri, 24 Aug 2012 15:32:50 +0000 (00:32 +0900)
committerJunghwan Song <jump.song@samsung.com>
Fri, 24 Aug 2012 15:32:50 +0000 (00:32 +0900)
24 files changed:
CMakeLists.txt
TC/_export_env.sh [deleted file]
TC/_export_target_env.sh [deleted file]
TC/build.sh [deleted file]
TC/clean.sh [deleted file]
TC/config [deleted file]
TC/execute.sh [deleted file]
TC/testcase/Makefile [deleted file]
TC/testcase/tslist [deleted file]
TC/testcase/utc_telephony_sim.c [deleted file]
TC/tet_scen [deleted file]
TC/tetbuild.cfg [deleted file]
TC/tetclean.cfg [deleted file]
TC/tetexec.cfg [deleted file]
test/CMakeLists.txt [deleted file]
test/sim_get_cphs_operator_name_test.c [deleted file]
test/sim_get_icc_id_test.c [deleted file]
test/sim_get_mcc_test.c [deleted file]
test/sim_get_mnc_test.c [deleted file]
test/sim_get_msin_test.c [deleted file]
test/sim_get_spn_test.c [deleted file]
test/sim_get_state_test.c [deleted file]
test/sim_get_subscriber_number_test.c [deleted file]
test/sim_state_changed_test.c [deleted file]

index 4f93e4a..d2e65e4 100755 (executable)
@@ -104,8 +104,6 @@ CONFIGURE_FILE(
 )
 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${fw_name}.pc DESTINATION lib/pkgconfig)
 
-ADD_SUBDIRECTORY(test)
-
 IF(UNIX)
 
 ADD_CUSTOM_TARGET (distclean @echo cleaning for source distribution)
diff --git a/TC/_export_env.sh b/TC/_export_env.sh
deleted file mode 100755 (executable)
index ac8f4a1..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-. ./config
-export TET_INSTALL_PATH=$TET_INSTALL_HOST_PATH # tetware root path
-export TET_TARGET_PATH=$TET_INSTALL_PATH/tetware-target # tetware target path
-#export TET_TARGET_PATH=$TET_INSTALL_PATH/tetware-simulator # tetware simulator path
-export PATH=$TET_TARGET_PATH/bin:$PATH
-export LD_LIBRARY_PATH=$TET_TARGET_PATH/lib/tet3:$LD_LIBRARY_PATH
-export TET_ROOT=$TET_TARGET_PATH
diff --git a/TC/_export_target_env.sh b/TC/_export_target_env.sh
deleted file mode 100755 (executable)
index c693f83..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-. ./config
-export TET_INSTALL_PATH=$TET_INSTALL_TARGET_PATH # path to path
-export TET_TARGET_PATH=$TET_INSTALL_PATH/tetware-target
-#export TET_TARGET_PATH=$TET_INSTALL_PATH/tetware-simulator # tetware simulator path
-export PATH=$TET_TARGET_PATH/bin:$PATH
-export LD_LIBRARY_PATH=$TET_TARGET_PATH/lib/tet3:$LD_LIBRARY_PATH
-export TET_ROOT=$TET_TARGET_PATH
diff --git a/TC/build.sh b/TC/build.sh
deleted file mode 100755 (executable)
index 72aad6c..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-
-. ./_export_env.sh                              # setting environment variables
-
-export TET_SUITE_ROOT=`pwd`
-FILE_NAME_EXTENSION=`date +%s`
-
-RESULT_DIR=results
-HTML_RESULT=$RESULT_DIR/build-tar-result-$FILE_NAME_EXTENSION.html
-JOURNAL_RESULT=$RESULT_DIR/build-tar-result-$FILE_NAME_EXTENSION.journal
-
-mkdir -p $RESULT_DIR
-
-tcc -c -p ./
-tcc -b -j $JOURNAL_RESULT -p ./
-grw -c 7 -f chtml -o $HTML_RESULT $JOURNAL_RESULT
diff --git a/TC/clean.sh b/TC/clean.sh
deleted file mode 100755 (executable)
index 29743e0..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-
-. ./_export_env.sh                              # setting environment variables
-
-export TET_SUITE_ROOT=`pwd`
-RESULT_DIR=results
-
-tcc -c -p ./                                # executing tcc, with clean option (-c)
-rm -r $RESULT_DIR
-rm -r tet_tmp_dir
-rm testcase/tet_captured
diff --git a/TC/config b/TC/config
deleted file mode 100644 (file)
index f919537..0000000
--- a/TC/config
+++ /dev/null
@@ -1,2 +0,0 @@
-TET_INSTALL_HOST_PATH=/home/bwlee/tools/TETware
-TET_INSTALL_TARGET_PATH=/home/bwlee/tools/TETware
diff --git a/TC/execute.sh b/TC/execute.sh
deleted file mode 100755 (executable)
index 0fe02e2..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/sh
-
-. ./_export_target_env.sh                    # setting environment variables
-
-export TET_SUITE_ROOT=`pwd`
-FILE_NAME_EXTENSION=`date +%s`
-
-RESULT_DIR=results
-HTML_RESULT=$RESULT_DIR/exec-tar-result-$FILE_NAME_EXTENSION.html
-JOURNAL_RESULT=$RESULT_DIR/exec-tar-result-$FILE_NAME_EXTENSION.journal
-
-mkdir -p $RESULT_DIR
-
-tcc -e -j $JOURNAL_RESULT -p ./
-grw -c 7 -f chtml -o $HTML_RESULT $JOURNAL_RESULT
diff --git a/TC/testcase/Makefile b/TC/testcase/Makefile
deleted file mode 100644 (file)
index 81b182b..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-CC ?= gcc
-
-C_FILES = $(shell ls *.c)
-       
-PKGS = capi-telephony-sim
-
-LDFLAGS = `pkg-config --libs $(PKGS)`
-LDFLAGS += $(TET_ROOT)/lib/tet3/tcm_s.o
-LDFLAGS += -L$(TET_ROOT)/lib/tet3 -ltcm_s
-LDFLAGS += -L$(TET_ROOT)/lib/tet3 -lapi_s
-
-CFLAGS = -I. `pkg-config --cflags $(PKGS)`
-CFLAGS += -I$(TET_ROOT)/inc/tet3
-CFLAGS += -Wall
-
-TCS := $(shell ls -1 *.c | cut -d. -f1)
-
-all: $(TCS)
-
-%: %.c
-       $(CC) -o $@ $< $(CFLAGS) $(LDFLAGS)
-
-clean:
-       rm -f $(TCS)
diff --git a/TC/testcase/tslist b/TC/testcase/tslist
deleted file mode 100644 (file)
index fdb0580..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/testcase/utc_telephony_sim
-
diff --git a/TC/testcase/utc_telephony_sim.c b/TC/testcase/utc_telephony_sim.c
deleted file mode 100644 (file)
index 1744ec5..0000000
+++ /dev/null
@@ -1,360 +0,0 @@
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * 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 <tet_api.h>
-#include <sim.h>
-#include <stdlib.h>
-
-enum {
-       POSITIVE_TC_IDX = 0x01,
-       NEGATIVE_TC_IDX,
-};
-
-static void startup(void);
-static void cleanup(void);
-
-void (*tet_startup)(void) = startup;
-void (*tet_cleanup)(void) = cleanup;
-
-static void utc_telephony_sim_get_icc_id_n(void);
-static void utc_telephony_sim_get_icc_id_p(void);
-static void utc_telephony_sim_get_mcc_n(void);
-static void utc_telephony_sim_get_mcc_p(void);
-static void utc_telephony_sim_get_mnc_n(void);
-static void utc_telephony_sim_get_mnc_p(void);
-static void utc_telephony_sim_get_msin_n(void);
-static void utc_telephony_sim_get_msin_p(void);
-static void utc_telephony_sim_get_spn_n(void);
-static void utc_telephony_sim_get_spn_p(void);
-static void utc_telephony_sim_get_cphs_operator_name_n(void);
-static void utc_telephony_sim_get_cphs_operator_name_p(void);
-static void utc_telephony_sim_get_state_n(void);
-static void utc_telephony_sim_get_state_p(void);
-static void utc_telephony_sim_get_subscriber_number_n(void);
-static void utc_telephony_sim_get_subscriber_number_p(void);
-static void utc_telephony_sim_set_state_changed_cb_p(void);
-static void utc_telephony_sim_set_state_changed_cb_n(void);
-static void utc_telephony_sim_unset_state_changed_cb_p(void);
-
-
-
-struct tet_testlist tet_testlist[] = {
-       { utc_telephony_sim_get_icc_id_n, NEGATIVE_TC_IDX },                        
-       { utc_telephony_sim_get_icc_id_p, POSITIVE_TC_IDX },
-       { utc_telephony_sim_get_mcc_n, NEGATIVE_TC_IDX },
-       { utc_telephony_sim_get_mcc_p, POSITIVE_TC_IDX },       
-       { utc_telephony_sim_get_mnc_n, NEGATIVE_TC_IDX },       
-       { utc_telephony_sim_get_mnc_p, POSITIVE_TC_IDX },
-       { utc_telephony_sim_get_msin_n, NEGATIVE_TC_IDX },
-       { utc_telephony_sim_get_msin_p, POSITIVE_TC_IDX },
-       { utc_telephony_sim_get_spn_n, NEGATIVE_TC_IDX },       
-       { utc_telephony_sim_get_spn_p, POSITIVE_TC_IDX },
-       { utc_telephony_sim_get_cphs_operator_name_n, NEGATIVE_TC_IDX },
-       { utc_telephony_sim_get_cphs_operator_name_p, POSITIVE_TC_IDX },
-       { utc_telephony_sim_get_state_n, NEGATIVE_TC_IDX },
-       { utc_telephony_sim_get_state_p, POSITIVE_TC_IDX },
-       { utc_telephony_sim_get_subscriber_number_n, NEGATIVE_TC_IDX }, 
-       { utc_telephony_sim_get_subscriber_number_p, POSITIVE_TC_IDX },
-       { utc_telephony_sim_set_state_changed_cb_p, POSITIVE_TC_IDX },
-       { utc_telephony_sim_set_state_changed_cb_n, NEGATIVE_TC_IDX },
-       { utc_telephony_sim_unset_state_changed_cb_p, POSITIVE_TC_IDX },
-       { NULL, 0 },
-};
-
-
-static void startup(void)
-{
-       /* start of TC */
-       tet_printf("\n TC start");
-}
-
-
-static void cleanup(void)
-{
-       /* end of TC */
-       tet_printf("\n TC end");
-}
-
-/**
- * @brief Callback function
- */
-void sim_state_changed(sim_state_e state, void* user_data)
-{
-
-}
-
-/**
- * @brief Negative test case of sim_get_icc_id()
- */
-static void utc_telephony_sim_get_icc_id_n(void)
-{
-        int ret = SIM_ERROR_NONE;
-
-        //  Invalid parameter test
-        ret = sim_get_icc_id(NULL);
-        dts_check_eq("sim_get_icc_id", ret, SIM_ERROR_INVALID_PARAMETER, "Must return SIM_ERROR_INVALID_PARAMETER in case of invalid parameter"); 
-}
-
-
-/**
- * @brief Positive test case of sim_get_icc_id()
- */
-static void utc_telephony_sim_get_icc_id_p(void)
-{
-        char* icc_id = NULL;
-       int ret = SIM_ERROR_NONE;
-
-        //  Normal operation test
-       ret = sim_get_icc_id(&icc_id);
-        if( icc_id != NULL )
-                free(icc_id);
-        dts_check_eq("sim_get_icc_id", ret, SIM_ERROR_NONE, "Failed to get ICC ID");
-}
-
-
-/**
- * @brief Negative test case of sim_get_mcc()
- */
-static void utc_telephony_sim_get_mcc_n(void)
-{
-        int ret = SIM_ERROR_NONE;
-
-        //  Invalid parameter test
-        ret = sim_get_mcc(NULL);
-        dts_check_eq("sim_get_mcc", ret, SIM_ERROR_INVALID_PARAMETER, "Must return SIM_ERROR_INVALID_PARAMETER in case of invalid parameter"); 
-}
-
-
-/**
- * @brief Positive test case of sim_get_mcc()
- */
-static void utc_telephony_sim_get_mcc_p(void)
-{
-        char* mcc = NULL; 
-        int ret = SIM_ERROR_NONE;
-
-        //  Normal operation test
-        ret = sim_get_mcc(&mcc);
-        if( ret == SIM_ERROR_NONE )
-                free(mcc);
-        dts_check_eq("sim_get_mcc", ret, SIM_ERROR_NONE, "Failed to get MCC"); 
-}
-
-
-/**
- * @brief Negative test case of sim_get_mnc()
- */
-static void utc_telephony_sim_get_mnc_n(void)
-{
-        int ret = SIM_ERROR_NONE;
-
-        //  Invalid parameter test 
-        ret = sim_get_mnc(NULL);
-        dts_check_eq("sim_get_mnc", ret, SIM_ERROR_INVALID_PARAMETER, "Must return SIM_ERROR_INVALID_PARAMETER in case of invalid parameter"); 
-}
-
-
-/**
- * @brief Positive test case of sim_get_mnc()
- */
-static void utc_telephony_sim_get_mnc_p(void)
-{
-        char* mnc = NULL; 
-        int ret = SIM_ERROR_NONE;
-
-        //  Normal operation test
-        ret = sim_get_mnc(&mnc);
-        if( ret == SIM_ERROR_NONE )
-                free(mnc);
-        dts_check_eq("sim_get_mnc", ret, SIM_ERROR_NONE, "Failed to get MNC"); 
-}
-
-
-/**
- * @brief Negative test case of sim_get_msin()
- */
-static void utc_telephony_sim_get_msin_n(void)
-{
-        int ret = SIM_ERROR_NONE;
-
-        //  Invalid parameter test
-        ret = sim_get_msin(NULL);
-        dts_check_eq("sim_get_msin", ret, SIM_ERROR_INVALID_PARAMETER, "Must return SIM_ERROR_INVALID_PARAMETER in case of invalid parameter");
-}
-
-
-/**
- * @brief Positive test case of sim_get_msin()
- */
-static void utc_telephony_sim_get_msin_p(void)
-{
-        char* msin = NULL;
-        int ret = SIM_ERROR_NONE;
-
-        //  Normal operation test
-        ret = sim_get_msin(&msin);
-        if( ret == SIM_ERROR_NONE )
-                free(msin);
-        dts_check_eq("sim_get_msin", ret, SIM_ERROR_NONE, "Failed to get MSIN");
-}
-
-
-/**
- * @brief Negative test case of sim_get_spn()
- */
-static void utc_telephony_sim_get_spn_n(void)
-{
-        int ret = SIM_ERROR_NONE;
-
-        //  Invalid parameter test    
-        ret = sim_get_spn(NULL);
-        dts_check_eq("sim_get_spn", ret, SIM_ERROR_INVALID_PARAMETER, "Must return SIM_ERROR_INVALID_PARAMETER in case of invalid parameter"); 
-}
-
-
-/**
- * @brief Positive test case of sim_get_spn()
- */
-static void utc_telephony_sim_get_spn_p(void)
-{
-        char* spn = NULL; 
-        int ret = SIM_ERROR_NONE;
-
-        //  Normal operation test
-        ret = sim_get_spn(&spn);
-        if( ret == SIM_ERROR_NONE )
-                free(spn);
-        dts_check_eq("sim_get_spn", ret, SIM_ERROR_NONE, "Failed to get SPN");
-}
-
-
-/**
- * @brief Negative test case of sim_get_cphs_operator_name()
- */
-static void utc_telephony_sim_get_cphs_operator_name_n(void)
-{
-        int ret = SIM_ERROR_NONE;
-
-        //  Invalid parameter test
-        ret = sim_get_cphs_operator_name(NULL, NULL);
-        dts_check_eq("sim_get_cphs_operator_name", ret, SIM_ERROR_INVALID_PARAMETER, "Must return SIM_ERROR_INVALID_PARAMETER in case of invalid parameter");
-}
-
-
-/**
- * @brief Positive test case of sim_get_cphs_operator_name()
- */
-static void utc_telephony_sim_get_cphs_operator_name_p(void)
-{
-        char* full_name = NULL;
-        char* short_name = NULL;
-        int ret = SIM_ERROR_NONE;
-
-        //  Normal operation test
-        ret = sim_get_cphs_operator_name(&full_name, &short_name);
-        if( ret == SIM_ERROR_NONE ) {
-                free(full_name);
-                free(short_name);
-        }
-        dts_check_eq("sim_get_cphs_operator_name", ret, SIM_ERROR_NONE, "Failed to get CPHS full/short operator name");
-}
-
-
-/**
- * @brief Negative test case of sim_get_state()
- */
-static void utc_telephony_sim_get_state_n(void)
-{
-        int ret = SIM_ERROR_NONE;
-
-        //  Invalid parameter test    
-        ret = sim_get_state(NULL);
-        dts_check_eq("sim_get_state", ret, SIM_ERROR_INVALID_PARAMETER, "Must return SIM_ERROR_INVALID_PARAMETER in case of invalid parameter"); 
-}
-
-
-/**
- * @brief Positive test case of sim_get_state()
- */
-static void utc_telephony_sim_get_state_p(void)
-{
-        sim_state_e sim_status; 
-        int ret = SIM_ERROR_NONE;
-
-        //  Normal operation test
-        ret = sim_get_state(&sim_status);
-        dts_check_eq("sim_get_state", ret, SIM_ERROR_NONE, "Failed to get the current status of SIM");
-}
-
-
-/**
- * @brief Negative test case of sim_get_subscriber_number()
- */
-static void utc_telephony_sim_get_subscriber_number_n(void)
-{
-        int ret = SIM_ERROR_NONE;
-
-        // Invalid parameter test
-        ret = sim_get_subscriber_number(NULL);
-        dts_check_eq("sim_get_subscriber_number", ret, SIM_ERROR_INVALID_PARAMETER, "Must return SIM_ERROR_INVALID_PARAMETER in case of invalid parameter"); 
-}
-
-
-/**
- * @brief Positive test case of sim_get_subscriber_number()
- */
-static void utc_telephony_sim_get_subscriber_number_p(void)
-{
-        char* subscriber_number = NULL;
-        int ret = SIM_ERROR_NONE;
-
-        //  Normal operation test
-        ret = sim_get_subscriber_number(&subscriber_number);
-        if( ret == SIM_ERROR_NONE )
-        {
-                       free(subscriber_number);
-                       dts_pass("sim_get_subscriber_number", "Succeeded to get subscriber number.");
-        }
-               else
-               {
-                       dts_fail("sim_get_subscriber_number", "Failed to get subscriber number.");
-               }
-}
-
-
-static void utc_telephony_sim_set_state_changed_cb_p(void)
-{
-    sim_error_e ret = sim_set_state_changed_cb(sim_state_changed, NULL);
-    dts_check_eq("sim_set_state_changed_cb", ret, SIM_ERROR_NONE, 
-               "sim_set_state_changed_cb failed.");
-}
-
-static void utc_telephony_sim_set_state_changed_cb_n(void)
-{
-    sim_error_e ret = sim_set_state_changed_cb(NULL, NULL);
-    dts_check_eq("sim_set_state_changed_cb", ret, SIM_ERROR_INVALID_PARAMETER,  
-               "SIM_ERROR_INVALID_PARAMETER must be returned when parameter is NULL.");
-}
-
-static void utc_telephony_sim_unset_state_changed_cb_p(void)
-{
-    sim_error_e ret = sim_unset_state_changed_cb();
-    dts_check_eq("sim_unset_state_changed_cb", ret, SIM_ERROR_NONE, 
-               "sim_unset_state_changed_cb failed.");
-}
-
-
diff --git a/TC/tet_scen b/TC/tet_scen
deleted file mode 100755 (executable)
index 03f029a..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-all
-       ^TEST
-##### Scenarios for TEST #####
-
-# Test scenario
-TEST
-       :include:/testcase/tslist
diff --git a/TC/tetbuild.cfg b/TC/tetbuild.cfg
deleted file mode 100644 (file)
index f7eda55..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-TET_OUTPUT_CAPTURE=True # capture option for build operation checking
-TET_BUILD_TOOL=make # build with using make command
-TET_BUILD_FILE=-f Makefile # execution file (Makefile) for build
-TET_API_COMPLIANT=True # use TET API in Test Case ?
-TET_PASS_TC_NAME=True # report passed TC name in Journal file?
diff --git a/TC/tetclean.cfg b/TC/tetclean.cfg
deleted file mode 100644 (file)
index 02d7030..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-TET_OUTPUT_CAPTURE=True # capture option
-TET_CLEAN_TOOL= make clean # clean tool
-TET_CLEAN_FILE= Makefile # file for clean
-TET_API_COMPLIANT=True # TET API useage 
-TET_PASS_TC_NAME=True # showing name , passed TC
diff --git a/TC/tetexec.cfg b/TC/tetexec.cfg
deleted file mode 100644 (file)
index ef3e452..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-TET_OUTPUT_CAPTURE=True # capturing execution or not
-TET_EXEC_TOOL=  # ex) exec : execution tool set up/ Optional
-TET_EXEC_FILE=   # ex) exectool : execution file/ Optional
-TET_API_COMPLIANT=True # Test case or Tool usesTET API?
-TET_PASS_TC_NAME=True # showing Passed TC name ?
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
deleted file mode 100755 (executable)
index 97657b6..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-SET(fw_test "${fw_name}-test")
-
-INCLUDE(FindPkgConfig)
-pkg_check_modules(${fw_test} REQUIRED glib-2.0)
-FOREACH(flag ${${fw_test}_CFLAGS})
-    SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
-ENDFOREACH(flag)
-
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -Wall")
-
-#ADD_EXECUTABLE("system-sensor" system-sensor.c)
-#TARGET_LINK_LIBRARIES("system-sensor" ${fw_name} ${${fw_test}_LDFLAGS})
-
-aux_source_directory(. sources)
-FOREACH(src ${sources})
-    GET_FILENAME_COMPONENT(src_name ${src} NAME_WE)
-    MESSAGE("${src_name}")
-    ADD_EXECUTABLE(${src_name} ${src})
-    TARGET_LINK_LIBRARIES(${src_name} ${fw_name} ${${fw_test}_LDFLAGS})
-ENDFOREACH()
diff --git a/test/sim_get_cphs_operator_name_test.c b/test/sim_get_cphs_operator_name_test.c
deleted file mode 100644 (file)
index f5a752c..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * 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 <stdio.h>
-#include <sim.h>
-#include <stdlib.h>
-#include <dlog.h>
-
-#ifdef LOG_TAG
-#undef LOG_TAG
-#endif
-#define LOG_TAG "TIZEN_N_SIM_TEST"
-
-int main()
-{
-       int ret = 0;
-       char* full_name = NULL;
-       char* short_name = NULL;
-       int ret_value = sim_get_cphs_operator_name(&full_name, &short_name);
-
-       switch(ret_value)
-       {
-               case SIM_ERROR_NONE:
-                       ret = 0;
-                       if( full_name != NULL )
-                       {
-                               LOGI("CPHS full ONS is %s", full_name);
-                               free(full_name);
-                       }
-                       else
-                       {
-                               LOGI("CPHS full ONS is NULL");
-                       }
-
-                       if( short_name != NULL )
-                       {
-                               LOGI("CPHS short ONS is %s", short_name);
-                               free(short_name);
-                       }
-                       else
-                       {
-                               LOGI("CPHS short ONS is NULL");
-                       }
-                       break;
-               case SIM_ERROR_INVALID_PARAMETER:
-                       LOGE("Invalid parameter");
-                       ret = -1;
-                       break;
-               case SIM_ERROR_OPERATION_FAILED:
-                       LOGE("Cannot find SPN value");
-                       ret = -1;
-                       break;
-               case SIM_ERROR_NOT_AVAILABLE:
-                       LOGE("SIM is not available");
-                       ret = -1;
-                       break;
-               default:
-                       LOGE("Unexpected return value");
-                       ret = -1;
-                       break;
-       }
-
-
-       return ret;
-}
diff --git a/test/sim_get_icc_id_test.c b/test/sim_get_icc_id_test.c
deleted file mode 100644 (file)
index 3550d61..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * 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 <stdio.h>
-#include <sim.h>
-#include <stdlib.h>
-#include <dlog.h>
-
-#ifdef LOG_TAG
-#undef LOG_TAG
-#endif
-#define LOG_TAG "TIZEN_N_SIM_TEST"
-
-
-int main()
-{
-       int ret = 0;
-       char* icc_id = NULL;
-       int ret_value = sim_get_icc_id(&icc_id);
-
-       switch(ret_value)
-       {
-               case SIM_ERROR_NONE:
-                       LOGI("ICC-ID is %s", icc_id);
-                       ret = 0;
-                       if(icc_id != NULL)
-                               free(icc_id);
-                       break;
-               case SIM_ERROR_OUT_OF_MEMORY:
-                       LOGI("Out of memory\n");
-                       ret = -1;
-                       break;                                    
-               case SIM_ERROR_INVALID_PARAMETER:
-                       LOGI("Invalid parameter\n");
-                       ret = -1;
-                       break;                                                
-               case SIM_ERROR_OPERATION_FAILED:
-                       LOGI("Can not get ICC-ID value\n");
-                       ret = -1;
-                       break;
-               case SIM_ERROR_NOT_AVAILABLE:
-                       LOGI("SIM is not available\n");
-                       ret = -1;
-                       break;                                          
-               default:
-                       LOGI("Unexpected return value\n");
-                       ret = -1;
-                       break;
-       }
-
-       return ret;
-}
diff --git a/test/sim_get_mcc_test.c b/test/sim_get_mcc_test.c
deleted file mode 100644 (file)
index 47cd11c..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * 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 <stdio.h>
-#include <stdlib.h>
-#include <sim.h>
-#include <dlog.h>
-
-#ifdef LOG_TAG
-#undef LOG_TAG
-#endif
-#define LOG_TAG "TIZEN_N_SIM_TEST"
-
-int main()
-{
-       int ret = 0;
-       char* mcc = NULL;
-       int ret_value = sim_get_mcc(&mcc);
-
-       switch(ret_value)
-       {
-               case SIM_ERROR_NONE:
-                       LOGI("MCC is %s", mcc);
-                       ret = 0;
-                       free(mcc);
-                       break;
-               case SIM_ERROR_OUT_OF_MEMORY:
-                       LOGE("Out of memory");
-                       ret = -1;
-                       break;                                                
-               case SIM_ERROR_INVALID_PARAMETER:
-                       LOGE("Invalid parameter");
-                       ret = -1;
-                       break;                                                                        
-               case SIM_ERROR_OPERATION_FAILED:
-                       LOGE("Can not get MCC value");
-                       ret = -1;
-                       break;
-               case SIM_ERROR_NOT_AVAILABLE:
-                       LOGE("SIM is not available");
-                       ret = -1;
-                       break;                                          
-               default:
-                       LOGE("Unexpected return value");
-                       ret = -1;
-                       break;
-       }
-
-       return ret;
-}
diff --git a/test/sim_get_mnc_test.c b/test/sim_get_mnc_test.c
deleted file mode 100644 (file)
index a3c04d9..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * 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 <stdio.h>
-#include <sim.h>
-#include <stdlib.h>
-#include <dlog.h>
-
-#ifdef LOG_TAG
-#undef LOG_TAG
-#endif
-#define LOG_TAG "TIZEN_N_SIM_TEST"
-
-int main()
-{
-       int ret = 0;
-       char* mnc = NULL;
-       int ret_value = sim_get_mnc(&mnc);
-
-       switch(ret_value)
-       {
-               case SIM_ERROR_NONE:
-                       LOGI("MNC is %s", mnc);
-                       ret = 0;
-                       free(mnc);
-                       break;
-               case SIM_ERROR_OUT_OF_MEMORY:
-                       LOGE("Out of memory");
-                       ret = -1;
-                       break;        
-               case SIM_ERROR_INVALID_PARAMETER:
-                       LOGE("Invalid parameter");
-                       ret = -1;
-                       break;                                                                                                
-               case SIM_ERROR_OPERATION_FAILED:
-                       LOGE("Can not get MNC value");
-                       ret = -1;
-                       break;
-               case SIM_ERROR_NOT_AVAILABLE:
-                       LOGE("SIM is not available");
-                       ret = -1;
-                       break;                                          
-               default:
-                       LOGE("Unexpected return value");
-                       ret = -1;
-                       break;
-       }
-
-       return ret;
-}
diff --git a/test/sim_get_msin_test.c b/test/sim_get_msin_test.c
deleted file mode 100644 (file)
index a8530c1..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * 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 <stdio.h>
-#include <sim.h>
-#include <stdlib.h>
-#include <dlog.h>
-
-#ifdef LOG_TAG
-#undef LOG_TAG
-#endif
-#define LOG_TAG "TIZEN_N_SIM_TEST"
-
-int main()
-{
-       int ret = 0;
-       char* msin = NULL;
-       int ret_value = sim_get_msin(&msin);
-
-       switch(ret_value)
-       {
-               case SIM_ERROR_NONE:
-                       LOGI("MSIN is %s", msin);
-                       ret = 0;
-                       free(msin);
-                       break;
-               case SIM_ERROR_OUT_OF_MEMORY:
-                       LOGE("Out of memory");
-                       ret = -1;
-                       break;
-               case SIM_ERROR_INVALID_PARAMETER:
-                       LOGE("Invalid parameter");
-                       ret = -1;
-                       break;
-               case SIM_ERROR_OPERATION_FAILED:
-                       LOGE("Can not get MNC value");
-                       ret = -1;
-                       break;
-               case SIM_ERROR_NOT_AVAILABLE:
-                       LOGE("SIM is not available");
-                       ret = -1;
-                       break;
-               default:
-                       LOGE("Unexpected return value");
-                       ret = -1;
-                       break;
-       }
-
-       return ret;
-}
diff --git a/test/sim_get_spn_test.c b/test/sim_get_spn_test.c
deleted file mode 100644 (file)
index dd868cc..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * 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 <stdio.h>
-#include <sim.h>
-#include <stdlib.h>
-#include <dlog.h>
-
-#ifdef LOG_TAG
-#undef LOG_TAG
-#endif
-#define LOG_TAG "TIZEN_N_SIM_TEST"
-
-int main()
-{
-       int ret = 0;
-       char* spn = NULL;
-       int ret_value = sim_get_spn(&spn);
-
-       switch(ret_value)
-       {
-               case SIM_ERROR_NONE:
-                       ret = 0;
-                       if( spn != NULL )
-                       {
-                               LOGI("SPN is %s", spn);
-                               free(spn);
-                       }
-                       else
-                       {
-                               LOGI("SPN is NULL");
-                       }
-                       break;
-               case SIM_ERROR_INVALID_PARAMETER:
-                       LOGE("Invalid parameter");
-                       ret = -1;
-                       break;                                                                                                                        
-               case SIM_ERROR_OPERATION_FAILED:
-                       LOGE("Cannot find SPN value");
-                       ret = -1;
-                       break;
-               case SIM_ERROR_NOT_AVAILABLE:
-                       LOGE("SIM is not available");
-                       ret = -1;
-                       break;                  
-               default:
-                       LOGE("Unexpected return value");
-                       ret = -1;
-                       break;
-       }
-
-
-       return ret;
-}
diff --git a/test/sim_get_state_test.c b/test/sim_get_state_test.c
deleted file mode 100644 (file)
index c4218ca..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * 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 <stdio.h>
-#include <string.h>
-#include <sim.h>
-#include <dlog.h>
-
-#ifdef LOG_TAG
-#undef LOG_TAG
-#endif
-#define LOG_TAG "TIZEN_N_SIM_TEST"
-
-
-void convert_state_into_string(sim_state_e sim_state, char* sim_state_string)
-{
-       switch(sim_state)
-       {
-               case SIM_STATE_AVAILABLE:
-                       snprintf(sim_state_string, 256, "available");
-                       break;
-               case SIM_STATE_LOCKED:
-                       snprintf(sim_state_string, 256, "locked");
-                       break;
-               case SIM_STATE_UNKNOWN:
-                       snprintf(sim_state_string, 256, "unknown");
-                       break;
-               default:
-                       snprintf(sim_state_string, 256, "unavailable");
-                       break;          
-       }
-
-}
-
-int main()
-{
-       int ret = 0;
-       sim_state_e sim_state = SIM_STATE_UNAVAILABLE;
-       char sim_state_string[256] = "";
-       int ret_value = sim_get_state(&sim_state);
-
-
-       switch(ret_value)
-       {
-               case SIM_ERROR_NONE:
-                       convert_state_into_string(sim_state, sim_state_string);
-                       LOGI("SIM is %s", sim_state_string);
-                       ret = 0;
-                       break;
-               case SIM_ERROR_OPERATION_FAILED:
-                       LOGE("Can not get sim state");
-                       ret = -1;
-                       break;
-               case SIM_ERROR_INVALID_PARAMETER:
-                       LOGE("Invalid parameter");
-                       ret = -1;
-                       break;                                                                                                                                                
-               default:
-                       LOGE("Unexpected return value");
-                       ret = -1;
-                       break;
-       }
-
-       return ret;
-}
diff --git a/test/sim_get_subscriber_number_test.c b/test/sim_get_subscriber_number_test.c
deleted file mode 100644 (file)
index 32456a4..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * 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 <stdio.h>
-#include <sim.h>
-#include <stdlib.h>
-#include <dlog.h>
-
-#ifdef LOG_TAG
-#undef LOG_TAG
-#endif
-#define LOG_TAG "TIZEN_N_SIM_TEST"
-
-int main()
-{
-       int ret = 0;
-       char* subscriber_number = NULL;
-       int ret_value = sim_get_subscriber_number(&subscriber_number);
-
-       switch(ret_value)
-       {
-               case SIM_ERROR_NONE:
-                       LOGI("Subscriber number is \"%s\"", subscriber_number);
-                       ret = 0;
-                       free(subscriber_number);
-                       break;
-               case SIM_ERROR_INVALID_PARAMETER:
-                       LOGE("Invalid parameter");
-                       ret = -1;
-                       break;                                                                                                                        
-               case SIM_ERROR_OPERATION_FAILED:
-                       LOGE("Cannot find subscriber number value");
-                       ret = -1;
-                       break;
-               case SIM_ERROR_NOT_AVAILABLE:
-                       LOGE("SIM is not available");
-                       ret = -1;
-                       break;                  
-               default:
-                       LOGE("Unexpected return value");
-                       ret = -1;
-                       break;
-       }
-
-
-       return ret;
-}
diff --git a/test/sim_state_changed_test.c b/test/sim_state_changed_test.c
deleted file mode 100644 (file)
index d1c75ef..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * 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 <stdio.h>
-#include <string.h>
-#include <sim.h>
-#include <dlog.h>
-#include <glib.h>
-
-#ifdef LOG_TAG
-#undef LOG_TAG
-#endif
-#define LOG_TAG "TIZEN_N_SIM_TEST"
-
-static GMainLoop *event_loop;
-
-char* convert_state_to_string(sim_state_e sim_state)
-{
-       switch(sim_state)
-       {
-               case SIM_STATE_AVAILABLE:
-                       return "available";
-               case SIM_STATE_LOCKED:
-                       return "locked";
-               case SIM_STATE_UNKNOWN:
-                       return "unknown";
-               case SIM_STATE_UNAVAILABLE:
-                       return "unavailable";
-               default:
-                       return "unexpected";
-       }       
-}
-
-void sim_state_changed(sim_state_e state, void* user_data)
-{
-       LOGI("[%s] Start sim_state_changed_cb", __FUNCTION__);
-
-       LOGI("[%s] Status of sim: %s", __FUNCTION__, convert_state_to_string(state));
-       LOGI("[%s] user data: %s", __FUNCTION__, user_data);
-
-       LOGI("[%s] End sim_state_changed_cb", __FUNCTION__);    
-       g_main_loop_quit(event_loop);
-}
-
-int main()
-{
-       if( sim_set_state_changed_cb(sim_state_changed, "sim_state_changed_test") == SIM_ERROR_NONE )
-       {
-               LOGI("[%s] Succeeded to add callback function", __FUNCTION__);
-       }
-       else
-       {
-               LOGE("[%s] Failed to add callback function", __FUNCTION__);
-               return -1;
-       }
-
-       LOGI("[%s] If you change the state of SIM card, then callback function will be called", __FUNCTION__);
-       event_loop = g_main_loop_new(NULL, FALSE);
-       g_main_loop_run(event_loop);
-
-       if( sim_unset_state_changed_cb() == SIM_ERROR_NONE )
-       {
-               LOGI("[%s] Succeeded to remove callback function", __FUNCTION__);
-       }
-       else
-       {
-               LOGE("[%s] Failed to remove callback function", __FUNCTION__);
-               return -1;
-       }
-
-       return 0;
-}