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

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

TEST( test_task_add_sine_cosine, execute_only ) {
    dataChannelFill( DATA_CHANNEL_0_BASE, expected_sine );
    dataChannelFill( DATA_CHANNEL_1_BASE, expected_cosine );
    configureAndRunAddSineCosine();
    dataChannelWriteToFile( DATA_CHANNEL_3_BASE, "data.py" );
}

TEST( test_task_add_sine_cosine, execute_and_check ) {
    dataChannelFill( DATA_CHANNEL_0_BASE, expected_sine );
    dataChannelFill( DATA_CHANNEL_1_BASE, expected_cosine );
    configureAndRunAddSineCosine();
    dataChannelCheckAndWriteToFile( DATA_CHANNEL_3_BASE, expected_add_sine_cosine, "data.py" );
}

