66 lines
2.8 KiB
C++
66 lines
2.8 KiB
C++
#ifdef _USE_GTEST
|
|
#ifndef TEST_CPP_H
|
|
#define TEST_CPP_H
|
|
#include "global.h"
|
|
|
|
|
|
// Define the test fixture
|
|
class TellTest : public ::testing::Test {
|
|
protected:
|
|
std::vector<std::string> messages = {
|
|
"8D406B902015A678D4D220AA4BDA",
|
|
"8FC8200A3AB8F5F893096B000000",
|
|
"8D40058B58C901375147EFD09357",
|
|
"8D485020994409940838175B284F",
|
|
"A000083E202CC371C31DE0AA1CCF",
|
|
"A8001E2520053332C1A820363386",
|
|
"A000029C85E42F313000007047D3",
|
|
"A5DC282C2A0108372CA6DA9693B0",
|
|
"A00015B8C26A00328400004242DA",
|
|
"A000139381951536E024D4CCF6B5",
|
|
"A00004128F39F91A7E27C46ADC21"
|
|
};
|
|
};
|
|
|
|
// 7BD014; msg:A000149CBEB00030A200009FF2A6
|
|
// 7BD014; msg:A000149CBEB00030A200009FF2A6
|
|
// 7BD014; msg:A8000134E80A2F30601400CD499D
|
|
// 7BD014; msg:A000149CBEB00030A200009FF2A6
|
|
TEST_F(TellTest, ProcessMessages) {
|
|
//auto it = hex2bin("A000149CBEB00030A200009FF2A6");
|
|
auto it = hex2bin("A0001838CA380031440000F24177");
|
|
//std::cout << tell(it) << std::endl;
|
|
// for (auto it2 : infer2(it))
|
|
// {
|
|
// std::cout << it2 << std::endl;
|
|
// }
|
|
//std::cout << "dp check " << with_DP::check_crc(it, ::decode_icao(it), "40") << std::endl;
|
|
//std::cout << "Ap check " << with_AP::check_crc(it, ::decode_icao(it), "40") << std::endl;
|
|
|
|
//std::cout << tell(hex2bin("A00011308014C73CFFFCC6B41B14")) << std::endl;
|
|
//std::cout << tell(hex2bin("A0001130A9AA1929A027FF4B6582")) << std::endl;
|
|
//std::cout << tell(hex2bin("02E19130115129")) << std::endl;
|
|
// std::cout << tell(hex2bin("5D781BD49E7ABE")) << std::endl;
|
|
// std::cout << tell(hex2bin("A00011308014C73CE00CC67DD4F4")) << std::endl;
|
|
// std::cout << tell(hex2bin("A80017BCB3FD9FF0A80000B30D25")) << std::endl;
|
|
// std::cout << tell(hex2bin("A0001130B3FD9FF0A800003C4AF0")) << std::endl;
|
|
// std::cout << tell(hex2bin("5D781BD49E7ABE")) << std::endl;
|
|
// std::cout << tell(hex2bin("8D781BD4EA3408654D3C08355231")) << std::endl;
|
|
//std::cout << tell(hex2bin("8D781BD4588B04830107A904023E")) << std::endl;
|
|
// std::cout << tell(hex2bin("8D781BD49909D0927804ABF00996")) << std::endl;
|
|
//std::cout << tell(hex2bin("8D781BD4F82100020049B8C1FAD8")) << std::endl;
|
|
//std::cout << tell(hex2bin("8D781BD4588B00ECFDB4ED938DF7")) << std::endl;
|
|
|
|
//auto pos = airborne_position(hex2bin("8D781BD4588B04830107A904023E"), hex2bin("8D781BD4588B00ECFDB4ED938DF7"), 0, 1).value();
|
|
//std::cout << pos.latitude << " " << pos.longitude << std::endl;
|
|
//std::cout << tell(hex2bin("8D781BD49909D0927804ABF00996")) << std::endl;
|
|
//std::cout << tell(hex2bin("A0001130B3FD9FF0A800003C4AF0")) << std::endl;
|
|
//std::cout << tell(hex2bin("280017BC94F468")) << std::endl;
|
|
//std::cout << tell(hex2bin("A0001130B3FD9FF0A800003C4AF0")) << std::endl;
|
|
|
|
}
|
|
|
|
|
|
#endif
|
|
|
|
#endif |