[M120 Migration][MM] Support W3C EME
[platform/framework/web/chromium-efl.git] / tizen_src / ewk / unittest / utc_blink_ewk_int_value.cpp
1 // Copyright 2016 Samsung Electronics. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include <cstring>
6
7 #include "ewk_value_product.h"
8 #include "utc_blink_ewk_base.h"
9
10 class utc_blink_ewk_int_value : public utc_blink_ewk_base {};
11
12 TEST_F(utc_blink_ewk_int_value, POS_TEST) {
13   // check type
14   Ewk_Value v = ewk_value_int_new(0);
15   EXPECT_EQ(ewk_value_type_get(v), ewk_value_int_type_get());
16   ewk_value_unref(v);
17
18   // check value range
19   int n;
20   for (int i = -100; i < 100; ++i) {
21     v = ewk_value_int_new(i);
22     ASSERT_EQ(ewk_value_int_value_get(v, &n), EINA_TRUE);
23     EXPECT_EQ(n, i);
24     ewk_value_unref(v);
25   }
26 }