Improved consistency of number literals
All checks were successful
/ test (push) Successful in 19s

This commit is contained in:
Eduard Urbach 2025-07-03 13:45:39 +02:00
parent 47b4b1f1dd
commit cfc0f87c49
Signed by: akyoto
GPG key ID: 49226B848C78F6C8
4 changed files with 5 additions and 5 deletions

View file

@ -51,5 +51,5 @@ func WriteFile(executable string, b *build.Build, env *core.Environment) error {
return err return err
} }
return os.Chmod(executable, 0755) return os.Chmod(executable, 0o755)
} }

View file

@ -13,7 +13,7 @@ import (
func TestWriteFile(t *testing.T) { func TestWriteFile(t *testing.T) {
tmpDir := filepath.Join(os.TempDir(), "q", "tests") tmpDir := filepath.Join(os.TempDir(), "q", "tests")
err := os.MkdirAll(tmpDir, 0755) err := os.MkdirAll(tmpDir, 0o755)
assert.Nil(t, err) assert.Nil(t, err)
fromPath := "../../examples/hello/hello.q" fromPath := "../../examples/hello/hello.q"
@ -21,7 +21,7 @@ func TestWriteFile(t *testing.T) {
assert.Nil(t, err) assert.Nil(t, err)
toPath := filepath.Join(tmpDir, "hello.q") toPath := filepath.Join(tmpDir, "hello.q")
err = os.WriteFile(toPath, contents, 0755) err = os.WriteFile(toPath, contents, 0o755)
assert.Nil(t, err) assert.Nil(t, err)
b := build.New(toPath) b := build.New(toPath)

View file

@ -282,7 +282,7 @@ func TestStoreRegister(t *testing.T) {
{x86.R12, 1, 8, x86.R3, []byte{0x49, 0x89, 0x5C, 0x24, 0x01}}, {x86.R12, 1, 8, x86.R3, []byte{0x49, 0x89, 0x5C, 0x24, 0x01}},
{x86.R12, 1, 4, x86.R3, []byte{0x41, 0x89, 0x5C, 0x24, 0x01}}, {x86.R12, 1, 4, x86.R3, []byte{0x41, 0x89, 0x5C, 0x24, 0x01}},
{x86.R12, 1, 2, x86.R3, []byte{0x66, 0x41, 0x89, 0x5C, 0x24, 0x01}}, {x86.R12, 1, 2, x86.R3, []byte{0x66, 0x41, 0x89, 0x5C, 0x24, 0x01}},
{x86.R12, 1, 1, x86.R3, []byte{0x41, 0x88, 0x5C, 0x24, 01}}, {x86.R12, 1, 1, x86.R3, []byte{0x41, 0x88, 0x5C, 0x24, 0x01}},
{x86.R13, 1, 8, x86.R2, []byte{0x49, 0x89, 0x55, 0x01}}, {x86.R13, 1, 8, x86.R2, []byte{0x49, 0x89, 0x55, 0x01}},
{x86.R13, 1, 4, x86.R2, []byte{0x41, 0x89, 0x55, 0x01}}, {x86.R13, 1, 4, x86.R2, []byte{0x41, 0x89, 0x55, 0x01}},
{x86.R13, 1, 2, x86.R2, []byte{0x66, 0x41, 0x89, 0x55, 0x01}}, {x86.R13, 1, 2, x86.R2, []byte{0x66, 0x41, 0x89, 0x55, 0x01}},

View file

@ -49,7 +49,7 @@ func run(t *testing.T, path string, input string, expectedOutput string, expecte
assert.Nil(t, err) assert.Nil(t, err)
tmpDir := filepath.Join(os.TempDir(), "q", "tests") tmpDir := filepath.Join(os.TempDir(), "q", "tests")
err = os.MkdirAll(tmpDir, 0755) err = os.MkdirAll(tmpDir, 0o755)
assert.Nil(t, err) assert.Nil(t, err)
executable := b.Executable() executable := b.Executable()