Studentenversion des ESY6/A Praktikums "signal_processing".
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

test_task_add_sine_cosine.cc 976B

1234567891011121314151617181920212223242526272829
  1. #include <gtest/gtest.h>
  2. #include <cmath>
  3. #include <fstream>
  4. #include "../dataChannelTestUtility.h"
  5. #include "../taskTests.h"
  6. #include "../../../software/signal_processing_bsp/system.h"
  7. #include "../../data/sine.h"
  8. #include "../../data/cosine.h"
  9. #include "../../data/sine_cosine.h"
  10. int main( int argc, char ** argv ) {
  11. ::testing::InitGoogleTest(&argc, argv);
  12. return RUN_ALL_TESTS();
  13. }
  14. TEST( test_task_add_sine_cosine, execute_only ) {
  15. dataChannelFill( DATA_CHANNEL_0_BASE, expected_sine );
  16. dataChannelFill( DATA_CHANNEL_1_BASE, expected_cosine );
  17. configureAndRunAddSineCosine();
  18. dataChannelWriteToFile( DATA_CHANNEL_3_BASE, "data.py" );
  19. }
  20. TEST( test_task_add_sine_cosine, execute_and_check ) {
  21. dataChannelFill( DATA_CHANNEL_0_BASE, expected_sine );
  22. dataChannelFill( DATA_CHANNEL_1_BASE, expected_cosine );
  23. configureAndRunAddSineCosine();
  24. dataChannelCheckAndWriteToFile( DATA_CHANNEL_3_BASE, expected_add_sine_cosine, "data.py" );
  25. }