Ejemplo n.º 1
0
def _data_bits_covered_test9():
    actual = [x for x in hamming._data_bits_covered(8, 13)]
    expected = [4, 5, 6, 7, 8, 9, 10]
    return (0, "") if actual == expected else (
        1,
        "_data_bits_covered_test9 FAILED! Expected: {0}, Actual: {1}\n".format(
            expected, actual))
Ejemplo n.º 2
0
def _data_bits_covered_test8():
    actual = [x for x in hamming._data_bits_covered(4, 14)]
    expected = [1, 2, 3, 7, 8, 9, 10]
    return (0, "") if actual == expected else (
        1,
        "_data_bits_covered_test8 FAILED! Expected: {0}, Actual: {1}\n".format(
            expected, actual))
Ejemplo n.º 3
0
def _data_bits_covered_test6():
    actual = [x for x in hamming._data_bits_covered(4, 1)]
    expected = []
    return (0, "") if actual == expected else (
        1,
        "_data_bits_covered_test6 FAILED! Expected: {0}, Actual: {1}\n".format(
            expected, actual))
Ejemplo n.º 4
0
def _data_bits_covered_test2():
    actual = [x for x in hamming._data_bits_covered(2, 7)]
    expected = [0, 2, 3, 5, 6]
    return (0, "") if actual == expected else (
        1,
        "_data_bits_covered_test2 FAILED! Expected: {0}, Actual: {1}\n".format(
            expected, actual))
Ejemplo n.º 5
0
def _data_bits_covered_test1():
    actual = [x for x in hamming._data_bits_covered(1, 14)]
    expected = [0, 1, 3, 4, 6, 8, 10, 11, 13]
    return (0, "") if actual == expected else (
        1,
        "_data_bits_covered_test1 FAILED! Expected: {0}, Actual: {1}\n".format(
            expected, actual))
Ejemplo n.º 6
0
def _data_bits_covered_test3():
    actual = [x for x in hamming._data_bits_covered(1, 33)]
    expected = [
        0, 1, 3, 4, 6, 8, 10, 11, 13, 15, 17, 19, 21, 23, 25, 26, 28, 30, 32
    ]
    return (0, "") if actual == expected else (
        1,
        "_data_bits_covered_test3 FAILED! Expected: {0}, Actual: {1}\n".format(
            expected, actual))
Ejemplo n.º 7
0
def _data_bits_covered_test12():
    actual = [x for x in hamming._data_bits_covered(16, 24)]
    expected = [11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23]
    return (0, "") if actual == expected else (
        1, "_data_bits_covered_test12 FAILED! Expected: {0}, Actual: {1}\n".
        format(expected, actual))