#include <gtest/gtest.h>
#include <cmath>
#include <fstream>
#include "../dataChannelTestUtility.h"
#include "../taskTests.h"
#include "../../../software/signal_processing_bsp/system.h"
#include "../../data/rand.h"
#include "../../data/sine_cosine.h"
#include "../../data/add_rand.h"

int main( int argc, char ** argv ) {
    ::testing::InitGoogleTest(&argc, argv);
    return RUN_ALL_TESTS();
}

TEST( test_task_add_rand, execute_only ) {
    dataChannelFill( DATA_CHANNEL_2_BASE, expected_rand );
    dataChannelFill( DATA_CHANNEL_3_BASE, expected_add_sine_cosine );
    configureAndRunAddRand();
    dataChannelWriteToFile( DATA_CHANNEL_4_BASE, "data.py" );
}

TEST( test_task_add_rand, execute_and_check ) {
    dataChannelFill( DATA_CHANNEL_2_BASE, expected_rand );
    dataChannelFill( DATA_CHANNEL_3_BASE, expected_add_sine_cosine );
    configureAndRunAddRand();
    dataChannelCheckAndWriteToFile( DATA_CHANNEL_4_BASE, expected_add_rand, "data.py" );
}

