Решение на Трета задача от Ангел Цанев
Обратно към всички решения
Към профила на Ангел Цанев
Резултати
- 5 точки от тестове
- 0 бонус точки
- 5 точки общо
- 52 успешни тест(а)
- 17 неуспешни тест(а)
Код
Лог от изпълнението
........F.FFFFFFFFFFFFFF.FF..........................................
Failures:
1) Graphics Canvas drawing of shapes and rasterization renders multiple drawn shapes
Failure/Error: ascii.should eq rendering(expected)
expected: "@@@@@@@@@@@@@@@\n@-------------@\n@-@@@@@@@@@@@-@\n@-@---------@-@\n@-@------@@-@-@\n@-@---@@@---@-@\n@-@-@@------@-@\n@-@---------@-@\n@-@-@@@@----@-@\n@-@-@-------@-@\n@-@---------@-@\n@-@---------@-@\n@-@@@@@@@@@@@-@\n@-------------@\n@@@@@@@@@@@@@@@"
got: "@@@@@@@@@@@@@@@-\n@-------------@-\n@-@@@@@@@@@@@-@-\n@-@---------@-@-\n@-@-----@@@-@-@-\n@-@--@@@----@-@-\n@-@-@-------@-@-\n@-@---------@-@-\n@-@-@@@@----@-@-\n@-@-@-------@-@-\n@-@---------@-@-\n@-@---------@-@-\n@-@@@@@@@@@@@-@-\n@-------------@-\n@@@@@@@@@@@@@@@-\n----------------\n"
(compared using ==)
Diff:
@@ -1,16 +1,17 @@
-@@@@@@@@@@@@@@@
-@-------------@
-@-@@@@@@@@@@@-@
-@-@---------@-@
-@-@------@@-@-@
-@-@---@@@---@-@
-@-@-@@------@-@
-@-@---------@-@
-@-@-@@@@----@-@
-@-@-@-------@-@
-@-@---------@-@
-@-@---------@-@
-@-@@@@@@@@@@@-@
-@-------------@
-@@@@@@@@@@@@@@@
+@@@@@@@@@@@@@@@-
+@-------------@-
+@-@@@@@@@@@@@-@-
+@-@---------@-@-
+@-@-----@@@-@-@-
+@-@--@@@----@-@-
+@-@-@-------@-@-
+@-@---------@-@-
+@-@-@@@@----@-@-
+@-@-@-------@-@-
+@-@---------@-@-
+@-@---------@-@-
+@-@@@@@@@@@@@-@-
+@-------------@-
+@@@@@@@@@@@@@@@-
+----------------
# /tmp/d20131223-4637-14f8a9/spec.rb:624:in `check_rendering_of'
# /tmp/d20131223-4637-14f8a9/spec.rb:211:in `block (4 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) Graphics Canvas drawing of shapes and rasterization of points works for multiple ones
Failure/Error: ascii.should eq rendering(expected)
expected: "@---\n@---\n-@@-\n----"
got: "@----\n@----\n-@@--\n-----\n----@\n"
(compared using ==)
Diff:
@@ -1,5 +1,6 @@
-@---
-@---
--@@-
-----
+@----
+@----
+-@@--
+-----
+----@
# /tmp/d20131223-4637-14f8a9/spec.rb:624:in `check_rendering_of'
# /tmp/d20131223-4637-14f8a9/spec.rb:59: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) Graphics Canvas drawing of shapes and rasterization of lines works with simple horizontal lines
Failure/Error: ascii.should eq rendering(expected)
expected: "--------\n---@@@@-\n--------"
got: "---------\n---@@@@--\n---------\n---------\n"
(compared using ==)
Diff:
@@ -1,4 +1,5 @@
---------
----@@@@-
---------
+---------
+---@@@@--
+---------
+---------
# /tmp/d20131223-4637-14f8a9/spec.rb:624:in `check_rendering_of'
# /tmp/d20131223-4637-14f8a9/spec.rb:73: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) Graphics Canvas drawing of shapes and rasterization of lines works with vertical lines
Failure/Error: ascii.should eq rendering(expected)
expected: "-@------\n-@------\n-@------\n-@------\n-@------\n-@------\n-@------\n--------"
got: "-@-------\n-@-------\n-@-------\n-@-------\n-@-------\n-@-------\n-@-------\n---------\n---------\n"
(compared using ==)
Diff:
@@ -1,9 +1,10 @@
--@------
--@------
--@------
--@------
--@------
--@------
--@------
---------
+-@-------
+-@-------
+-@-------
+-@-------
+-@-------
+-@-------
+-@-------
+---------
+---------
# /tmp/d20131223-4637-14f8a9/spec.rb:624:in `check_rendering_of'
# /tmp/d20131223-4637-14f8a9/spec.rb:84: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) Graphics Canvas drawing of shapes and rasterization of lines works with lines with a small slope
Failure/Error: ascii.should eq rendering(expected)
expected: "----------\n-@@-------\n---@@@@---\n-------@@-\n----------"
got: "-----------\n-@---------\n--@@@@-----\n------@@@--\n-----------\n-----------\n"
(compared using ==)
Diff:
@@ -1,6 +1,7 @@
-----------
--@@-------
----@@@@---
--------@@-
-----------
+-----------
+-@---------
+--@@@@-----
+------@@@--
+-----------
+-----------
# /tmp/d20131223-4637-14f8a9/spec.rb:624:in `check_rendering_of'
# /tmp/d20131223-4637-14f8a9/spec.rb:100: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) Graphics Canvas drawing of shapes and rasterization of lines works with lines with a significant slope, with swapped ends
Failure/Error: ascii.should eq rendering(expected)
expected: "----------\n-@--------\n-@--------\n--@-------\n--@-------\n--@-------\n--@-------\n---@------\n---@------\n----------"
got: "-----------\n-@---------\n-@---------\n--@--------\n--@--------\n--@--------\n--@--------\n---@-------\n---@-------\n-----------\n-----------\n"
(compared using ==)
Diff:
@@ -1,11 +1,12 @@
-----------
--@--------
--@--------
---@-------
---@-------
---@-------
---@-------
----@------
----@------
-----------
+-----------
+-@---------
+-@---------
+--@--------
+--@--------
+--@--------
+--@--------
+---@-------
+---@-------
+-----------
+-----------
# /tmp/d20131223-4637-14f8a9/spec.rb:624:in `check_rendering_of'
# /tmp/d20131223-4637-14f8a9/spec.rb:113: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) Graphics Canvas drawing of shapes and rasterization of lines works with multiple lines
Failure/Error: ascii.should eq rendering(expected)
expected: "-@--------\n-@@-------\n-@-@@@@---\n-@-----@@-\n----------"
got: "-@---------\n-@---------\n-@@@@@-----\n-@----@@@--\n-----------\n-----------\n"
(compared using ==)
Diff:
@@ -1,6 +1,7 @@
--@--------
--@@-------
--@-@@@@---
--@-----@@-
-----------
+-@---------
+-@---------
+-@@@@@-----
+-@----@@@--
+-----------
+-----------
# /tmp/d20131223-4637-14f8a9/spec.rb:624:in `check_rendering_of'
# /tmp/d20131223-4637-14f8a9/spec.rb:132: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) Graphics Canvas drawing of shapes and rasterization of lines draws lines with two equal ends as points
Failure/Error: ascii.should eq rendering(expected)
expected: "---\n-@-\n---"
got: "----\n-@--\n----\n----\n"
(compared using ==)
Diff:
@@ -1,4 +1,5 @@
----
--@-
----
+----
+-@--
+----
+----
# /tmp/d20131223-4637-14f8a9/spec.rb:624:in `check_rendering_of'
# /tmp/d20131223-4637-14f8a9/spec.rb:145: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)>'
9) Graphics Canvas drawing of shapes and rasterization of rectangles works with simple rects
Failure/Error: ascii.should eq rendering(expected)
expected: "----------\n-@@@@@@@@-\n-@------@-\n-@@@@@@@@-\n----------"
got: "-----------\n-@@@@@@@@--\n-@------@--\n-@@@@@@@@--\n-----------\n-----------\n"
(compared using ==)
Diff:
@@ -1,6 +1,7 @@
-----------
--@@@@@@@@-
--@------@-
--@@@@@@@@-
-----------
+-----------
+-@@@@@@@@--
+-@------@--
+-@@@@@@@@--
+-----------
+-----------
# /tmp/d20131223-4637-14f8a9/spec.rb:624:in `check_rendering_of'
# /tmp/d20131223-4637-14f8a9/spec.rb:158: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)>'
10) Graphics Canvas drawing of shapes and rasterization of rectangles works with rects defined with their bottom left and top right points
Failure/Error: ascii.should eq rendering(expected)
expected: "----------\n-@@@@@@@@-\n-@------@-\n-@@@@@@@@-\n----------"
got: "-----------\n-@@@@@@@@--\n-@------@--\n-@@@@@@@@--\n-----------\n-----------\n"
(compared using ==)
Diff:
@@ -1,6 +1,7 @@
-----------
--@@@@@@@@-
--@------@-
--@@@@@@@@-
-----------
+-----------
+-@@@@@@@@--
+-@------@--
+-@@@@@@@@--
+-----------
+-----------
# /tmp/d20131223-4637-14f8a9/spec.rb:624:in `check_rendering_of'
# /tmp/d20131223-4637-14f8a9/spec.rb:171: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)>'
11) Graphics Canvas drawing of shapes and rasterization of rectangles works with rects with a zero height as a line
Failure/Error: ascii.should eq rendering(expected)
expected: "----------\n-@@@@@@@@-\n----------"
got: "-----------\n-@@@@@@@@--\n-----------\n-----------\n"
(compared using ==)
Diff:
@@ -1,4 +1,5 @@
-----------
--@@@@@@@@-
-----------
+-----------
+-@@@@@@@@--
+-----------
+-----------
# /tmp/d20131223-4637-14f8a9/spec.rb:624:in `check_rendering_of'
# /tmp/d20131223-4637-14f8a9/spec.rb:184: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)>'
12) Graphics Canvas drawing of shapes and rasterization of rectangles works with rects with a zero width and height as a single point
Failure/Error: ascii.should eq rendering(expected)
expected: "---\n-@-\n---"
got: "----\n-@--\n----\n----\n"
(compared using ==)
Diff:
@@ -1,4 +1,5 @@
----
--@-
----
+----
+-@--
+----
+----
# /tmp/d20131223-4637-14f8a9/spec.rb:624:in `check_rendering_of'
# /tmp/d20131223-4637-14f8a9/spec.rb:195: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)>'
13) Graphics Renderers Ascii renders a grid of the size of the canvas
Failure/Error: lines.size.should eq 3
expected: 3
got: 4
(compared using ==)
# /tmp/d20131223-4637-14f8a9/spec.rb:240:in `block (4 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)>'
14) Graphics Renderers Ascii renders blank canvases
Failure/Error: canvas.render_as(ascii).should eq rendering('
expected: "----\n----\n----"
got: "-----\n-----\n-----\n-----\n"
(compared using ==)
Diff:
@@ -1,4 +1,5 @@
-----
-----
-----
+-----
+-----
+-----
+-----
# /tmp/d20131223-4637-14f8a9/spec.rb:245:in `block (4 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)>'
15) Graphics Renderers Ascii renders simple canvases
Failure/Error: canvas.render_as(ascii).should eq rendering('
expected: "@---\n----\n---@"
got: "@----\n-----\n---@-\n-----\n"
(compared using ==)
Diff:
@@ -1,4 +1,5 @@
-@---
-----
----@
+@----
+-----
+---@-
+-----
# /tmp/d20131223-4637-14f8a9/spec.rb:256:in `block (4 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)>'
16) Graphics Renderers Html renders a grid of the size of the canvas
Failure/Error: lines.size.should eq 3
expected: 3
got: 4
(compared using ==)
# /tmp/d20131223-4637-14f8a9/spec.rb:283:in `block (4 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)>'
17) Graphics Renderers Html renders simple canvases
Failure/Error: html_rendering_of(canvas).should eq [
expected: "<i></i><i></i><i></i><i></i><br><i></i><b></b><i></i><i></i><br><i></i><b></b><i></i><i></i>"
got: "<i></i><i></i><i></i><i></i><i></i><br><i></i><b></b><i></i><i></i><i></i><br><i></i><b></b><i></i><i></i><i></i><br><i></i><i></i><i></i><i></i><i></i><br>"
(compared using ==)
# /tmp/d20131223-4637-14f8a9/spec.rb:291:in `block (4 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.0969 seconds
69 examples, 17 failures
Failed examples:
rspec /tmp/d20131223-4637-14f8a9/spec.rb:203 # Graphics Canvas drawing of shapes and rasterization renders multiple drawn shapes
rspec /tmp/d20131223-4637-14f8a9/spec.rb:51 # Graphics Canvas drawing of shapes and rasterization of points works for multiple ones
rspec /tmp/d20131223-4637-14f8a9/spec.rb:69 # Graphics Canvas drawing of shapes and rasterization of lines works with simple horizontal lines
rspec /tmp/d20131223-4637-14f8a9/spec.rb:80 # Graphics Canvas drawing of shapes and rasterization of lines works with vertical lines
rspec /tmp/d20131223-4637-14f8a9/spec.rb:96 # Graphics Canvas drawing of shapes and rasterization of lines works with lines with a small slope
rspec /tmp/d20131223-4637-14f8a9/spec.rb:109 # Graphics Canvas drawing of shapes and rasterization of lines works with lines with a significant slope, with swapped ends
rspec /tmp/d20131223-4637-14f8a9/spec.rb:127 # Graphics Canvas drawing of shapes and rasterization of lines works with multiple lines
rspec /tmp/d20131223-4637-14f8a9/spec.rb:141 # Graphics Canvas drawing of shapes and rasterization of lines draws lines with two equal ends as points
rspec /tmp/d20131223-4637-14f8a9/spec.rb:154 # Graphics Canvas drawing of shapes and rasterization of rectangles works with simple rects
rspec /tmp/d20131223-4637-14f8a9/spec.rb:167 # Graphics Canvas drawing of shapes and rasterization of rectangles works with rects defined with their bottom left and top right points
rspec /tmp/d20131223-4637-14f8a9/spec.rb:180 # Graphics Canvas drawing of shapes and rasterization of rectangles works with rects with a zero height as a line
rspec /tmp/d20131223-4637-14f8a9/spec.rb:191 # Graphics Canvas drawing of shapes and rasterization of rectangles works with rects with a zero width and height as a single point
rspec /tmp/d20131223-4637-14f8a9/spec.rb:237 # Graphics Renderers Ascii renders a grid of the size of the canvas
rspec /tmp/d20131223-4637-14f8a9/spec.rb:244 # Graphics Renderers Ascii renders blank canvases
rspec /tmp/d20131223-4637-14f8a9/spec.rb:252 # Graphics Renderers Ascii renders simple canvases
rspec /tmp/d20131223-4637-14f8a9/spec.rb:280 # Graphics Renderers Html renders a grid of the size of the canvas
rspec /tmp/d20131223-4637-14f8a9/spec.rb:287 # Graphics Renderers Html renders simple canvases
История (4 версии и 2 коментара)
Ангел обнови решението на 22.12.2013 03:10 (преди почти 11 години)
Ангел обнови решението на 22.12.2013 03:14 (преди почти 11 години)
Ангел обнови решението на 22.12.2013 03:17 (преди почти 11 години)
Ангел обнови решението на 22.12.2013 21:31 (преди почти 11 години)