コード例 #1
0
ファイル: test_gf.py プロジェクト: eolo999/python-qrcode
def test_gf_add():
    gf = GaloisField()
    assert gf.add(141, 43) == 166
    assert gf.add(43, 178) == gf.subtract(43, 178)
コード例 #2
0
ファイル: test_gf.py プロジェクト: eolo999/python-qrcode
def test_gf_multiply():
    gf = GaloisField(256, 301)
    assert gf.multiply(14, 33) == 227
コード例 #3
0
ファイル: test_gf.py プロジェクト: eolo999/python-qrcode
def test_gf_alpha_power():
    gf = GaloisField()
    assert gf.alpha_power(0) == 1
    assert gf.alpha_power(1) == 2
    assert gf.alpha_power(9) == 58
コード例 #4
0
ファイル: test_gf.py プロジェクト: eolo999/python-qrcode
def test_gf_add():
    gf = GaloisField()
    assert gf.add(141, 43) == 166
    assert gf.add(43, 178) == gf.subtract(43, 178)
コード例 #5
0
ファイル: test_gf.py プロジェクト: eolo999/python-qrcode
def test_gf_multiply():
    gf = GaloisField(256, 301)
    assert gf.multiply(14, 33) == 227
コード例 #6
0
ファイル: test_gf.py プロジェクト: eolo999/python-qrcode
def test_gf_alpha_power():
    gf = GaloisField()
    assert gf.alpha_power(0) == 1
    assert gf.alpha_power(1) == 2
    assert gf.alpha_power(9) == 58