def test_002_one_vector(self):
        block_power = 4
        block_size = 2 ** block_power
        num_info_bits = block_size // 2
        frozen_bit_positions = cc.frozen_bit_positions(block_size, num_info_bits, 0.0)

        bits, gr_data = self.generate_test_data(block_size, num_info_bits, frozen_bit_positions, 1, False)

        polar_decoder = fec.polar_decoder_sc_systematic.make(block_size, num_info_bits, frozen_bit_positions)
        src = blocks.vector_source_f(gr_data, False)
        dec_block = extended_decoder(polar_decoder, None)
        snk = blocks.vector_sink_b(1)

        self.tb.connect(src, dec_block)
        self.tb.connect(dec_block, snk)
        self.tb.run()

        res = np.array(snk.data()).astype(dtype=int)
        self.assertTupleEqual(tuple(res), tuple(bits))
    def test_002_one_vector(self):
        block_power = 4
        block_size = 2 ** block_power
        num_info_bits = block_size // 2
        frozen_bit_positions = cc.frozen_bit_positions(block_size, num_info_bits, 0.0)

        bits, gr_data = self.generate_test_data(block_size, num_info_bits, frozen_bit_positions, 1, False)

        polar_decoder = fec.polar_decoder_sc_systematic.make(block_size, num_info_bits, frozen_bit_positions)
        src = blocks.vector_source_f(gr_data, False)
        dec_block = extended_decoder(polar_decoder, None)
        snk = blocks.vector_sink_b(1)

        self.tb.connect(src, dec_block)
        self.tb.connect(dec_block, snk)
        self.tb.run()

        res = np.array(snk.data()).astype(dtype=int)
        self.assertTupleEqual(tuple(res), tuple(bits))