File: test_trait_impl.rs

package info (click to toggle)
rust-g2p 1.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 160 kB
  • sloc: makefile: 2
file content (14 lines) | stat: -rw-r--r-- 336 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use g2p::{GaloisField, G2Poly, g2p};


g2p!(GF256, 8, modulus: 0b1_0001_1011);

#[test]
fn test_build() {
    static_assertions::assert_impl_all!(GF256: GaloisField);

    assert_eq!(GF256::SIZE, 256);
    assert_eq!(GF256::MODULUS, G2Poly(0b1_0001_1011));
    assert_eq!(GF256(0), GF256::ZERO);
    assert_eq!(GF256(1), GF256::ONE);
}