/** \file
 *
 *  Contains the test cases for the FlexArray class
 *
 *  Copyright (c) 2007,2008,2009 MBARI
 *  MBARI Proprietary Information.  All Rights Reserved
 */

#ifndef _FLEXARRAY_TEST_H_
#define _FLEXARRAY_TEST_H_

#include "utils/FlexArray.h"
#include "utils/Str.h"

#include <cxxtest/TestSuite.h>

/**
 * %Units tests for class FlexArray
 *
 * \ingroup utils
 */
class FlexArray_Test : public CxxTest::TestSuite
{
public:

    /// FlexArray Test - heap-allocated storage
    void testPush( void )
    {
        FlexArray<Str*> array( false );
        Str str0( "0" );
        Str str1( "1" );
        TS_ASSERT_EQUALS( array.size(), 0U );
        array.push( &str0 );
        TS_ASSERT_EQUALS( array.size(), 1U );
        array.push( &str1 );
        TS_ASSERT_EQUALS( array.size(), 2U );
    }
};

#endif // _FLEXARRAY_TEST_H
