-- Do not edit! This file was generated by blocks/protocol/varicodedecoder_spec.py

local radio = require('radio')
local jigs = require('tests.jigs')

jigs.TestBlock(radio.VaricodeDecoderBlock, {
    {
        desc = "Valid message",
        args = {},
        inputs = {radio.types.Bit.vector_from_array({0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0})},
        outputs = {radio.types.Byte.vector_from_array({0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x57, 0x6f, 0x72, 0x6c, 0x64})}
    },
    {
        desc = "Valid message with extra leading 0 bit",
        args = {},
        inputs = {radio.types.Bit.vector_from_array({0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0})},
        outputs = {radio.types.Byte.vector_from_array({0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x57, 0x6f, 0x72, 0x6c, 0x64})}
    },
    {
        desc = "Empty message",
        args = {},
        inputs = {radio.types.Bit.vector_from_array({0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0})},
        outputs = {radio.types.Byte.vector_from_array({})}
    },
}, {epsilon = 1.0e-06})
