gen2_test.go 446 B

1234567891011121314151617181920212223242526
  1. // Code generated by golang.org/x/text/internal/gen/bitfield. DO NOT EDIT.
  2. package bitfield
  3. type myInt2 uint32
  4. func (m myInt2) fob() uint16 {
  5. return uint16((m >> 12) & 0xffff)
  6. }
  7. func (m myInt2) baz() int8 {
  8. return int8((m >> 7) & 0x1f)
  9. }
  10. func (m myInt2) bar() myUint8 {
  11. return myUint8((m >> 4) & 0x7)
  12. }
  13. func (m myInt2) Bool() bool {
  14. const bit = 1 << 3
  15. return m&bit == bit
  16. }
  17. func (m myInt2) Baz() int8 {
  18. return int8((m >> 0) & 0x7)
  19. }