mutter/tests/conform/test-clutter-fixed.c
Emmanuele Bassi fc40d75956 [tests] Test CoglFixed, not ClutterFixed
We really want to test the CoglFixed implementation, not the
to-be-deprecated ClutterFixed one.
2009-03-10 12:38:03 +00:00

19 lines
515 B
C

#include <stdio.h>
#include <clutter/clutter.h>
#include "test-conform-common.h"
void
test_fixed_constants (TestConformSimpleFixture *fixture,
gconstpointer data)
{
g_assert_cmpint (COGL_FIXED_1, ==, COGL_FIXED_FROM_FLOAT (1.0));
g_assert_cmpint (COGL_FIXED_1, ==, COGL_FIXED_FROM_INT (1));
g_assert_cmpint (COGL_FIXED_0_5, ==, COGL_FIXED_FROM_FLOAT (0.5));
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);
}