gen1_test.go 441 B

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