summaryrefslogtreecommitdiff
path: root/src/tests/evas/efl_canvas_animation.c
blob: cef036341cb8d2c775cf4a87b7218fb6a0831b10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif

#include <stdio.h>

#include <Evas.h>

#include "evas_suite.h"
#include "evas_tests_helpers.h"

EFL_START_TEST(efl_canvas_animation_negative_double_checking)
{
   Efl_Canvas_Animation *animation = efl_new(EFL_CANVAS_ANIMATION_CLASS);

   efl_animation_duration_set(animation, 1.0);
   ck_assert_int_eq(efl_animation_duration_get(animation), 1.0);
   efl_animation_duration_set(animation, 3.0);
   ck_assert_int_eq(efl_animation_duration_get(animation), 3.0);
   EXPECT_ERROR_START;
   efl_animation_duration_set(animation, -1.0);
   ck_assert_int_eq(efl_animation_duration_get(animation), 3.0);
   EXPECT_ERROR_END;

   efl_animation_start_delay_set(animation, 1.0);
   ck_assert(EINA_DBL_EQ(efl_animation_start_delay_get(animation), 1.0));
   efl_animation_start_delay_set(animation, 0.0);
   ck_assert(EINA_DBL_EQ(efl_animation_start_delay_get(animation), 0.0));
   EXPECT_ERROR_START;
   efl_animation_start_delay_set(animation, -1.0);
   ck_assert_int_eq(efl_animation_start_delay_get(animation), 0.0);
   EXPECT_ERROR_END;

}
EFL_END_TEST

void efl_test_canvas_animation(TCase *tc)
{
   tcase_add_test(tc, efl_canvas_animation_negative_double_checking);
}