mirror of
https://github.com/vlang/v.git
synced 2025-09-13 22:42:26 +03:00
fmt: fix alignment of struct init fields (#22025)
This commit is contained in:
parent
99da5726db
commit
c51d30bf53
671 changed files with 18817 additions and 18787 deletions
|
@ -41,53 +41,53 @@ fn new(x u64, y u64) unsigned.Uint128 {
|
|||
fn test_leading_zeros() {
|
||||
tcs := [
|
||||
LeadingZeros{
|
||||
l: new(0x00, 0xf000000000000000)
|
||||
r: new(0x00, 0x8000000000000000)
|
||||
l: new(0x00, 0xf000000000000000)
|
||||
r: new(0x00, 0x8000000000000000)
|
||||
zeros: 1
|
||||
},
|
||||
LeadingZeros{
|
||||
l: new(0x00, 0xf000000000000000)
|
||||
r: new(0x00, 0xc000000000000000)
|
||||
l: new(0x00, 0xf000000000000000)
|
||||
r: new(0x00, 0xc000000000000000)
|
||||
zeros: 2
|
||||
},
|
||||
LeadingZeros{
|
||||
l: new(0x00, 0xf000000000000000)
|
||||
r: new(0x00, 0xe000000000000000)
|
||||
l: new(0x00, 0xf000000000000000)
|
||||
r: new(0x00, 0xe000000000000000)
|
||||
zeros: 3
|
||||
},
|
||||
LeadingZeros{
|
||||
l: new(0x00, 0xffff000000000000)
|
||||
r: new(0x00, 0xff00000000000000)
|
||||
l: new(0x00, 0xffff000000000000)
|
||||
r: new(0x00, 0xff00000000000000)
|
||||
zeros: 8
|
||||
},
|
||||
LeadingZeros{
|
||||
l: new(0x00, 0x000000000000ffff)
|
||||
r: new(0x00, 0x000000000000ff00)
|
||||
l: new(0x00, 0x000000000000ffff)
|
||||
r: new(0x00, 0x000000000000ff00)
|
||||
zeros: 56
|
||||
},
|
||||
LeadingZeros{
|
||||
l: new(0xf000000000000000, 0x01)
|
||||
r: new(0x4000000000000000, 0x00)
|
||||
l: new(0xf000000000000000, 0x01)
|
||||
r: new(0x4000000000000000, 0x00)
|
||||
zeros: 63
|
||||
},
|
||||
LeadingZeros{
|
||||
l: new(0xf000000000000000, 0x00)
|
||||
r: new(0x4000000000000000, 0x00)
|
||||
l: new(0xf000000000000000, 0x00)
|
||||
r: new(0x4000000000000000, 0x00)
|
||||
zeros: 64
|
||||
},
|
||||
LeadingZeros{
|
||||
l: new(0xf000000000000000, 0x00)
|
||||
r: new(0x8000000000000000, 0x00)
|
||||
l: new(0xf000000000000000, 0x00)
|
||||
r: new(0x8000000000000000, 0x00)
|
||||
zeros: 65
|
||||
},
|
||||
LeadingZeros{
|
||||
l: new(0x00, 0x00)
|
||||
r: new(0x00, 0x00)
|
||||
l: new(0x00, 0x00)
|
||||
r: new(0x00, 0x00)
|
||||
zeros: 128
|
||||
},
|
||||
LeadingZeros{
|
||||
l: new(0x01, 0x00)
|
||||
r: new(0x00, 0x00)
|
||||
l: new(0x01, 0x00)
|
||||
r: new(0x00, 0x00)
|
||||
zeros: 127
|
||||
},
|
||||
]
|
||||
|
|
|
@ -138,53 +138,53 @@ fn new(x unsigned.Uint128, y unsigned.Uint128) unsigned.Uint256 {
|
|||
fn test_leading_zeros() {
|
||||
tcs := [
|
||||
LeadingZeros{
|
||||
l: new(unsigned.uint128_from_64(0x00), unsigned.uint128_from_64(0xf000000000000000))
|
||||
r: new(unsigned.uint128_from_64(0x00), unsigned.uint128_from_64(0x8000000000000000))
|
||||
l: new(unsigned.uint128_from_64(0x00), unsigned.uint128_from_64(0xf000000000000000))
|
||||
r: new(unsigned.uint128_from_64(0x00), unsigned.uint128_from_64(0x8000000000000000))
|
||||
zeros: 65
|
||||
},
|
||||
LeadingZeros{
|
||||
l: new(unsigned.uint128_from_64(0x00), unsigned.uint128_from_64(0xf000000000000000))
|
||||
r: new(unsigned.uint128_from_64(0x00), unsigned.uint128_from_64(0xc000000000000000))
|
||||
l: new(unsigned.uint128_from_64(0x00), unsigned.uint128_from_64(0xf000000000000000))
|
||||
r: new(unsigned.uint128_from_64(0x00), unsigned.uint128_from_64(0xc000000000000000))
|
||||
zeros: 66
|
||||
},
|
||||
LeadingZeros{
|
||||
l: new(unsigned.uint128_from_64(0x00), unsigned.uint128_from_64(0xf000000000000000))
|
||||
r: new(unsigned.uint128_from_64(0x00), unsigned.uint128_from_64(0xe000000000000000))
|
||||
l: new(unsigned.uint128_from_64(0x00), unsigned.uint128_from_64(0xf000000000000000))
|
||||
r: new(unsigned.uint128_from_64(0x00), unsigned.uint128_from_64(0xe000000000000000))
|
||||
zeros: 67
|
||||
},
|
||||
LeadingZeros{
|
||||
l: new(unsigned.uint128_from_64(0x00), unsigned.uint128_from_64(0xffff000000000000))
|
||||
r: new(unsigned.uint128_from_64(0x00), unsigned.uint128_from_64(0xff00000000000000))
|
||||
l: new(unsigned.uint128_from_64(0x00), unsigned.uint128_from_64(0xffff000000000000))
|
||||
r: new(unsigned.uint128_from_64(0x00), unsigned.uint128_from_64(0xff00000000000000))
|
||||
zeros: 72
|
||||
},
|
||||
LeadingZeros{
|
||||
l: new(unsigned.uint128_from_64(0x00), unsigned.uint128_from_64(0x000000000000ffff))
|
||||
r: new(unsigned.uint128_from_64(0x00), unsigned.uint128_from_64(0x000000000000ff00))
|
||||
l: new(unsigned.uint128_from_64(0x00), unsigned.uint128_from_64(0x000000000000ffff))
|
||||
r: new(unsigned.uint128_from_64(0x00), unsigned.uint128_from_64(0x000000000000ff00))
|
||||
zeros: 120
|
||||
},
|
||||
LeadingZeros{
|
||||
l: new(unsigned.uint128_from_64(0xf000000000000000), unsigned.uint128_from_64(0x01))
|
||||
r: new(unsigned.uint128_from_64(0x4000000000000000), unsigned.uint128_from_64(0x00))
|
||||
l: new(unsigned.uint128_from_64(0xf000000000000000), unsigned.uint128_from_64(0x01))
|
||||
r: new(unsigned.uint128_from_64(0x4000000000000000), unsigned.uint128_from_64(0x00))
|
||||
zeros: 127
|
||||
},
|
||||
LeadingZeros{
|
||||
l: new(unsigned.uint128_from_64(0xf000000000000000), unsigned.uint128_from_64(0x00))
|
||||
r: new(unsigned.uint128_from_64(0x4000000000000000), unsigned.uint128_from_64(0x00))
|
||||
l: new(unsigned.uint128_from_64(0xf000000000000000), unsigned.uint128_from_64(0x00))
|
||||
r: new(unsigned.uint128_from_64(0x4000000000000000), unsigned.uint128_from_64(0x00))
|
||||
zeros: 192
|
||||
},
|
||||
LeadingZeros{
|
||||
l: new(unsigned.uint128_from_64(0xf000000000000000), unsigned.uint128_from_64(0x00))
|
||||
r: new(unsigned.uint128_from_64(0x8000000000000000), unsigned.uint128_from_64(0x00))
|
||||
l: new(unsigned.uint128_from_64(0xf000000000000000), unsigned.uint128_from_64(0x00))
|
||||
r: new(unsigned.uint128_from_64(0x8000000000000000), unsigned.uint128_from_64(0x00))
|
||||
zeros: 193
|
||||
},
|
||||
LeadingZeros{
|
||||
l: new(unsigned.uint128_from_64(0x00), unsigned.uint128_from_64(0x00))
|
||||
r: new(unsigned.uint128_from_64(0x00), unsigned.uint128_from_64(0x00))
|
||||
l: new(unsigned.uint128_from_64(0x00), unsigned.uint128_from_64(0x00))
|
||||
r: new(unsigned.uint128_from_64(0x00), unsigned.uint128_from_64(0x00))
|
||||
zeros: 256
|
||||
},
|
||||
LeadingZeros{
|
||||
l: new(unsigned.uint128_from_64(0x01), unsigned.uint128_from_64(0x00))
|
||||
r: new(unsigned.uint128_from_64(0x00), unsigned.uint128_from_64(0x00))
|
||||
l: new(unsigned.uint128_from_64(0x01), unsigned.uint128_from_64(0x00))
|
||||
r: new(unsigned.uint128_from_64(0x00), unsigned.uint128_from_64(0x00))
|
||||
zeros: 255
|
||||
},
|
||||
]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue