Open alexey-malov opened 4 years ago
2>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2>tests.exe is a Catch v2.11.3 host application.
2>Run with -? for options
2>
2>-------------------------------------------------------------------------------
2>CCircle - create a circle
2> When: Created circle with radius 3, line color #123456 and fill color
2> #987654
2> Then: Can get all parameters of segment
2>-------------------------------------------------------------------------------
2>e:\teaching\oop\2020\ips\petrov\oop\lw4\shapes\tests\circletests.cpp(56)
2>...............................................................................
2>
2>e:\teaching\oop\2020\ips\petrov\oop\lw4\shapes\tests\circletests.cpp(58): FAILED:
2> CHECK( circle.ToString() == "Circle:\n\tcenter = ( 1.2 , 3.4 ), radius = 3\n\tperimeter = 18.85\n\tarea = 28.27\n\tline color = 123456\n\tfill color = 987654\n" )
2>with expansion:
2> "Circle:
2> center = ( 1.2 , 3.4 ), radius = 3
2> perimeter = 18.85
2> area = 28.27
2> line color = #01e240
2> fill color = #0f1206
2> "
2> ==
2> "Circle:
2> center = ( 1.2 , 3.4 ), radius = 3
2> perimeter = 18.85
2> area = 28.27
2> line color = 123456
2> fill color = 987654
2> "
2>
2>-------------------------------------------------------------------------------
2>Scenario: When the user finishes entering shapes, information is displayed
2> about the shape with the smallest perimeter and largest area
2> Given: A command line
2> When: User enters circle parameters
2> And when: User enters other circle parameters
2> And when: User finish work whith programm, information is displayed about
2> the shape with the smallest perimeter and largest area
2> Then: He get a notification
2>-------------------------------------------------------------------------------
2>e:\teaching\oop\2020\ips\petrov\oop\lw4\shapes\tests\handlertests.cpp(367)
2>...............................................................................
2>
2>e:\teaching\oop\2020\ips\petrov\oop\lw4\shapes\tests\handlertests.cpp(369): FAILED:
2> CHECK( output.str() == expectedOutput )
2>with expansion:
2> "Min perimeter shape: Circle:
2> center = ( 2 , 2 ), radius = 3
2> perimeter = 18.85
2> area = 28.27
2> line color = #000000
2> fill color = #000000
2>
2>Max area shape: Circle:
2> center = ( 3 , 3 ), radius = 4
2> perimeter = 25.13
2> area = 50.27
2> line color = #000000
2> fill color = #000000
2>
2>"
2> ==
2> "Min perimeter shape: Circle:
2> center = ( 2 , 2 ), radius = 3
2> perimeter = 18.85
2> area = 28.27
2> line color = 0
2> fill color = 0
2>
2>Max area shape: Circle:
2> center = ( 3 , 3 ), radius = 4
2> perimeter = 25.13
2> area = 50.27
2> line color = 0
2> fill color = 0
2>
2>"
2>
2>-------------------------------------------------------------------------------
2>CLineSegment - create a line segment
2> When: Created line segment of color #123456
2> Then: Can get all parameters of segment
2>-------------------------------------------------------------------------------
2>e:\teaching\oop\2020\ips\petrov\oop\lw4\shapes\tests\linesegmenttests.cpp(54)
2>...............................................................................
2>
2>e:\teaching\oop\2020\ips\petrov\oop\lw4\shapes\tests\linesegmenttests.cpp(56): FAILED:
2> CHECK( ls.ToString() == "Line segment:\n\tbegins = ( 1.2 , 3.4 ), ends = ( 5.6 , 7.8 )\n\tlength = 6.22\n\tcolor = 123456\n" )
2>with expansion:
2> "Line segment:
2> begins = ( 1.2 , 3.4 ), ends = ( 5.6 , 7.8 )
2> length = 6.22
2> color = #01e240
2> "
2> ==
2> "Line segment:
2> begins = ( 1.2 , 3.4 ), ends = ( 5.6 , 7.8 )
2> length = 6.22
2> color = 123456
2> "
2>
2>-------------------------------------------------------------------------------
2>CRectangle - create a rectangle
2> When: Created rectangle with width = 9.2, height = 4.1, line color
2> #123456 and fill color #987654
2> And: Can get all parameters of segment
2>-------------------------------------------------------------------------------
2>e:\teaching\oop\2020\ips\petrov\oop\lw4\shapes\tests\rectangletest.cpp(65)
2>...............................................................................
2>
2>e:\teaching\oop\2020\ips\petrov\oop\lw4\shapes\tests\rectangletest.cpp(67): FAILED:
2> CHECK( rectangle.ToString() == "Rectangle:\n\tleft top vertex = ( 1.2 , 3.4 ), width = 9.2, height = 4.1\n\tperimeter = 26.6\n\tarea = 37.72\n\tline color = 123456\n\tfill color = 987654\n" )
2>with expansion:
2> "Rectangle:
2> left top vertex = ( 1.2 , 3.4 ), width = 9.2, height = 4.1
2> perimeter = 26.6
2> area = 37.72
2> line color = #01e240
2> fill color = #0f1206
2> "
2> ==
2> "Rectangle:
2> left top vertex = ( 1.2 , 3.4 ), width = 9.2, height = 4.1
2> perimeter = 26.6
2> area = 37.72
2> line color = 123456
2> fill color = 987654
2> "
2>
2>-------------------------------------------------------------------------------
2>CTriangle - create a triangle
2> When: Created triangle with line color #123456 and fill color #987654
2> Then: Can get all parameters of segment
2>-------------------------------------------------------------------------------
2>e:\teaching\oop\2020\ips\petrov\oop\lw4\shapes\tests\triangletests.cpp(68)
2>...............................................................................
2>
2>e:\teaching\oop\2020\ips\petrov\oop\lw4\shapes\tests\triangletests.cpp(70): FAILED:
2> CHECK( triangle.ToString() == "Triangle:\n\tfirst vertex = ( 1.2 , 3.4 ), second vertex = ( 5.6 , 7.8 ), third vertex = ( 9 , 1.2 )\n\tperimeter = 21.75\n\tarea = 22\n\tline color = 123456\n\tfill color = 987654\n" )
2>with expansion:
2> "Triangle:
2> first vertex = ( 1.2 , 3.4 ), second vertex = ( 5.6 , 7.8 ), third vertex =
2> ( 9 , 1.2 )
2> perimeter = 21.75
2> area = 22
2> line color = #01e240
2> fill color = #0f1206
2> "
2> ==
2> "Triangle:
2> first vertex = ( 1.2 , 3.4 ), second vertex = ( 5.6 , 7.8 ), third vertex =
2> ( 9 , 1.2 )
2> perimeter = 21.75
2> area = 22
2> line color = 123456
2> fill color = 987654
2> "
2>
2>===============================================================================
2>test cases: 30 | 25 passed | 5 failed
2>assertions: 76 | 71 passed | 5 failed
https://github.com/PetrovIliya/OOP/blob/3b2f24f666206be5d59cd7588e76bcd6d24db885/lw4/Shapes/Shapes/ICanvasDrawable.h#L1-L6
#include <memory>
?