Никола качи първо решение на 10.01.2023 10:53 (преди почти 3 години)
Напомням ти условието:
PRINT <стойност>: При изпълнение ще напечата дадената стойност и нов ред (символ \n).
Compiling solution v0.1.0 (/tmp/d20230111-3772066-158gudn/solution)
Finished test [unoptimized + debuginfo] target(s) in 1.47s
Running tests/solution_test.rs (target/debug/deps/solution_test-0edbea2040daef01)
running 15 tests
test solution_test::test_basic_if ... ok
test solution_test::test_basic_goto ... ok
test solution_test::test_basic_print ... ok
test solution_test::test_basic_input ... ok
test solution_test::test_erroring_goto ... ok
test solution_test::test_basic_read ... ok
test solution_test::test_io_error_read ... ok
test solution_test::test_io_error_write ... ok
test solution_test::test_full_program ... FAILED
test solution_test::test_line_order_and_overwriting ... ok
test solution_test::test_print_cyrillic ... FAILED
test solution_test::test_print_vars_and_strings ... FAILED
test solution_test::test_syntax_errors_1 ... FAILED
test solution_test::test_runtime_errors ... FAILED
test solution_test::test_syntax_errors_2 ... ok
failures:
---- solution_test::test_full_program stdout ----
["READ", "Guess"]
["PRINT", "too_high"]
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: RuntimeError { line_number: 100, message: "Error" }', tests/solution_test.rs:245:31
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'solution_test::test_full_program' panicked at 'called `Result::unwrap()` on an `Err` value: RuntimeError { line_number: 100, message: "Error" }', tests/solution_test.rs:230:5
---- solution_test::test_print_cyrillic stdout ----
["READ", "Щ"]
["READ", "Юнак"]
["PRINT", "Щ"]
["PRINT", "Юнак"]
["PRINT", "евала"]
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: RuntimeError { line_number: 50, message: "Error" }', tests/solution_test.rs:171:31
thread 'solution_test::test_print_cyrillic' panicked at 'called `Result::unwrap()` on an `Err` value: RuntimeError { line_number: 50, message: "Error" }', tests/solution_test.rs:160:5
---- solution_test::test_print_vars_and_strings stdout ----
["READ", "A"]
["READ", "Abc"]
["PRINT", "A"]
["PRINT", "Abc"]
["PRINT", "abc"]
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: RuntimeError { line_number: 50, message: "Error" }', tests/solution_test.rs:151:31
thread 'solution_test::test_print_vars_and_strings' panicked at 'called `Result::unwrap()` on an `Err` value: RuntimeError { line_number: 50, message: "Error" }', tests/solution_test.rs:140:5
---- solution_test::test_syntax_errors_1 stdout ----
thread '<unnamed>' panicked at 'Expression Ok(()) does not match the pattern "Err(InterpreterError::SyntaxError { .. })"', tests/solution_test.rs:260:9
thread 'solution_test::test_syntax_errors_1' panicked at 'Expression Ok(()) does not match the pattern "Err(InterpreterError::SyntaxError { .. })"', tests/solution_test.rs:254:5
---- solution_test::test_runtime_errors stdout ----
["PRINT", "13"]
["PRINT", "A"]
["READ", "A"]
["READ", "B"]
["READ", "C"]
thread '<unnamed>' panicked at 'Expression Ok(()) does not match the pattern "Err(InterpreterError::RuntimeError { line_number: 40, .. })"', tests/solution_test.rs:315:9
thread 'solution_test::test_runtime_errors' panicked at 'Expression Ok(()) does not match the pattern "Err(InterpreterError::RuntimeError { line_number: 40, .. })"', tests/solution_test.rs:301:5
failures:
solution_test::test_full_program
solution_test::test_print_cyrillic
solution_test::test_print_vars_and_strings
solution_test::test_runtime_errors
solution_test::test_syntax_errors_1
test result: FAILED. 10 passed; 5 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
error: test failed, to rerun pass `--test solution_test`
Напомням ти условието:
PRINT <стойност>: При изпълнение ще напечата дадената стойност и нов ред (символ \n).