Simplified config package

This commit is contained in:
2025-02-17 23:36:11 +01:00
parent b7685fd7ec
commit 3b76919fec
10 changed files with 68 additions and 66 deletions

View File

@ -33,12 +33,12 @@ func TestExamples(t *testing.T) {
directory := filepath.Join("..", "examples", test.Name)
t.Run(test.Name+"/debug", func(t *testing.T) {
config.ConstantFold = false
config.Optimize(false)
run(t, directory, "debug", test.Input, test.Output, test.ExitCode)
})
t.Run(test.Name+"/release", func(t *testing.T) {
config.ConstantFold = true
config.Optimize(true)
run(t, directory, "release", test.Input, test.Output, test.ExitCode)
})
}

View File

@ -71,12 +71,12 @@ func TestPrograms(t *testing.T) {
file := filepath.Join("programs", test.Name+".q")
t.Run(test.Name+"/debug", func(t *testing.T) {
config.ConstantFold = false
config.Optimize(false)
run(t, file, "debug", test.Input, test.Output, test.ExitCode)
})
t.Run(test.Name+"/release", func(t *testing.T) {
config.ConstantFold = true
config.Optimize(true)
run(t, file, "release", test.Input, test.Output, test.ExitCode)
})
}