Решение на Text Info от Георги Божинов
Обратно към всички решения
Към профила на Георги Божинов
Резултати
- 13 точки от тестове
- 0 бонус точки
- 13 точки общо
- 13 успешни тест(а)
- 2 неуспешни тест(а)
Код
Лог от изпълнението
Compiling solution v0.1.0 (file:///tmp/d20171026-5817-1hbbg4r/solution)
invalid expression
!7138 = !DIExpression(6, 34, 0, 6)
invalid expression
!8742 = !DIExpression(6, 34, 8, 6)
invalid expression
!7137 = !DIExpression(6, 34, 0, 6)
invalid expression
!8741 = !DIExpression(6, 34, 8, 6)
Finished dev [unoptimized + debuginfo] target(s) in 5.27 secs
Running target/debug/deps/solution-f5dd4e94aa395cae
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
Running target/debug/deps/solution_test-c3b431457e2a7a27
running 15 tests
test solution_test::test_alpha_count ... ok
test solution_test::test_alpha_count_2 ... ok
test solution_test::test_char_count ... ok
test solution_test::test_cyrillic_letter_count ... ok
test solution_test::test_emotions ... ok
test solution_test::test_emotions_repeated_punctuation ... FAILED
test solution_test::test_empty_string ... ok
test solution_test::test_latin_letter_count ... ok
test solution_test::test_sentence_count ... ok
test solution_test::test_sentence_count_2 ... FAILED
test solution_test::test_triple_dots_count ... ok
test solution_test::test_unicode_char_count ... ok
test solution_test::test_word_count ... ok
test solution_test::test_word_count_2 ... ok
test solution_test::test_word_count_3 ... ok
failures:
---- solution_test::test_emotions_repeated_punctuation stdout ----
thread 'solution_test::test_emotions_repeated_punctuation' panicked at 'assertion failed: `(left == right)`
left: `"🤔"`,
right: `"😐"`', tests/solution_test.rs:107:4
note: Run with `RUST_BACKTRACE=1` for a backtrace.
---- solution_test::test_sentence_count_2 stdout ----
thread 'solution_test::test_sentence_count_2' panicked at 'byte index 1 is not a char boundary; it is inside 'д' (bytes 0..2) of `да видим сега: следват ли студентите указания; ще игнорират ли -- тази -- пунктуация?`', src/libcore/str/mod.rs:2188:4
failures:
solution_test::test_emotions_repeated_punctuation
solution_test::test_sentence_count_2
test result: FAILED. 13 passed; 2 failed; 0 ignored; 0 measured; 0 filtered out
error: test failed, to rerun pass '--test solution_test'
История (2 версии и 3 коментара)
Георги качи първо решение на 21.10.2017 23:00 (преди почти 8 години)
Георги качи решение на 24.10.2017 22:21 (преди почти 8 години)
Разгледай документацията на вектор може би ще намериш подобен "метод".