Doc - Describe buffers using Rustdoc comments (three slashes: ///)
Closed this issue · 5 comments
In an effort of having fully documented code, we need the way we write test output to the console to be documented.
In src/hints, please proceed to comment above the init_buffer
, clear_buffer
, get_buffer
and write_to_output_buffer
declarations in an equivalent way as pub fn compile
is documented.
Hi, I'm Ready to commit for this one.
Also, the test_single_entrypoint method has been modified to avoid panic! when the test result Error is not a CairoRunError and continue the process for the other tests.
Here is the output for cairo-foundry test
. Should I commit it with ?
% cargo run -- test
Finished dev [unoptimized + debuginfo] target(s) in 0.05sRunning `target/debug/cairo-foundry test`
Running tests in file ./test_cairo_hints/test_skip.cairo
[SKIPPED] test_skip_hint
Running tests in file ./test_cairo_hints/test_failing.cairo
[FAILED] test_failing_test
Error: VirtualMachine(DiffAssertValues(2, 3))
[OK] test_not_failing_test (348.577µs)
Running tests in file ./test_cairo_hints/test_mock_call.cairo
[OK] test_mock_call (454.874µs)
Running tests in file ./test_cairo_contracts/test_valid_program.cairo
[FAILED] test_array_sum_negative
Error: VirtualMachine(DiffAssertValues(55, 50))
[OK] test_array_sum_positive (1.277182ms)
[execution output]:
50
[OK] test_array_sum_positive2 (1.267754ms)
[execution output]:
55
Hi, I'm Ready to commit for this one. Also, the test_single_entrypoint method has been modified to avoid panic! when the test result Error is not a CairoRunError and continue the process for the other tests. Here is the output for
cairo-foundry test
. Should I commit it with ?% cargo run -- test Finished dev [unoptimized + debuginfo] target(s) in 0.05sRunning `target/debug/cairo-foundry test` Running tests in file ./test_cairo_hints/test_skip.cairo [SKIPPED] test_skip_hint Running tests in file ./test_cairo_hints/test_failing.cairo [FAILED] test_failing_test Error: VirtualMachine(DiffAssertValues(2, 3)) [OK] test_not_failing_test (348.577µs) Running tests in file ./test_cairo_hints/test_mock_call.cairo [OK] test_mock_call (454.874µs) Running tests in file ./test_cairo_contracts/test_valid_program.cairo [FAILED] test_array_sum_negative Error: VirtualMachine(DiffAssertValues(55, 50)) [OK] test_array_sum_positive (1.277182ms) [execution output]: 50 [OK] test_array_sum_positive2 (1.267754ms) [execution output]: 55
Do you mean you should commit this example of output inside the documentation?
No, I mean that I did a minor code change in addition of the comments to modify the behavior of the command cairo-foundry test. The output is the result of this modification when a user run 'cairo-foundry test' in the root project folder.