--- /dev/null
+#include <Evas.h>
+#include <Ecore.h>
+#include <Ecore_Evas.h>
+#include <Eina.h>
+
+#include <check.h>
+
+#include <math.h>
+#include <float.h>
+
+#define WIDTH 800
+#define HEIGHT 600
+
+static Ecore_Evas *ee = NULL;
+
+/**
+ * @addtogroup evas_vg
+ * @{
+ * @defgroup evas_vg_shape
+ *
+ *
+ * @precondition
+ * @step 1 Initialize ecore-evas with ecore_evas_init()
+ * @step 2 Create a new Ecore_Evas and show
+ */
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ ecore_evas_init();
+ ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL);
+ if (!ee)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed", __FILE__, __LINE__);
+ return;
+ }
+ ecore_evas_show(ee);
+}
+
+static void
+teardown(void)
+{
+ printf(" ============ Cleanup ============ \n");
+ if (ee)
+ {
+ ecore_evas_free(ee);
+ }
+ ecore_evas_shutdown();
+}
+
+static void
+_draw_line(Efl_VG *line)
+{
+ evas_vg_shape_append_move_to(line, 0, 0);
+ evas_vg_shape_append_line_to(line, 100, 100);
+ evas_vg_shape_stroke_color_set(line, 255, 0, 0, 255);
+ evas_vg_shape_stroke_width_set(line, 5);
+ evas_vg_node_origin_set(line, 50, 50);
+ evas_vg_node_color_set(line, 255, 255, 255, 255);
+ evas_vg_shape_stroke_cap_set(line, EFL_GFX_CAP_ROUND);
+}
+
+START_TEST(utc_evas_vg_shape_dup_p)
+{
+ Efl_VG *vg, *container, *line, *newline;
+ const Evas_Vg_Path_Command *op_get = NULL;
+ const double *points_get = NULL;
+
+ vg = evas_object_vg_add(ecore_evas_get(ee));
+ evas_object_resize(vg, WIDTH, HEIGHT);
+ evas_object_show(vg);
+
+ container = evas_vg_container_add(vg);
+ evas_object_vg_root_node_set(vg, container);
+
+ line = evas_vg_shape_add(container);
+ _draw_line(line);
+
+ newline = evas_vg_shape_add(container);
+ if (!newline)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed", __FILE__, __LINE__);
+ return;
+ }
+
+ evas_vg_shape_dup(newline, line);
+ evas_vg_shape_path_get(newline, &op_get, &points_get);
+
+ if (!op_get)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed", __FILE__, __LINE__);
+ return;
+ }
+ if (!points_get)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed", __FILE__, __LINE__);
+ return;
+ }
+
+ if (op_get[0] != EFL_GFX_PATH_COMMAND_TYPE_MOVE_TO && op_get[1] != EFL_GFX_PATH_COMMAND_TYPE_LINE_TO)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed", __FILE__, __LINE__);
+ return;
+ }
+ if (points_get[0] != 0.0 && points_get[1] != 0.0
+ && points_get[2] != 0.0 && points_get[3] != 100.0)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed", __FILE__, __LINE__);
+ return;
+ }
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+START_TEST(utc_evas_vg_shape_dup_n)
+{
+ evas_vg_shape_dup(NULL, NULL);
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+TCase * _utc_evas_vg_shape_dup()
+{
+ TCase *tcase = tcase_create("utc_evas_vg_shape_dup");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_evas_vg_shape_dup_p);
+ tcase_add_test(tcase, utc_evas_vg_shape_dup_n);
+
+ return tcase;
+}