Решение на Трета задача от Яни Малцев
Обратно към всички решения
Към профила на Яни Малцев
Резултати
- 5 точки от тестове
- 0 бонус точки
- 5 точки общо
- 33 успешни тест(а)
- 11 неуспешни тест(а)
Код
Лог от изпълнението
.............F..............F..F..FFFF..FFFF
Failures:
1) RBFS Directory serialization ::parse can parse directories recursively
Failure/Error: expect(rbfs_directory['solution.rb'].data ).to eq :hidden
expected: :hidden
got: "hidden"
(compared using ==)
Diff:
@@ -1,2 +1,2 @@
-:hidden
+"hidden"
# /tmp/d20141111-26053-muqrmo/spec.rb:133:in `block (5 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
2) RBFS File data type string can parse a string with colons
Failure/Error: expect(file.data ).to eq 'Hay :)'
expected: "Hay :)"
got: "Hay "
(compared using ==)
# /tmp/d20141111-26053-muqrmo/spec.rb:257:in `block (5 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
3) RBFS File data type symbol can be parsed
Failure/Error: expect(file.data ).to eq :hello
expected: :hello
got: "hello"
(compared using ==)
Diff:
@@ -1,2 +1,2 @@
-:hello
+"hello"
# /tmp/d20141111-26053-muqrmo/spec.rb:276:in `block (5 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
4) RBFS File data type number can be parsed
Failure/Error: expect(file.data ).to eq 1234
expected: 1234
got: "1234"
(compared using ==)
# /tmp/d20141111-26053-muqrmo/spec.rb:295:in `block (5 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
5) RBFS File data type float number can be detected
Failure/Error: expect(file.data_type).to eq :number
expected: :number
got: :nil
(compared using ==)
Diff:
@@ -1,2 +1,2 @@
-:number
+:nil
# /tmp/d20141111-26053-muqrmo/spec.rb:304:in `block (5 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
6) RBFS File data type float number can be serialized
Failure/Error: expect(file.serialize).to eq 'number:666.6'
expected: "number:666.6"
got: "nil:666.6"
(compared using ==)
# /tmp/d20141111-26053-muqrmo/spec.rb:308:in `block (5 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
7) RBFS File data type float number can be parsed
Failure/Error: expect(file.data ).to eq 3.14
expected: 3.14
got: "3.14"
(compared using ==)
# /tmp/d20141111-26053-muqrmo/spec.rb:314:in `block (5 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
8) RBFS File data type boolean true can be parsed
Failure/Error: expect(file.data ).to eq true
expected: true
got: "true"
(compared using ==)
Diff:
@@ -1,2 +1,2 @@
-true
+"true"
# /tmp/d20141111-26053-muqrmo/spec.rb:334:in `block (6 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
9) RBFS File data type boolean false can be detected
Failure/Error: expect(file.data_type).to eq :boolean
expected: :boolean
got: :nil
(compared using ==)
Diff:
@@ -1,2 +1,2 @@
-:boolean
+:nil
# /tmp/d20141111-26053-muqrmo/spec.rb:342:in `block (6 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
10) RBFS File data type boolean false can be serialized
Failure/Error: expect(file.serialize).to eq 'boolean:false'
expected: "boolean:false"
got: "nil:false"
(compared using ==)
# /tmp/d20141111-26053-muqrmo/spec.rb:347:in `block (6 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
11) RBFS File data type boolean false can be parsed
Failure/Error: expect(file.data ).to eq false
expected: false
got: "false"
(compared using ==)
# /tmp/d20141111-26053-muqrmo/spec.rb:353:in `block (6 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
Finished in 0.04589 seconds
44 examples, 11 failures
Failed examples:
rspec /tmp/d20141111-26053-muqrmo/spec.rb:124 # RBFS Directory serialization ::parse can parse directories recursively
rspec /tmp/d20141111-26053-muqrmo/spec.rb:254 # RBFS File data type string can parse a string with colons
rspec /tmp/d20141111-26053-muqrmo/spec.rb:273 # RBFS File data type symbol can be parsed
rspec /tmp/d20141111-26053-muqrmo/spec.rb:292 # RBFS File data type number can be parsed
rspec /tmp/d20141111-26053-muqrmo/spec.rb:303 # RBFS File data type float number can be detected
rspec /tmp/d20141111-26053-muqrmo/spec.rb:307 # RBFS File data type float number can be serialized
rspec /tmp/d20141111-26053-muqrmo/spec.rb:311 # RBFS File data type float number can be parsed
rspec /tmp/d20141111-26053-muqrmo/spec.rb:331 # RBFS File data type boolean true can be parsed
rspec /tmp/d20141111-26053-muqrmo/spec.rb:340 # RBFS File data type boolean false can be detected
rspec /tmp/d20141111-26053-muqrmo/spec.rb:345 # RBFS File data type boolean false can be serialized
rspec /tmp/d20141111-26053-muqrmo/spec.rb:350 # RBFS File data type boolean false can be parsed
История (2 версии и 3 коментара)
Яни обнови решението на 03.11.2014 08:26 (преди около 10 години)
Яни обнови решението на 04.11.2014 11:55 (преди около 10 години)