Решение на Трета задача от Ясен Трифонов
Обратно към всички решения
Към профила на Ясен Трифонов
Резултати
- 5 точки от тестове
- 0 бонус точки
- 5 точки общо
- 39 успешни тест(а)
- 5 неуспешни тест(а)
Код
Лог от изпълнението
.........."0:"
."1:rbfs:4:0:0:"
"0:"
."2:dir1:15:0:1:dir2:4:0:0:dir3:4:0:0:"
"1:dir2:4:0:0:"
"0:"
"0:"
."2:rbfs:64:1:solution.rb:13:symbol:hidden1:spec:24:1:test:12:boolean:true0:sample:4:0:0:"
"1:spec:24:1:test:12:boolean:true0:"
F....................F..F..F..F
Failures:
1) RBFS Directory serialization ::parse can parse directories recursively
Failure/Error: parsed_directory = RBFS::Directory.parse(recursive_serialized_string)
NoMethodError:
undefined method `parse_boolean' for RBFS::Helper:Class
# /tmp/d20141111-26053-11oc76h/solution.rb:95:in `create_object'
# /tmp/d20141111-26053-11oc76h/solution.rb:12:in `parse'
# /tmp/d20141111-26053-11oc76h/solution.rb:111:in `block in make_file_hash'
# /tmp/d20141111-26053-11oc76h/solution.rb:109:in `times'
# /tmp/d20141111-26053-11oc76h/solution.rb:109:in `make_file_hash'
# /tmp/d20141111-26053-11oc76h/solution.rb:54:in `parse'
# /tmp/d20141111-26053-11oc76h/solution.rb:121:in `block in make_dir_hash'
# /tmp/d20141111-26053-11oc76h/solution.rb:119:in `times'
# /tmp/d20141111-26053-11oc76h/solution.rb:119:in `make_dir_hash'
# /tmp/d20141111-26053-11oc76h/solution.rb:59:in `parse'
# /tmp/d20141111-26053-11oc76h/solution.rb:121:in `block in make_dir_hash'
# /tmp/d20141111-26053-11oc76h/solution.rb:119:in `times'
# /tmp/d20141111-26053-11oc76h/solution.rb:119:in `make_dir_hash'
# /tmp/d20141111-26053-11oc76h/solution.rb:59:in `parse'
# /tmp/d20141111-26053-11oc76h/spec.rb:125: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 number can be parsed
Failure/Error: file = RBFS::File.parse('number:1234')
NoMethodError:
undefined method `parse_number' for RBFS::Helper:Class
# /tmp/d20141111-26053-11oc76h/solution.rb:92:in `create_object'
# /tmp/d20141111-26053-11oc76h/solution.rb:12:in `parse'
# /tmp/d20141111-26053-11oc76h/spec.rb:293: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 float number can be parsed
Failure/Error: file = RBFS::File.parse('number:3.14')
NoMethodError:
undefined method `parse_number' for RBFS::Helper:Class
# /tmp/d20141111-26053-11oc76h/solution.rb:92:in `create_object'
# /tmp/d20141111-26053-11oc76h/solution.rb:12:in `parse'
# /tmp/d20141111-26053-11oc76h/spec.rb:312: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 boolean true can be parsed
Failure/Error: file = RBFS::File.parse('boolean:true')
NoMethodError:
undefined method `parse_boolean' for RBFS::Helper:Class
# /tmp/d20141111-26053-11oc76h/solution.rb:95:in `create_object'
# /tmp/d20141111-26053-11oc76h/solution.rb:12:in `parse'
# /tmp/d20141111-26053-11oc76h/spec.rb:332: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)>'
5) RBFS File data type boolean false can be parsed
Failure/Error: file = RBFS::File.parse('boolean:false')
NoMethodError:
undefined method `parse_boolean' for RBFS::Helper:Class
# /tmp/d20141111-26053-11oc76h/solution.rb:95:in `create_object'
# /tmp/d20141111-26053-11oc76h/solution.rb:12:in `parse'
# /tmp/d20141111-26053-11oc76h/spec.rb:351: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.04494 seconds
44 examples, 5 failures
Failed examples:
rspec /tmp/d20141111-26053-11oc76h/spec.rb:124 # RBFS Directory serialization ::parse can parse directories recursively
rspec /tmp/d20141111-26053-11oc76h/spec.rb:292 # RBFS File data type number can be parsed
rspec /tmp/d20141111-26053-11oc76h/spec.rb:311 # RBFS File data type float number can be parsed
rspec /tmp/d20141111-26053-11oc76h/spec.rb:331 # RBFS File data type boolean true can be parsed
rspec /tmp/d20141111-26053-11oc76h/spec.rb:350 # RBFS File data type boolean false can be parsed
История (6 версии и 0 коментара)
Ясен обнови решението на 10.11.2014 13:08 (преди около 10 години)
Ясен обнови решението на 10.11.2014 15:30 (преди около 10 години)
Ясен обнови решението на 10.11.2014 15:37 (преди около 10 години)
Ясен обнови решението на 10.11.2014 15:42 (преди около 10 години)
Ясен обнови решението на 10.11.2014 16:25 (преди около 10 години)
Ясен обнови решението на 10.11.2014 16:46 (преди около 10 години)