#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "media/midi/message_util.h"
#include <stdint.h>
#include "testing/gtest/include/gtest/gtest.h"
namespace midi {
namespace {
const uint8_t kGMOn[] = …;
const uint8_t kGSOn[] = …;
const uint8_t kNoteOn[] = …;
const uint8_t kNoteOnWithRunningStatus[] = …;
const uint8_t kNoteOnWithRealTimeClock[] = …;
const uint8_t kGMOnWithRealTimeClock[] = …;
const uint8_t kSystemCommonMessageReserved1[] = …;
const uint8_t kSystemCommonMessageReserved2[] = …;
const uint8_t kSystemCommonMessageTuneRequest[] = …;
const uint8_t kChannelPressure[] = …;
const uint8_t kChannelPressureWithRunningStatus[] = …;
const uint8_t kTimingClock[] = …;
const uint8_t kBrokenData1[] = …;
const uint8_t kBrokenData2[] = …;
const uint8_t kBrokenData3[] = …;
const uint8_t kDataByte0[] = …;
template <typename T, size_t N>
const std::vector<T> AsVector(const T (&data)[N]) { … }
template <typename T, size_t N>
void PushToVector(const T (&data)[N], std::vector<T>* buffer) { … }
TEST(MidiMessageUtilTest, GetMessageLength) { … }
TEST(MidiMessageUtilTest, IsValidWebMIDIData) { … }
}
}