Permalink
Browse files

tests

  • Loading branch information...
oduvan committed Oct 17, 2018
1 parent 83780b6 commit aa49baf45ddc4748cec2b2d248503c2ec3e4b349
Showing with 46 additions and 14 deletions.
  1. +46 −14 verification/tests.py
@@ -11,26 +11,58 @@
TESTS = {
"Basics": [
{
"input": [3, 2],
"answer": 5,
"explanation": "3+2=?"
},
{
"input": [5, 7],
"answer": 12,
"explanation": "5+7=?"
"input": [[
[6, 3, 8, 10],
[4, 8, 11, 10],
[16, 8, 19, 11]
]],
"answer": 33,
"explanation": "4 points intersections"
},{
"input": [[
[16, 8, 19, 11]
]],
"answer": 9,
"explanation": "One rectangle, no intersections"
},{
"input": [[
[16, 8, 19, 11],
[16, 8, 19, 11]
]],
"answer": 9,
"explanation": "two same rectangles are the same"
},{
"input": [[
[16, 8, 16, 8]
]],
"answer": 0,
"explanation": "rectangle of zero area"
},{
"input": [[
]],
"answer": 0,
"explanation": "no rectangles"
}
],
"Extra": [
{
"input": [6, 3],
"answer": 9,
"explanation": "6+3=?"
"input": [[
[6, 3, 8, 10],
[4, 8, 11, 10],
[16, 8, 19, 11],
[6, 8, 8, 12]
]],
"answer": 37,
"explanation": "4 points intersections (with 3 rectangles)"
},
{
"input": [6, 7],
"answer": 13,
"explanation": "6+7=?"
"input": [[
[6, 3, 8, 10],
[4, 8, 11, 10],
[16, 8, 19, 11],
[4, 8, 6, 12]
]],
"answer": 37
}
]
}

0 comments on commit aa49baf

Please sign in to comment.