#!/usr/bin/env node

require ('proof')(5, prove)

function prove (assert) {
    var rects = require('../../area.js')

    var a = new rects.Area(0, 5, 0, 5)
    var b = new rects.Area(0, 7, 0, 7)
    var c = new rects.Area(5, 10, 5, 10)
    var d = new rects.Area(15, 5, 0, 20)

    assert(b.containsPoint(2,2), true , "Square(0,7,0,7) contains point(2,2)")
    assert(b.containsPoint(0,0), true , "Square(0,7,0,7) contains point(0,0)")
    assert(b.containsPoint(8,8), false , "Square(0,7,0,7) doesn't contain point(8,8)")
}

@@ -32,17 +32,17 @@
 proof')(
-5
+4
 , prove)
@@ -142,18 +142,21 @@
 rea(
+-1
 0, 5, 
-0, 5
+-5, 0
 )%0A  
@@ -196,90 +196,98 @@
  7)%0A
+%0A
     
-var c = new rects.Area(5, 10, 5, 10)%0A    var d = new rects.Area(15, 5, 0, 20)%0A
+assert(a.containsPoint(-2, -2), true, %22Square(-10, 5, -5, 0) contains point(-2, -2)%22)
 %0A   

Test negative points.