2008-11-07 19:32:28 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <clutter/clutter.h>
|
|
|
|
|
|
|
|
#include "test-conform-common.h"
|
|
|
|
|
|
|
|
void
|
2009-11-27 00:28:39 +00:00
|
|
|
test_cogl_fixed (TestConformSimpleFixture *fixture,
|
|
|
|
gconstpointer data)
|
2008-11-07 19:32:28 +00:00
|
|
|
{
|
2009-03-09 17:07:47 +00:00
|
|
|
g_assert_cmpint (COGL_FIXED_1, ==, COGL_FIXED_FROM_FLOAT (1.0));
|
|
|
|
g_assert_cmpint (COGL_FIXED_1, ==, COGL_FIXED_FROM_INT (1));
|
2008-11-07 19:32:28 +00:00
|
|
|
|
2009-03-09 17:07:47 +00:00
|
|
|
g_assert_cmpint (COGL_FIXED_0_5, ==, COGL_FIXED_FROM_FLOAT (0.5));
|
2008-11-07 19:32:28 +00:00
|
|
|
|
2009-03-09 17:07:47 +00:00
|
|
|
g_assert_cmpfloat (COGL_FIXED_TO_FLOAT (COGL_FIXED_1), ==, 1.0);
|
|
|
|
g_assert_cmpfloat (COGL_FIXED_TO_FLOAT (COGL_FIXED_0_5), ==, 0.5);
|
2008-11-07 19:32:28 +00:00
|
|
|
}
|
|
|
|
|