Hi, I have the following code for a C++ audio project. This header will be used as the audio buffer that holds the sample in double precision and it is passed through the different audio processor. Please provide a feedback if any unit testing has to be implemented and in case provide provide an implementation or craft a draft using Catch2.
~
#ifndef AUDIO_BUFFER_HPP
#define AUDIO_BUFFER_HPP

#include <vector>
#include <stdexcept>

/*
 * @class AudioBuffer
 * @brief Manages an audio buffer with efficient resizing and capacity management.
 *
 * The AudioBuffer class encapsulates a dynamically resizable buffer for audio data,
 * providing methods to reserve capacity and resize the buffer while minimizing
 * memory reallocations. It supports move semantics for efficient resource management.
 * Actually it is not thread-safe, for this reason consider properly a multi-threading scenario.
 */
class AudioBuffer
{
public:
    /*
     *@brief Constructs an AudioBuffer with an initial size.
     *@param initialSize Initial size of the buffer.
     */
    explicit AudioBuffer(size_t initialSize = 0)
        : buffer(initialSize),
          capacity(initialSize) {}

    /*
     *@brief Gets the current size of the buffer.* @ return The size of the buffer.*/
    size_t GetSize() const noexcept
    {
        return buffer.size();
    }

    /*
     * @brief Reserves capacity for the buffer to minimize reallocations.
     * @param newCapacity The new capacity to reserve.
     *
     * Increases the capacity of the buffer if newCapacity is larger than the current capacity.
     */
    void Reserve(size_t newCapacity)
    {
        if (newCapacity > capacity)
        {
            buffer.reserve(newCapacity);
            capacity = newCapacity;
        }
    }

    /*
     * @brief Resizes the buffer to a new size.
     * @param newSize The new size of the buffer.
     * @throw std::invalid_argument if newSize is negative.
     */
    void Resize(size_t newSize)
    {
        if (newSize < 0)
        {
            throw std::invalid_argument("New size must be non - negative.");
        }
        Reserve(newSize);
        buffer.resize(newSize);
    }

    /*
     * @brief Gets a pointer to the buffer data.
     * @return A pointer to the buffer data.*/
    float *Data() noexcept
    {
        return buffer.data();
    }

    /*
    * @brief Gets a const pointer to the buffer data.
    * @return A const pointer to the buffer data.
    */
    const float *Data() const noexcept
    {
        return buffer.data();
    }

    /*
    * @brief Move constructor.
    * @param other The AudioBuffer to move from.
    */
    AudioBuffer(AudioBuffer &&other) noexcept
        : buffer(std::move(other.buffer)),
          capacity(other.capacity)
    {
        other.capacity = 0;
    }

    /**
     * @brief Move assignment operator.
     * @param other The AudioBuffer to move from.
     * @return A reference to this AudioBuffer.
     */
    AudioBuffer &operator=(AudioBuffer &&other) noexcept
    {
        if (this != &other)
        {
            buffer = std::move(other.buffer);
            capacity = other.capacity;
            other.capacity = 0;
        }
        return *this;
    }

    // Disable copy constructor and copy assignment
    AudioBuffer(const AudioBuffer &) = delete;
    AudioBuffer &operator=(const AudioBuffer &) = delete;

private:
    std::vector<float> buffer; ///< The underlying vector storing audio data.
    size_t capacity;           ///< The allocated capacity of the buffer to minimize resizing.
};

#endif // AUDIO_BUFFER_HPP