opt-test: Move some variable declarations to avoid block braces