From 5aedae49a3877e298988b41c5c2efbb11c9ca09e Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Tue, 20 Sep 2011 12:16:05 +0000 Subject: [PATCH] core: add missing real.cpp unit test. --- test/unit/real.cpp | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 test/unit/real.cpp diff --git a/test/unit/real.cpp b/test/unit/real.cpp new file mode 100644 index 00000000..18527e1d --- /dev/null +++ b/test/unit/real.cpp @@ -0,0 +1,37 @@ +// +// Lol Engine +// +// Copyright: (c) 2010-2011 Sam Hocevar +// This program is free software; you can redistribute it and/or +// modify it under the terms of the Do What The Fuck You Want To +// Public License, Version 2, as published by Sam Hocevar. See +// http://sam.zoy.org/projects/COPYING.WTFPL for more details. +// + +#if defined HAVE_CONFIG_H +# include "config.h" +#endif + +#include + +#include "core.h" +#include "lol/unit.h" + +namespace lol +{ + +LOLUNIT_FIXTURE(RealTest) +{ +public: + LOLUNIT_TEST(test_real_from_float) + { + float x = real4k(0.0f); + float y = real4k(1.0f); + + LOLUNIT_ASSERT_EQUAL(x, 0.0f); + LOLUNIT_ASSERT_EQUAL(y, 1.0f); + } +}; + +} /* namespace lol */ +