lejosunit.framework
Class FloatAssert

java.lang.Object
  extended bylejosunit.framework.Assert
      extended bylejosunit.framework.FloatAssert

public class FloatAssert
extends Assert

The class FloatAssert implements all methods related to float and Math libs. Use this class only if required, as Math lib will be linked, which requires much more memory.

Doubles are not yet supported, due to lejos limitations.

Author:
Jochen Hiller

Constructor Summary
protected FloatAssert()
          Protect constructor since it is a static only class
 
Method Summary
static void assertEquals(float expected, float actual, float delta)
          Asserts that two floats are equal concerning a delta.
static void assertEquals(java.lang.String message, float expected, float actual, float delta)
          Asserts that two floats are equal concerning a delta.
 
Methods inherited from class lejosunit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failSame
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FloatAssert

protected FloatAssert()
Protect constructor since it is a static only class

Method Detail

assertEquals

public static void assertEquals(java.lang.String message,
                                float expected,
                                float actual,
                                float delta)
Asserts that two floats are equal concerning a delta. If the expected value is infinity, then the delta value is ignored.

Parameters:
message - the assertion message
expected - the expected value
actual - the actual value to be tested
delta - the delta when two floats will be considered the same

assertEquals

public static void assertEquals(float expected,
                                float actual,
                                float delta)
Asserts that two floats are equal concerning a delta. If the expected value is infinity, then the delta value is ignored.

Parameters:
expected - the expected value
actual - the actual value to be tested
delta - the delta when two floats will be considered the same


Copyright (C) 2003 Jochen Hiller. All Rights Reserved.