fix(ci): formatting;
This commit is contained in:
parent
28182e1a5f
commit
a5cf5cb5d2
10 changed files with 226 additions and 226 deletions
|
|
@ -1,108 +1,108 @@
|
|||
-- Unit tests for code compilation and execution
|
||||
describe("cp.execute", function()
|
||||
describe('cp.execute', function()
|
||||
local execute
|
||||
local temp_dir
|
||||
local test_files = {}
|
||||
|
||||
before_each(function()
|
||||
execute = require("cp.execute")
|
||||
execute = require('cp.execute')
|
||||
temp_dir = vim.fn.tempname()
|
||||
vim.fn.mkdir(temp_dir, "p")
|
||||
vim.fn.mkdir(temp_dir, 'p')
|
||||
vim.api.nvim_set_current_dir(temp_dir)
|
||||
|
||||
-- Create sample source files for testing
|
||||
test_files.cpp = temp_dir .. "/test.cpp"
|
||||
test_files.python = temp_dir .. "/test.py"
|
||||
test_files.rust = temp_dir .. "/test.rs"
|
||||
test_files.cpp = temp_dir .. '/test.cpp'
|
||||
test_files.python = temp_dir .. '/test.py'
|
||||
test_files.rust = temp_dir .. '/test.rs'
|
||||
|
||||
-- Write simple test programs
|
||||
vim.fn.writefile({
|
||||
'#include <iostream>',
|
||||
'int main() { std::cout << "Hello" << std::endl; return 0; }'
|
||||
'int main() { std::cout << "Hello" << std::endl; return 0; }',
|
||||
}, test_files.cpp)
|
||||
|
||||
vim.fn.writefile({
|
||||
'print("Hello")'
|
||||
'print("Hello")',
|
||||
}, test_files.python)
|
||||
end)
|
||||
|
||||
after_each(function()
|
||||
vim.fn.delete(temp_dir, "rf")
|
||||
vim.fn.delete(temp_dir, 'rf')
|
||||
end)
|
||||
|
||||
describe("compilation", function()
|
||||
it("compiles C++ code successfully", function()
|
||||
describe('compilation', function()
|
||||
it('compiles C++ code successfully', function()
|
||||
-- Test C++ compilation
|
||||
end)
|
||||
|
||||
it("compiles Rust code successfully", function()
|
||||
it('compiles Rust code successfully', function()
|
||||
-- Test Rust compilation
|
||||
end)
|
||||
|
||||
it("handles compilation errors", function()
|
||||
it('handles compilation errors', function()
|
||||
-- Test error handling for bad code
|
||||
end)
|
||||
|
||||
it("applies optimization flags correctly", function()
|
||||
it('applies optimization flags correctly', function()
|
||||
-- Test optimization settings
|
||||
end)
|
||||
|
||||
it("handles debug flag correctly", function()
|
||||
it('handles debug flag correctly', function()
|
||||
-- Test debug compilation
|
||||
end)
|
||||
end)
|
||||
|
||||
describe("execution", function()
|
||||
it("runs compiled programs", function()
|
||||
describe('execution', function()
|
||||
it('runs compiled programs', function()
|
||||
-- Test program execution
|
||||
end)
|
||||
|
||||
it("handles runtime errors", function()
|
||||
it('handles runtime errors', function()
|
||||
-- Test runtime error handling
|
||||
end)
|
||||
|
||||
it("enforces time limits", function()
|
||||
it('enforces time limits', function()
|
||||
-- Test timeout handling
|
||||
end)
|
||||
|
||||
it("captures output correctly", function()
|
||||
it('captures output correctly', function()
|
||||
-- Test stdout/stderr capture
|
||||
end)
|
||||
|
||||
it("handles large inputs/outputs", function()
|
||||
it('handles large inputs/outputs', function()
|
||||
-- Test large data handling
|
||||
end)
|
||||
end)
|
||||
|
||||
describe("test case execution", function()
|
||||
it("runs single test case", function()
|
||||
describe('test case execution', function()
|
||||
it('runs single test case', function()
|
||||
-- Test individual test case execution
|
||||
end)
|
||||
|
||||
it("runs multiple test cases", function()
|
||||
it('runs multiple test cases', function()
|
||||
-- Test batch execution
|
||||
end)
|
||||
|
||||
it("compares outputs correctly", function()
|
||||
it('compares outputs correctly', function()
|
||||
-- Test output comparison logic
|
||||
end)
|
||||
|
||||
it("handles edge cases in output comparison", function()
|
||||
it('handles edge cases in output comparison', function()
|
||||
-- Test whitespace, newlines, etc.
|
||||
end)
|
||||
end)
|
||||
|
||||
describe("platform-specific execution", function()
|
||||
it("works on Linux", function()
|
||||
describe('platform-specific execution', function()
|
||||
it('works on Linux', function()
|
||||
-- Test Linux-specific behavior
|
||||
end)
|
||||
|
||||
it("works on macOS", function()
|
||||
it('works on macOS', function()
|
||||
-- Test macOS-specific behavior
|
||||
end)
|
||||
|
||||
it("works on Windows", function()
|
||||
it('works on Windows', function()
|
||||
-- Test Windows-specific behavior
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue