Simplified config package
This commit is contained in:
@ -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)
|
||||
})
|
||||
}
|
||||
|
@ -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)
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user