Commit c9d7d28b authored by rogerborg's avatar rogerborg

Add missing irrCoreEquals.cpp test file. Update changes.txt to note that...

Add missing irrCoreEquals.cpp test file.  Update changes.txt to note that position2d is now a synonym for vector2d.  Add proper doxygen \deprecated tags for position2d.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2001 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 77d97b18
Changes in version 1.6
- position2d is now a synonym for vector2d. position2d is therefore marked as deprecated, although it's unlikely to be removed.
- ISceneNodeAnimator now has a hasFinished() method.
- ISceneNodeAnimatorCollisionResponse exposes the target node. Setting the node again resets the last position, allowing the node to be teleported.
......
......@@ -2,25 +2,29 @@
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h
//! As of Irrlicht 1.6, position2d is a synonym for vector2d.
/** You should consider position2d to be deprecated, and use vector2d by preference. */
#ifndef __IRR_POSITION_H_INCLUDED__
#define __IRR_POSITION_H_INCLUDED__
// position2d is deprecated. It is currently defined as a vector2d, but
// vector2d should be used directly.
#include "vector2d.h"
namespace irr
{
namespace core
{
// Use explicit typedefs where possible
// Use typedefs where possible as they are more explicit...
//! \deprecated position2d is now a synonym for vector2d, but vector2d should be used directly.
typedef vector2d<f32> position2df;
//! \deprecated position2d is now a synonym for vector2d, but vector2d should be used directly.
typedef vector2d<s32> position2di;
}; // namespace core
}; // namespace irr
// And a #define to catch the rest
// ...and use a #define to catch the rest, for (e.g.) position2d<f64>
#define position2d vector2d
#endif // __IRR_POSITION_H_INCLUDED__
// Copyright (C) 2008 Colin MacDonald
// No rights reserved: this software is in the public domain.
#include "testUtils.h"
#include "irrlicht.h"
#include <assert.h>
bool irrCoreEquals(void)
{
if(!irr::core::equals(99.f, 99.f))
{
logTestString("irr::core::equals(f32, f32 (, default)) failed.\n");
return false;
}
if(!irr::core::equals(99.f, 98.f, 1.f))
{
logTestString("irr::core::equals(f32, f32, f32) failed.\n");
return false;
}
if(!irr::core::equals(99.0, 99.0))
{
logTestString("irr::core::equals(f64, f64 (,default)) failed.\n");
return false;
}
if(!irr::core::equals(99.0, 98.0, 1.0))
{
logTestString("irr::core::equals(f64, f64, f64) failed.\n");
return false;
}
if(!irr::core::equals(99, 99))
{
logTestString("irr::core::equals(s32, s32 (,default)) failed.\n");
return false;
}
if(!irr::core::equals(99, 98, 1))
{
logTestString("irr::core::equals(s32, s32, s32) failed.\n");
return false;
}
if(irr::core::equals(99, 98))
{
logTestString("irr::core::equals(s32, s32 (,default)) failed.\n");
return false;
}
if(irr::core::equals(99, 98, 0))
{
logTestString("irr::core::equals(s32, s32, 0) failed.\n");
return false;
}
if(!irr::core::equals(-99, -99))
{
logTestString("irr::core::equals(s32, s32 (,default)) failed.\n");
return false;
}
if(!irr::core::equals(-99, -98, 1))
{
logTestString("irr::core::equals(s32, s32, s32) failed.\n");
return false;
}
if(irr::core::equals(-99, -98))
{
logTestString("irr::core::equals(s32, s32 (,default)) failed.\n");
return false;
}
if(irr::core::equals(-99, -98, 0))
{
logTestString("irr::core::equals(s32, s32, 0) failed.\n");
return false;
}
return true;
}
\ No newline at end of file
Test suite pass at GMT Mon Dec 29 16:01:24 2008
Test suite pass at GMT Mon Dec 29 16:29:44 2008
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment