source: trunk/test/unit/real.cpp @ 967

Last change on this file since 967 was 967, checked in by sam, 11 years ago

core: add missing real.cpp unit test.

File size: 736 bytes
Line 
1//
2// Lol Engine
3//
4// Copyright: (c) 2010-2011 Sam Hocevar <sam@hocevar.net>
5//   This program is free software; you can redistribute it and/or
6//   modify it under the terms of the Do What The Fuck You Want To
7//   Public License, Version 2, as published by Sam Hocevar. See
8//   http://sam.zoy.org/projects/COPYING.WTFPL for more details.
9//
10
11#if defined HAVE_CONFIG_H
12#   include "config.h"
13#endif
14
15#include <cmath>
16
17#include "core.h"
18#include "lol/unit.h"
19
20namespace lol
21{
22
23LOLUNIT_FIXTURE(RealTest)
24{
25public:
26    LOLUNIT_TEST(test_real_from_float)
27    {
28        float x = real4k(0.0f);
29        float y = real4k(1.0f);
30
31        LOLUNIT_ASSERT_EQUAL(x, 0.0f);
32        LOLUNIT_ASSERT_EQUAL(y, 1.0f);
33    }
34};
35
36} /* namespace lol */
37
Note: See TracBrowser for help on using the repository browser.