//[Test] public void GenerateTestCases() { var random = new Random(); using (var testData = File.CreateText(PulseEncoderTestCases)) { for (int i = 0; i < 100; i++) { var message = (ushort)random.Next(0xFFFF); var messageString = MessageToString(message); var pulse = IrPulseEncoder.Encode(message); var pulseString = GetPulseString(pulse); var line = string.Format("0x{0:X4};{1};{2}", message, messageString, pulseString); testData.WriteLine(line); } } }
public string RunTestCases(ushort message) { ushort[] data = IrPulseEncoder.Encode(message); return(GetPulseString(data)); }